Commit 3181956b authored by JC Brand's avatar JC Brand

controlbox: use ``sticky_controlbox`` setting to reduce inverse code

parent 3e42fb53
......@@ -297,6 +297,9 @@
close: function (ev) {
if (ev && ev.preventDefault) { ev.preventDefault(); }
if (_converse.sticky_controlbox) {
return;
}
if (_converse.connection.connected && !_converse.connection.disconnecting) {
this.model.save({'closed': true});
} else {
......@@ -315,6 +318,9 @@
},
hide: function (callback) {
if (_converse.sticky_controlbox) {
return;
}
this.$el.addClass('hidden');
utils.refreshWebkit();
_converse.emit('chatBoxClosed', this);
......
......@@ -41,20 +41,6 @@
},
ControlBoxView: {
close: function (ev) {
if (ev && ev.preventDefault) {
ev.preventDefault();
}
// The controlbox cannot be closed.
},
hide: function (ev) {
if (ev && ev.preventDefault) {
ev.preventDefault();
}
// The controlbox cannot be hidden
},
renderContactsPanel: function () {
this.__super__.renderContactsPanel.apply(this, arguments);
this.el.classList.remove("fullscreen");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment