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
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
});\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
"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
\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
\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
\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
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
\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
'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