Commit 3cfcb2ae authored by JC Brand's avatar JC Brand

2 controlbox bugfixes and spec typo.

* Save controlbox to containing collection
* Call refreshWebkit after closing controlbox
parent 7e0bb8b1
...@@ -511,7 +511,7 @@ ...@@ -511,7 +511,7 @@
this.registerRosterHandler(); this.registerRosterHandler();
this.registerRosterXHandler(); this.registerRosterXHandler();
this.registerPresenceHandler(); this.registerPresenceHandler();
// No create the view which will fetch roster items from // Now create the view which will fetch roster items from
// localStorage // localStorage
this.rosterview = new this.RosterView({'model':this.roster}); this.rosterview = new this.RosterView({'model':this.roster});
}; };
...@@ -1824,6 +1824,7 @@ ...@@ -1824,6 +1824,7 @@
hide: function (callback) { hide: function (callback) {
this.$el.hide('fast', function () { this.$el.hide('fast', function () {
converse.refreshWebkit();
converse.emit('onChatBoxClosed', this); converse.emit('onChatBoxClosed', this);
converse.controlboxtoggle.show(function () { converse.controlboxtoggle.show(function () {
if (typeof callback === "function") { if (typeof callback === "function") {
...@@ -2398,6 +2399,7 @@ ...@@ -2398,6 +2399,7 @@
}); });
} }
this.get('controlbox').fetch(); this.get('controlbox').fetch();
this.get('controlbox').save();
// This line below will make sure the Roster is set up // This line below will make sure the Roster is set up
this.get('controlbox').set({connected:true}); this.get('controlbox').set({connected:true});
this.registerMessageHandler(); this.registerMessageHandler();
......
...@@ -411,7 +411,10 @@ ...@@ -411,7 +411,10 @@
}, converse)); }, converse));
}, 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'); spyOn(converse, 'emit');
var contact_name = mock.cur_names[1]; var contact_name = mock.cur_names[1];
var contact_jid = contact_name.replace(' ','.').toLowerCase() + '@localhost'; var contact_jid = contact_name.replace(' ','.').toLowerCase() + '@localhost';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment