[Commits] r1202 - apps/opengeo/geoexplorer/trunk/src/script/app

commits at geoext.org commits at geoext.org
Thu Jul 2 07:04:15 CEST 2009


Author: tschaub
Date: 2009-07-02 07:04:15 +0200 (Thu, 02 Jul 2009)
New Revision: 1202

Modified:
   apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js
Log:
Removing base store/grid stuff.

Modified: apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js	2009-07-02 04:47:12 UTC (rev 1201)
+++ apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js	2009-07-02 05:04:15 UTC (rev 1202)
@@ -682,7 +682,7 @@
 
         var firstSource = this.layerSources.getAt(0);
 
-        var capGridConfig = {
+        var capGridPanel = new GeoExplorer.CapabilitiesGrid({
             store: firstSource.data.store,
             mapPanel : this.mapPanel,
             layout: 'fit',
@@ -694,12 +694,9 @@
                     panel.addLayers();
                 }
             }
-        };
+        });
 
-        var capGridPanel = new GeoExplorer.CapabilitiesGrid(capGridConfig);
-        var baseCapGridPanel = new GeoExplorer.CapabilitiesGrid(capGridConfig);
-
-        var sourceComboConfig = {
+        var sourceComboBox = new Ext.form.ComboBox({
             store: this.layerSources,
             valueField: "identifier",
             displayField: "name",
@@ -708,21 +705,16 @@
             allowBlank: false,
             forceSelection: true,
             mode: "local",
-            value: firstSource.data.identifier
-        };
+            value: firstSource.data.identifier,
+            listeners: {
+                select: function(combo, record, index) {
+                    capGridPanel.reconfigure(record.data.store, capGridPanel.getColumnModel());
+                },
+                scope: this
+            }
+        });
 
-        var sourceComboBox = new Ext.form.ComboBox(sourceComboConfig);
-        sourceComboBox.on("select", function(combo, record, index) {
-            capGridPanel.reconfigure(record.data.store, capGridPanel.getColumnModel());
-        }, this);
-
-        var baseSourceComboBox = new Ext.form.ComboBox(sourceComboConfig);
-        baseSourceComboBox.on("select", function(combo, record, index) {
-            capGridPanel.reconfigure(record.data.store, baseCapGridPanel.getColumnModel());
-        }, this);
-
         var capGridToolbar = null;
-        var baseCapGridToolbar = null;
 
         if (this.proxy || this.layerSources.getCount() > 1) {
             capGridToolbar = [
@@ -731,12 +723,6 @@
                 }),
                 sourceComboBox
             ];
-            baseCapGridToolbar = [
-                new Ext.Toolbar.TextItem({
-                    text: "View available data from:"
-                }),
-                baseSourceComboBox
-            ];
         }
 
         if (this.proxy) {
@@ -746,12 +732,6 @@
                     newSourceWindow.show();
                 }
             }));
-            baseCapGridToolbar.push(new Ext.Button({
-                text: "or add a new server.",
-                handler: function() {
-                    newSourceWindow.show();
-                }
-            }));
         }
 
         var newSourceWindow = new GeoExplorer.NewSourceWindow();
@@ -814,53 +794,12 @@
                 }
             }
         });
-
-        this.baseCapGrid = new Ext.Window({
-            title: "Available Base Layers",
-            closeAction: 'hide',
-            layout: 'border',
-            height: 300,
-            width: 600,
-            modal: true,
-            items: [
-                baseCapGridPanel
-            ],
-            tbar: baseCapGridToolbar,
-            bbar: [
-                "->",
-                new Ext.Button({
-                    text: "Add Base Layers",
-                    iconCls: "icon-addlayers",
-                    handler: function(){
-                        baseCapGridPanel.addLayers(true);
-                    },
-                    scope : this
-                }),
-                new Ext.Button({
-                    text: "Done",
-                    handler: function() {
-                        this.baseCapGrid.hide();
-                    },
-                    scope: this
-                })
-            ]
-        });
  
     },
 
     /** private: method[showCapabilitiesGrid]
      * Shows the window with a capabilities grid.
      */
-    showBaseCapabilitiesGrid: function() {
-        if(!this.capGrid) {
-            this.initCapGrid();
-        }
-        this.baseCapGrid.show();
-    },
-
-    /** private: method[showCapabilitiesGrid]
-     * Shows the window with a capabilities grid.
-     */
     showCapabilitiesGrid: function() {
         if(!this.capGrid) {
             this.initCapGrid();



More information about the Commits mailing list