Now also remove openControlBox

This commit is contained in:
JC Brand 2013-03-24 12:36:40 +02:00
parent d0b9761d20
commit b495f83745

View File

@ -1123,19 +1123,6 @@
return view; return view;
}, },
openControlBox: function () {
var controlbox = this.model.get('controlbox')
if (controlbox) {
controlbox.trigger('show');
} else {
this.options.model.add({
id: 'controlbox',
box_id: 'controlbox',
visible: true
});
}
},
initialize: function () { initialize: function () {
// boxesviewinit // boxesviewinit
this.views = {}; this.views = {};
@ -1990,8 +1977,16 @@
if ($("div#controlbox").is(':visible')) { if ($("div#controlbox").is(':visible')) {
this.chatboxes.get('controlbox').destroy(); this.chatboxes.get('controlbox').destroy();
} else { } else {
this.chatboxesview.openControlBox(); var controlbox = this.chatboxes.get('controlbox')
} if (controlbox) {
controlbox.trigger('show');
} else {
this.create({
id: 'controlbox',
box_id: 'controlbox',
visible: true
});
}
}, this)); }, this));
$(document).bind('jarnxmpp.connecting', $.proxy(function (ev, conn) { $(document).bind('jarnxmpp.connecting', $.proxy(function (ev, conn) {