From 0a25c97993c08f66f02b68419c6263ab72b1d77a Mon Sep 17 00:00:00 2001 From: Darren Date: Sat, 20 Dec 2014 17:42:48 +0000 Subject: [PATCH] Hiding bars when last connection is closed --- client/src/models/application.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/models/application.js b/client/src/models/application.js index 46a2262..6c6dac7 100644 --- a/client/src/models/application.js +++ b/client/src/models/application.js @@ -80,6 +80,13 @@ // Takes instances of model_network this.connections = new _kiwi.model.NetworkPanelList(); + // If all connections are removed at some point, hide the bars + this.connections.on('remove', _.bind(function() { + if (this.connections.length === 0) { + this.view.barsHide(); + } + }, this)); + // Applets panel list this.applet_panels = new _kiwi.model.PanelList(); this.applet_panels.view.$el.addClass('panellist applets'); -- 2.25.1