[Commits] r873 - apps/opengeo/geoexplorer/trunk/lib/GeoExplorer

commits at geoext.org commits at geoext.org
Wed May 27 22:18:09 CEST 2009


Author: dwins
Date: 2009-05-27 22:18:09 +0200 (Wed, 27 May 2009)
New Revision: 873

Added:
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Wizard.js
Log:
Actually add the Wizard class (oops)


Added: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Wizard.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Wizard.js	                        (rev 0)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/Wizard.js	2009-05-27 20:18:09 UTC (rev 873)
@@ -0,0 +1,28 @@
+Ext.namespace("GeoExplorer");
+
+GeoExplorer.Wizard = function(config) { 
+    Ext.applyIf(config, {
+        layout: 'card',
+        activeItem: 0,
+        tbar: [],
+        items: []
+    });
+
+    for (var i = 0, len = config.pages.length; i < len; i++) {
+        if (i !== 0) config.tbar.push({text: '&rarr;', disabled: true});
+        config.tbar.push({
+            text: config.pages[i].title, 
+            handler: function(x) {
+                return function() { this.layout.setActiveItem(x); this.doLayout(); };
+            }(config.items.length),
+            scope: this
+        });
+
+        config.items.push(config.pages[i].panel);
+    }
+
+    GeoExplorer.Wizard.superclass.constructor.call(this, config);
+};
+
+Ext.extend(GeoExplorer.Wizard, Ext.Window);
+



More information about the Commits mailing list