From fdf0c026175944c37ff5e04f9ac509e9dc477c89 Mon Sep 17 00:00:00 2001 From: Darren Date: Sat, 25 May 2013 19:29:06 +0100 Subject: [PATCH] Polishing join-fix --- client/assets/src/models/channel.js | 6 +++--- client/assets/src/views/channel.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/assets/src/models/channel.js b/client/assets/src/models/channel.js index 965c710..8e90c83 100644 --- a/client/assets/src/models/channel.js +++ b/client/assets/src/models/channel.js @@ -3,10 +3,8 @@ _kiwi.model.Channel = _kiwi.model.Panel.extend({ initialize: function (attributes) { var name = this.get("name") || "", - members, - that = this; + members; - this.view = new _kiwi.view.Channel({"model": this, "name": name}); this.set({ "members": new _kiwi.model.MemberList(), "name": name, @@ -14,6 +12,8 @@ _kiwi.model.Channel = _kiwi.model.Panel.extend({ "topic": "" }, {"silent": true}); + this.view = new _kiwi.view.Channel({"model": this, "name": name}); + members = this.get("members"); members.channel = this; members.bind("add", function (member) { diff --git a/client/assets/src/views/channel.js b/client/assets/src/views/channel.js index d0dc91a..3c84ead 100644 --- a/client/assets/src/views/channel.js +++ b/client/assets/src/views/channel.js @@ -15,8 +15,8 @@ _kiwi.view.Channel = _kiwi.view.Panel.extend({ this.model.bind('change:topic', this.topic, this); this.model.get('members').bind('add', function (member) { - if (member.get('nick') === that.collection.network.get('nick')) { - this.view.$el.find('.initial_loader').slideUp(function () { + if (member.get('nick') === this.model.collection.network.get('nick')) { + this.$el.find('.initial_loader').slideUp(function () { $(this).remove(); }); } -- 2.25.1