Ensure consistent behavior from show_controlbox_by_default
This commit is contained in:
parent
e52a775430
commit
fbdbea223d
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
## 2.0.7 (2017-02-14)
|
## 2.0.7 (2017-02-14)
|
||||||
- Bugfix. 'TypeError: this.sendConfiguration(...).then is not a function' when an instant room is created. [jcbrand]
|
- Bugfix. 'TypeError: this.sendConfiguration(...).then is not a function' when an instant room is created. [jcbrand]
|
||||||
|
- Ensure consistent behavior from `show_controlbox_by_default` [jcbrand]
|
||||||
|
|
||||||
## 2.0.6 (2017-02-13)
|
## 2.0.6 (2017-02-13)
|
||||||
- Escape user-generated input to prevent JS-injection attacks. (Thanks to SamWhited) [jcbrand]
|
- Escape user-generated input to prevent JS-injection attacks. (Thanks to SamWhited) [jcbrand]
|
||||||
|
|
|
@ -134,10 +134,11 @@
|
||||||
closeAllChatBoxes: function () {
|
closeAllChatBoxes: function () {
|
||||||
var _converse = this.__super__._converse;
|
var _converse = this.__super__._converse;
|
||||||
this.each(function (view) {
|
this.each(function (view) {
|
||||||
if (_converse.disconnection_cause === _converse.LOGOUT ||
|
if (view.model.get('id') === 'controlbox' &&
|
||||||
view.model.get('id') !== 'controlbox') {
|
(_converse.disconnection_cause !== _converse.LOGOUT || _converse.show_controlbox_by_default)) {
|
||||||
view.close();
|
return;
|
||||||
}
|
}
|
||||||
|
view.close();
|
||||||
});
|
});
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -244,9 +245,9 @@
|
||||||
this.render();
|
this.render();
|
||||||
if (this.model.get('connected')) {
|
if (this.model.get('connected')) {
|
||||||
this.insertRoster();
|
this.insertRoster();
|
||||||
}
|
if (_.isUndefined(this.model.get('closed'))) {
|
||||||
if (_.isUndefined(this.model.get('closed'))) {
|
this.model.set('closed', !_converse.show_controlbox_by_default);
|
||||||
this.model.set('closed', !_converse.show_controlbox_by_default);
|
}
|
||||||
}
|
}
|
||||||
if (!this.model.get('closed')) {
|
if (!this.model.get('closed')) {
|
||||||
this.show();
|
this.show();
|
||||||
|
@ -272,6 +273,7 @@
|
||||||
onConnected: function () {
|
onConnected: function () {
|
||||||
if (this.model.get('connected')) {
|
if (this.model.get('connected')) {
|
||||||
this.render().insertRoster();
|
this.render().insertRoster();
|
||||||
|
this.model.save('closed', !this.$el.is(':visible'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user