Changeset 1202

Show
Ignore:
Timestamp:
07/02/09 07:04:15 (4 years ago)
Author:
tschaub
Message:

Removing base store/grid stuff.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js

    r1201 r1202  
    683683        var firstSource = this.layerSources.getAt(0); 
    684684 
    685         var capGridConfig =
     685        var capGridPanel = new GeoExplorer.CapabilitiesGrid(
    686686            store: firstSource.data.store, 
    687687            mapPanel : this.mapPanel, 
     
    695695                } 
    696696            } 
    697         }; 
    698  
    699         var capGridPanel = new GeoExplorer.CapabilitiesGrid(capGridConfig); 
    700         var baseCapGridPanel = new GeoExplorer.CapabilitiesGrid(capGridConfig); 
    701  
    702         var sourceComboConfig = { 
     697        }); 
     698 
     699        var sourceComboBox = new Ext.form.ComboBox({ 
    703700            store: this.layerSources, 
    704701            valueField: "identifier", 
     
    709706            forceSelection: true, 
    710707            mode: "local", 
    711             value: firstSource.data.identifier 
    712         }; 
    713  
    714         var sourceComboBox = new Ext.form.ComboBox(sourceComboConfig); 
    715         sourceComboBox.on("select", function(combo, record, index) { 
    716             capGridPanel.reconfigure(record.data.store, capGridPanel.getColumnModel()); 
    717         }, this); 
    718  
    719         var baseSourceComboBox = new Ext.form.ComboBox(sourceComboConfig); 
    720         baseSourceComboBox.on("select", function(combo, record, index) { 
    721             capGridPanel.reconfigure(record.data.store, baseCapGridPanel.getColumnModel()); 
    722         }, this); 
     708            value: firstSource.data.identifier, 
     709            listeners: { 
     710                select: function(combo, record, index) { 
     711                    capGridPanel.reconfigure(record.data.store, capGridPanel.getColumnModel()); 
     712                }, 
     713                scope: this 
     714            } 
     715        }); 
    723716 
    724717        var capGridToolbar = null; 
    725         var baseCapGridToolbar = null; 
    726718 
    727719        if (this.proxy || this.layerSources.getCount() > 1) { 
     
    732724                sourceComboBox 
    733725            ]; 
    734             baseCapGridToolbar = [ 
    735                 new Ext.Toolbar.TextItem({ 
    736                     text: "View available data from:" 
    737                 }), 
    738                 baseSourceComboBox 
    739             ]; 
    740726        } 
    741727 
    742728        if (this.proxy) { 
    743729            capGridToolbar.push(new Ext.Button({ 
    744                 text: "or add a new server.", 
    745                 handler: function() { 
    746                     newSourceWindow.show(); 
    747                 } 
    748             })); 
    749             baseCapGridToolbar.push(new Ext.Button({ 
    750730                text: "or add a new server.", 
    751731                handler: function() { 
     
    815795            } 
    816796        }); 
    817  
    818         this.baseCapGrid = new Ext.Window({ 
    819             title: "Available Base Layers", 
    820             closeAction: 'hide', 
    821             layout: 'border', 
    822             height: 300, 
    823             width: 600, 
    824             modal: true, 
    825             items: [ 
    826                 baseCapGridPanel 
    827             ], 
    828             tbar: baseCapGridToolbar, 
    829             bbar: [ 
    830                 "->", 
    831                 new Ext.Button({ 
    832                     text: "Add Base Layers", 
    833                     iconCls: "icon-addlayers", 
    834                     handler: function(){ 
    835                         baseCapGridPanel.addLayers(true); 
    836                     }, 
    837                     scope : this 
    838                 }), 
    839                 new Ext.Button({ 
    840                     text: "Done", 
    841                     handler: function() { 
    842                         this.baseCapGrid.hide(); 
    843                     }, 
    844                     scope: this 
    845                 }) 
    846             ] 
    847         }); 
    848797  
    849     }, 
    850  
    851     /** private: method[showCapabilitiesGrid] 
    852      * Shows the window with a capabilities grid. 
    853      */ 
    854     showBaseCapabilitiesGrid: function() { 
    855         if(!this.capGrid) { 
    856             this.initCapGrid(); 
    857         } 
    858         this.baseCapGrid.show(); 
    859798    }, 
    860799