Prototype leak fixes
authorDarren <darren@darrenwhitlen.com>
Sun, 7 Oct 2012 15:36:35 +0000 (16:36 +0100)
committerDarren <darren@darrenwhitlen.com>
Sun, 7 Oct 2012 15:36:35 +0000 (16:36 +0100)
client_backbone/dev/applet_chanlist.js
client_backbone/dev/model_panellist.js
client_backbone/dev/model_server.js
client_backbone/dev/view.js

index 78ac6769519e7364c2fb5187bae9f33e291c0843..8898a2c4469bf9b1b9dc36db7f1f21721b722b26 100644 (file)
@@ -40,9 +40,9 @@
                 });\r
             }\r
 \r
-            //_.each(this.channels, function (chan) {\r
-            //    tbody.append(chan.html);\r
-            //});\r
+            _.each(this.channels, function (chan) {\r
+                tbody.append(chan.html);\r
+            });\r
             table.append(tbody);\r
         }\r
     });\r
index 38f869199776d670d97d58cda7f538279000317e..f16df71361a681fbe46e489ffe7b2bb6aed0dac7 100755 (executable)
@@ -1,9 +1,6 @@
 kiwi.model.PanelList = Backbone.Collection.extend({\r
     model: kiwi.model.Panel,\r
 \r
-    // Holds the active panel\r
-    active: null,\r
-\r
     comparator: function (chan) {\r
         return chan.get("name");\r
     },\r
@@ -14,6 +11,9 @@ kiwi.model.PanelList = Backbone.Collection.extend({
         this.add(new kiwi.model.Server({'name': kiwi.gateway.get('name')}));\r
         this.server = this.getByName(kiwi.gateway.get('name'));\r
 \r
+        // Holds the active panel\r
+        this.active = null;\r
+\r
         // Keep a tab on the active panel\r
         this.bind('active', function (active_panel) {\r
             this.active = active_panel;\r
index eb64e14d3827df36da3afac2ef3acd98d9493709..55e567fe0dee4cca6c76c07b71886009c9f526ed 100755 (executable)
@@ -2,8 +2,6 @@ kiwi.model.Server = kiwi.model.Panel.extend({
     // Used to determine if this is a server panel\r
     server: true,\r
 \r
-    server_login: null,\r
-\r
     initialize: function (attributes) {\r
         var name = "Server";\r
         this.view = new kiwi.view.Panel({"model": this, "name": name});\r
index 1ee929b3a6ec562d1ceb2f63c4add5055175260c..8fb20be56d3a55dee49773cb2f021d0ded4174bc 100755 (executable)
@@ -35,10 +35,8 @@ kiwi.view.MemberList = Backbone.View.extend({
 });\r
 \r
 \r
-kiwi.view.UserBox = Backbone.View.extend({\r
-    // Member this userbox is relating to\r
-    member: {},\r
 \r
+kiwi.view.UserBox = Backbone.View.extend({\r
     events: {\r
         'click .query': 'queryClick',\r
         'click .info': 'infoClick'\r
@@ -236,12 +234,6 @@ kiwi.view.Panel = Backbone.View.extend({
         "click .chan": "chanClick"\r
     },\r
 \r
-    // none=0, action=1, activity=2, highlight=3\r
-    alert_level: 0,\r
-\r
-    // The container this panel is within\r
-    $container: null,\r
-\r
     initialize: function (options) {\r
         this.initializePanel(options);\r
     },\r
@@ -259,6 +251,8 @@ kiwi.view.Panel = Backbone.View.extend({
 \r
         this.$el.appendTo(this.$container);\r
 \r
+        this.alert_level = 0;\r
+\r
         this.model.bind('msg', this.newMsg, this);\r
         this.msg_count = 0;\r
 \r
@@ -442,9 +436,6 @@ kiwi.view.Channel = kiwi.view.Panel.extend({
 \r
 // Model for this = kiwi.model.PanelList\r
 kiwi.view.Tabs = Backbone.View.extend({\r
-    tabs_applets: null,\r
-    tabs_msg: null,\r
-\r
     events: {\r
         'click li': 'tabClick',\r
         'click li img': 'partClick'\r
@@ -601,15 +592,6 @@ kiwi.view.TopicBar = Backbone.View.extend({
 \r
 \r
 kiwi.view.ControlBox = Backbone.View.extend({\r
-    buffer: [],  // Stores previously run commands\r
-    buffer_pos: 0,  // The current position in the buffer\r
-\r
-    // Hold tab autocomplete data\r
-    tabcomplete: {active: false, data: [], prefix: ''},\r
-\r
-    // Instance of InputPreProcessor\r
-    preprocessor: null,\r
-\r
     events: {\r
         'keydown input.inp': 'process',\r
         'click .nick': 'showNickChange'\r
@@ -618,9 +600,15 @@ kiwi.view.ControlBox = Backbone.View.extend({
     initialize: function () {\r
         var that = this;\r
 \r
+        this.buffer = [];  // Stores previously run commands\r
+        this.buffer_pos = 0;  // The current position in the buffer\r
+\r
         this.preprocessor = new InputPreProcessor();\r
         this.preprocessor.recursive_depth = 5;\r
 \r
+        // Hold tab autocomplete data\r
+        this.tabcomplete = {active: false, data: [], prefix: ''};\r
+\r
         kiwi.gateway.bind('change:nick', function () {\r
             $('.nick', that.$el).text(this.get('nick'));\r
         });\r
@@ -787,11 +775,11 @@ kiwi.view.ControlBox = Backbone.View.extend({
 \r
 \r
 kiwi.view.StatusMessage = Backbone.View.extend({\r
-    /* Timer for hiding the message */\r
-    tmr: null,\r
-\r
     initialize: function () {\r
         this.$el.hide();\r
+\r
+        // Timer for hiding the message after X seconds\r
+        this.tmr = null;\r
     },\r
 \r
     text: function (text, opt) {\r
@@ -838,10 +826,10 @@ kiwi.view.ResizeHandler = Backbone.View.extend({
         'mouseup': 'stopDrag'\r
     },\r
 \r
-    dragging: false,\r
-    starting_width: {},\r
-\r
     initialize: function () {\r
+        this.dragging = false;\r
+        this.starting_width = {};\r
+\r
         $(window).on('mousemove', $.proxy(this.onDrag, this));\r
     },\r
 \r