2 controlbox bugfixes and spec typo.

* Save controlbox to containing collection
* Call refreshWebkit after closing controlbox
This commit is contained in:
JC Brand 2014-03-14 21:52:03 +02:00
parent 7e0bb8b11a
commit 3cfcb2ae34
2 changed files with 7 additions and 2 deletions

View File

@ -511,7 +511,7 @@
this.registerRosterHandler();
this.registerRosterXHandler();
this.registerPresenceHandler();
// No create the view which will fetch roster items from
// Now create the view which will fetch roster items from
// localStorage
this.rosterview = new this.RosterView({'model':this.roster});
};
@ -1824,6 +1824,7 @@
hide: function (callback) {
this.$el.hide('fast', function () {
converse.refreshWebkit();
converse.emit('onChatBoxClosed', this);
converse.controlboxtoggle.show(function () {
if (typeof callback === "function") {
@ -2398,6 +2399,7 @@
});
}
this.get('controlbox').fetch();
this.get('controlbox').save();
// This line below will make sure the Roster is set up
this.get('controlbox').set({connected:true});
this.registerMessageHandler();

View File

@ -411,7 +411,10 @@
}, converse));
}, converse));
it("will indate when it has a time difference of more than a day between it and it's predecessor", $.proxy(function () {
it("will indicate when it has a time difference of more than a day between it and its predecessor", $.proxy(function () {
// FIXME: there are issues where with timezones (when
// the browser is in a new day but the XMPP server is in
// the previous day).
spyOn(converse, 'emit');
var contact_name = mock.cur_names[1];
var contact_jid = contact_name.replace(' ','.').toLowerCase() + '@localhost';