[Commits] r394 - apps/opengeo/geoexplorer/trunk/lib

commits at geoext.org commits at geoext.org
Wed Apr 15 09:14:14 CEST 2009


Author: tschaub
Date: 2009-04-15 09:14:13 +0200 (Wed, 15 Apr 2009)
New Revision: 394

Modified:
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
   apps/opengeo/geoexplorer/trunk/lib/Viewer.js
Log:
Enable toolbar when application is ready.

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-04-15 07:06:43 UTC (rev 393)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-04-15 07:14:13 UTC (rev 394)
@@ -209,6 +209,14 @@
                 layersContainer, legendContainer
             ]
         });
+        
+        var toolbar = new Ext.Toolbar({
+            xtype: "toolbar",
+            region: "north",
+            disabled: true,
+            items: this.createTools()
+        });
+        this.on("ready", function() {toolbar.enable()});
 
         var viewport = new Ext.Viewport({
             layout: "fit",
@@ -217,11 +225,7 @@
                 layout: "border",
                 deferredRender: false,
                 items: [
-                    {
-                        xtype: "toolbar",
-                        region: "north",
-                        items: this.createTools()
-                    },
+                    toolbar,
                     this.mapPanel,
                     westPanel
                 ]
@@ -243,6 +247,8 @@
 
         // initialize tooltips
         Ext.QuickTips.init();
+        
+        this.fireEvent("ready");
 
     },
     

Modified: apps/opengeo/geoexplorer/trunk/lib/Viewer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/Viewer.js	2009-04-15 07:06:43 UTC (rev 393)
+++ apps/opengeo/geoexplorer/trunk/lib/Viewer.js	2009-04-15 07:14:13 UTC (rev 394)
@@ -28,10 +28,10 @@
         // add any custom application events
         this.addEvents(
             /**
-             * Event: afterlayout
-             * Fires when the layout has been rendered.
+             * Event: ready
+             * Fires when application is ready for user interaction.
              */
-            "afterlayout"
+            "ready"
         );
         
         this.load();



More information about the Commits mailing list