controlbox: use `sticky_controlbox
` setting to reduce inverse code
This commit is contained in:
parent
3e42fb53e5
commit
3181956b61
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user