_kiwi.model.Channel = _kiwi.model.Panel.extend({\r
initialize: function (attributes) {\r
var name = this.get("name") || "",\r
- members,\r
- that = this;\r
+ members;\r
\r
- this.view = new _kiwi.view.Channel({"model": this, "name": name});\r
this.set({\r
"members": new _kiwi.model.MemberList(),\r
"name": name,\r
"topic": ""\r
}, {"silent": true});\r
\r
+ this.view = new _kiwi.view.Channel({"model": this, "name": name});\r
+\r
members = this.get("members");\r
members.channel = this;\r
members.bind("add", function (member) {\r
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();
});
}