c814960c0376cd8130027071c41d6bfbf9d24f2f
1 // Model for this = _kiwi.model.NetworkPanelList
2 _kiwi
.view
.NetworkTabs
= Backbone
.View
.extend({
4 className
: 'connections',
6 initialize: function() {
7 this.model
.on('add', this.networkAdded
, this);
8 this.model
.on('remove', this.networkRemoved
, this);
10 this.$el
.appendTo(_kiwi
.app
.view
.$el
.find('.tabs'));
13 networkAdded: function(network
) {
14 $('<li class="connection"></li>')
15 .append(network
.panels
.view
.$el
)
19 networkRemoved: function(network
) {
20 // Remove the containing list element
21 network
.panels
.view
.$el
.parent().remove();
23 network
.panels
.view
.remove();
25 _kiwi
.app
.view
.doLayout();