Commit f699fbdb authored by JC Brand's avatar JC Brand

Bugfix. Revert RosterView to previous module where it was executed in delayed fashion

parent 39c0823f
...@@ -1522,8 +1522,10 @@ ...@@ -1522,8 +1522,10 @@
} }
}); });
xmppchat.RosterView = Backbone.View.extend({ xmppchat.RosterView= (function (roster, _, $, console) {
var View = Backbone.View.extend({
el: $('#xmppchat-roster'), el: $('#xmppchat-roster'),
model: roster,
rosteritemviews: {}, rosteritemviews: {},
initialize: function () { initialize: function () {
...@@ -1566,7 +1568,7 @@ ...@@ -1566,7 +1568,7 @@
user_id = Strophe.getNodeFromJid(model.id), user_id = Strophe.getNodeFromJid(model.id),
view = this.rosteritemviews[model.id], view = this.rosteritemviews[model.id],
ask = model.get('ask'), ask = model.get('ask'),
subscription = model.get('subscription'); subscription = model.get('subscription'),
crit = {order:'asc'}; crit = {order:'asc'};
if (ask === 'subscribe') { if (ask === 'subscribe') {
...@@ -1594,8 +1596,12 @@ ...@@ -1594,8 +1596,12 @@
$count.text(this.model.getNumOnlineContacts()); $count.text(this.model.getNumOnlineContacts());
} }
}); });
var view = new View();
return view;
});
xmppchat.XMPPStatus = Backbone.Model.extend({ xmppchat.XMPPStatus = Backbone.Model.extend({
initialize: function () { initialize: function () {
this.set({ this.set({
'status' : this.getStatus(), 'status' : this.getStatus(),
...@@ -1784,7 +1790,7 @@ ...@@ -1784,7 +1790,7 @@
this.chatboxesview = new this.ChatBoxesView({'model': this.chatboxes}); this.chatboxesview = new this.ChatBoxesView({'model': this.chatboxes});
this.roster = new this.RosterItems(); this.roster = new this.RosterItems();
this.rosterview = new this.RosterView({'model':this.roster}); this.rosterview = Backbone.View.extend(this.RosterView(this.roster, _, $, console));
this.connection.addHandler( this.connection.addHandler(
$.proxy(this.roster.subscribeToSuggestedItems, this.roster), $.proxy(this.roster.subscribeToSuggestedItems, this.roster),
......
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