|
@@ -242,14 +242,17 @@
|
|
} else {
|
|
} else {
|
|
this.hide();
|
|
this.hide();
|
|
}
|
|
}
|
|
- this.$el.html(tpl_controlbox(
|
|
|
|
|
|
+ this.el.innerHTML = tpl_controlbox(
|
|
_.extend(this.model.toJSON(), {
|
|
_.extend(this.model.toJSON(), {
|
|
- sticky_controlbox: _converse.sticky_controlbox
|
|
|
|
- }))
|
|
|
|
- );
|
|
|
|
- if (!_converse.connection.connected || !_converse.connection.authenticated || _converse.connection.disconnecting) {
|
|
|
|
|
|
+ 'sticky_controlbox': _converse.sticky_controlbox
|
|
|
|
+ }));
|
|
|
|
+
|
|
|
|
+ if (!_converse.connection.connected ||
|
|
|
|
+ !_converse.connection.authenticated ||
|
|
|
|
+ _converse.connection.disconnecting) {
|
|
this.renderLoginPanel();
|
|
this.renderLoginPanel();
|
|
- } else if (!this.contactspanel || !this.contactspanel.$el.is(':visible')) {
|
|
|
|
|
|
+ } else if (this.model.get('connected') &&
|
|
|
|
+ (!this.contactspanel || !this.contactspanel.$el.is(':visible'))) {
|
|
this.renderContactsPanel();
|
|
this.renderContactsPanel();
|
|
}
|
|
}
|
|
return this;
|
|
return this;
|