Merge with development branch x2
authorDarren <darren@Darrens-MacBook-Pro.local>
Sun, 21 Apr 2013 15:04:35 +0000 (16:04 +0100)
committerDarren <darren@Darrens-MacBook-Pro.local>
Sun, 21 Apr 2013 15:04:35 +0000 (16:04 +0100)
client/assets/dev/model_network.js

index 56f64ccf9c56b0d8e9feb3ba797d6a26074167f5..18ccda6eb6d9485a696701ffab1c6bd37fcdfe1e 100644 (file)
@@ -75,8 +75,6 @@
             this.gateway.on('whois', onWhois, this);
             this.gateway.on('away', onAway, this);
             this.gateway.on('list_start', onListStart, this);
-            this.gateway.on('list_channel', onListChannel, this);
-            this.gateway.on('list_end', onListEnd, this);
         }
     });
 
 
 
     function onListStart(event) {
-        if (_kiwi.app.channel_list) {
-            _kiwi.app.channel_list.close();
-            delete _kiwi.app.channel_list;
-        }
-
-        var panel = new _kiwi.model.Applet(),
-            applet = new _kiwi.applets.Chanlist();
-
-        panel.load(applet);
-
-        _kiwi.app.panels.add(panel);
-        panel.view.show();
-
-        _kiwi.app.channel_list = applet;
-    }
-
-
-
-    function onListChannel(event) {
-        // TODO: Put this listener within the applet itself
-        _kiwi.app.channel_list.addChannel(event.chans);
-    }
-
-
-
-    function onListEnd(event) {
-        // TODO: Put this listener within the applet itself
-        delete _kiwi.app.channel_list;
+        var chanlist = _kiwi.model.Applet.loadOnce('kiwi_chanlist');
+        chanlist.view.show();
     }