From 70466563709b6566e891e7cd37cd129fcd6d9bd0 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Mon, 25 Mar 2013 12:00:24 +0200 Subject: [PATCH] Bugfix. Controlbox showed automatically upon page load --- converse.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/converse.js b/converse.js index 9ecb638d1..58a1d047d 100644 --- a/converse.js +++ b/converse.js @@ -698,13 +698,6 @@ } }); - xmppchat.SettingsPanel = Backbone.View.extend({ - // XXX: Options for the (still to be done) 'settings' tab: - // * Show offline users - // * Auto-open chatbox when a message was received. - el: '#settings' - }); - xmppchat.ControlBoxView = xmppchat.ChatBoxView.extend({ tagName: 'div', className: 'chatbox', @@ -715,7 +708,6 @@ }, initialize: function () { - // Override the one in ChatBoxView this.$el.appendTo(xmppchat.chatboxesview.$el); this.model.on('change', $.proxy(function (item, changed) { if (_.has(item.changed, 'connected')) { @@ -729,7 +721,6 @@ }, this)); this.model.on('show', this.show, this); - this.model.on('destroy', $.proxy(function (model, response, options) { this.$el.hide('fast'); }, this)); @@ -984,7 +975,7 @@ this.localStorage = new Backbone.LocalStorage( hex_sha1('converse.chatboxes-'+xmppchat.connection.bare_jid)); if (!this.get('controlbox')) { - this.create({ + this.add({ id: 'controlbox', box_id: 'controlbox' }); @@ -1931,6 +1922,8 @@ box_id: 'controlbox', visible: true }); + } else { + controlbox.trigger('show'); } } }, this));