\r
\r
panels: (function() {\r
+ var active_panel;\r
+\r
var fn = function(panel_type) {\r
var panels;\r
\r
}\r
\r
// Active panels / server\r
- panels.active = this.connections.active_panel;\r
+ panels.active = active_panel;\r
panels.server = this.connections.active_connection ?\r
this.connections.active_connection.panels.server :\r
null;\r
\r
_.extend(fn, Backbone.Events);\r
\r
+ // Keep track of the active panel. Channel/query/server or applet\r
+ fn.bind('active', function (new_active_panel) {\r
+ active_panel = new_active_panel;\r
+ });\r
+\r
return fn;\r
})(),\r
\r