\r
this.model.on('active', this.panelActive, this);\r
\r
- this.tabs_applets = $('ul.applets', this.$el);\r
- this.tabs_msg = $('ul.channels', this.$el);\r
+ //this.tabs_applets = $('ul.applets', this.$el);\r
+ //this.tabs_msg = $('ul.channels', this.$el);\r
\r
this.model.network.on('change:name', function (network, new_val) {\r
$('span', this.model.server.tab).text(new_val);\r
}, this);\r
\r
- $('#kiwi .panellist.channels').append(this.$el);\r
+ this.$tab_container = $('#kiwi .panellist.channels');\r
+ this.$tab_container.append(this.$el);\r
},\r
\r
render: function () {\r
var that = this;\r
\r
- this.tabs_msg.empty();\r
+ this.$el.empty();\r
\r
// Add the server tab first\r
this.model.server.tab\r
.data('panel', this.model.server)\r
- .appendTo(this.tabs_msg);\r
+ .appendTo(this.$el);\r
\r
// Go through each panel adding its tab\r
this.model.forEach(function (panel) {\r
panelActive: function (panel, previously_active_panel) {\r
// Remove any existing tabs or part images\r
$('.part', this.$el).remove();\r
- this.tabs_applets.children().removeClass('active');\r
- this.tabs_msg.children().removeClass('active');\r
+ this.$tab_container.find('.active').removeClass('active');\r
\r
panel.tab.addClass('active');\r
\r
},\r
\r
next: function () {\r
- var next = _kiwi.app.panels.active.tab.next();\r
- if (!next.length) next = $('li:first', this.tabs_msgs);\r
+ var next = this.$tab_container.find('.active').next();\r
+ if (!next.length) next = $('li:first', this.$tab_container);\r
\r
next.click();\r
},\r
prev: function () {\r
- var prev = _kiwi.app.panels.active.tab.prev();\r
- if (!prev.length) prev = $('li:last', this.tabs_msgs);\r
+ var prev = this.$tab_container.find('.active').prev();\r
+ if (!prev.length) prev = $('li:last', this.$tab_container);\r
\r
prev.click();\r
}\r