Client: Added app.panels() to global object
authorDarren <darren@Darrens-MacBook-Pro.local>
Thu, 16 May 2013 14:28:55 +0000 (15:28 +0100)
committerDarren <darren@Darrens-MacBook-Pro.local>
Thu, 16 May 2013 14:28:55 +0000 (15:28 +0100)
client/assets/dev/model_application.js

index 24046284817cc666932c08059ea47252b7068db3..0fe66b1d18b8b9226cdac55497c1877360029e9f 100644 (file)
@@ -132,7 +132,10 @@ _kiwi.model.Application = function () {
 \r
         this.initializeGlobals = function () {\r
             _kiwi.global.connections = this.connections;\r
-            \r
+\r
+            _kiwi.global.panels = this.panels;\r
+            _kiwi.global.panels.applets = this.applet_panels;\r
+\r
             _kiwi.global.components.Applet = _kiwi.model.Applet;\r
             _kiwi.global.components.Panel =_kiwi.model.Panel;\r
         };\r
@@ -305,7 +308,9 @@ _kiwi.model.Application = function () {
 \r
                 // Active panels / server\r
                 panels.active = this.connections.active_panel;\r
-                panels.server = this.connections.active_connection.panels.server;\r
+                panels.server = this.connections.active_connection ?\r
+                    this.connections.active_connection.panels.server :\r
+                    null;\r
 \r
                 return panels;\r
             };\r