Fix tests but killing zombies.

This commit is contained in:
JC Brand 2014-09-17 10:35:24 +02:00
parent 5124c05f65
commit eefce8286e
2 changed files with 13 additions and 4 deletions

View File

@ -1455,9 +1455,7 @@
},
minimize: function (ev) {
if (ev && ev.preventDefault) {
ev.preventDefault();
}
if (ev && ev.preventDefault) { ev.preventDefault(); }
// Minimizes a chat box
this.model.minimize();
this.$el.hide('fast', converse.refreshwebkit);
@ -4509,6 +4507,17 @@
}
};
this._tearDown = function () {
this.features.off().remove();
this.otr.destroy();
this.chatboxes.off().remove();
this.chatboxviews.off().remove();
this.controlboxtoggle.off().remove();
this.minimized_chats.off().remove();
delete this.chatboxes;
delete this.features;
};
this._initialize = function () {
this.chatboxes = new this.ChatBoxes();
this.chatboxviews = new this.ChatBoxViews({model: this.chatboxes});

View File

@ -31,8 +31,8 @@
};
utils.initConverse = function () {
converse._tearDown();
converse._initialize();
converse.onConnected();
};
utils.initRoster = function () {