[Commits] r424 - in apps/opengeo/geoexplorer/trunk: lib theme

commits at geoext.org commits at geoext.org
Sat Apr 18 18:25:33 CEST 2009


Author: tschaub
Date: 2009-04-18 18:25:33 +0200 (Sat, 18 Apr 2009)
New Revision: 424

Modified:
   apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
   apps/opengeo/geoexplorer/trunk/theme/geoexplorer.css
Log:
Add scale slider, move some buttons around, tweak style.

Modified: apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js	2009-04-18 16:23:22 UTC (rev 423)
+++ apps/opengeo/geoexplorer/trunk/lib/CapabilitiesGrid.js	2009-04-18 16:25:33 UTC (rev 424)
@@ -59,7 +59,7 @@
 
         var expander = new Ext.grid.RowExpander({
             tpl : new Ext.Template(
-                '<p><b>Abstract:</b> {abstract}</p><br>'
+                '<p><b>Abstract:</b> {abstract}</p>'
             )
         });
 
@@ -67,7 +67,7 @@
 
         this.cm = new Ext.grid.ColumnModel([
             expander,
-            {header: "Name", dataIndex: "name", sortable: true},
+            {header: "Name", dataIndex: "name", width: 180, sortable: true},
             {id: "title", header: "Title", dataIndex: "title", sortable: true},
             {header: "Queryable", dataIndex: "queryable"}
         ]);

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-04-18 16:23:22 UTC (rev 423)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-04-18 16:25:33 UTC (rev 424)
@@ -151,6 +151,14 @@
             // TODO: update the OpenLayers.Map constructor to accept an initial zoom
             zoom: mapConfig.zoom,
             items: [
+                {
+                    xtype: "gx_scaleslider",
+                    vertical: true,
+                    height: 100,
+                    plugins: new GeoExt.ScaleSliderTip({
+                        template: "<div>Zoom Level: {zoom}</div>"
+                    })
+                },
                 this.createMapOverlay()
             ]
         });
@@ -219,7 +227,7 @@
                         scope: this
                     },
                     removeLayerAction
-                ],
+                ]
             })
         });
 
@@ -230,9 +238,8 @@
             title: "Layers",
             items: [layerTree],
             tbar: [
-                "->",
-                Ext.apply(new Ext.Button(removeLayerAction), {text: ""}),
-                addLayerButton
+                addLayerButton,
+                Ext.apply(new Ext.Button(removeLayerAction), {text: ""})
             ]
         });
 
@@ -362,8 +369,13 @@
             store: this.capabilities,
             mapPanel : this.mapPanel,
             height: 300,
-            width: 650
-        })
+            width: 600,
+            listeners: {
+                rowdblclick: function(panel, index, evt) {
+                    panel.addLayers();
+                }
+            }
+        });
 
         this.capGrid = new Ext.Window({
             title: "Available Layers",
@@ -374,19 +386,19 @@
             bbar: [
                 "->",
                 new Ext.Button({
-                    text: "Done",
-                    handler: function() {
-                        this.capGrid.hide();
-                    },
-                    scope: this
-                }),
-                new Ext.Button({
                     text: "Add Layers",
                     iconCls: "icon-addlayers",
                     handler: function(){
                         capGridPanel.addLayers()
                     },
                     scope : this
+                }),
+                new Ext.Button({
+                    text: "Done",
+                    handler: function() {
+                        this.capGrid.hide();
+                    },
+                    scope: this
                 })
             ]
         });
@@ -405,7 +417,7 @@
 
     createMapOverlay: function() {
         var scaleLinePanel = new Ext.Panel({
-            cls: 'olControlScaleLine',
+            cls: 'olControlScaleLine x-menu-list-item',
             border: false,
             bodyStyle: 'position: relative'
         });
@@ -560,12 +572,12 @@
             }),
             "-",
             new Ext.Button({
+                tooltip: "Bookmark",
                 handler: this.bookmark,
                 scope: this,
                 iconCls: "icon-save"
             }),
-            "-"
-            ,
+            "-",
             new Ext.Button({
                 tooltip: "Pan Map",
                 iconCls: "icon-pan",

Modified: apps/opengeo/geoexplorer/trunk/theme/geoexplorer.css
===================================================================
--- apps/opengeo/geoexplorer/trunk/theme/geoexplorer.css	2009-04-18 16:23:22 UTC (rev 423)
+++ apps/opengeo/geoexplorer/trunk/theme/geoexplorer.css	2009-04-18 16:25:33 UTC (rev 424)
@@ -4,6 +4,11 @@
     background-position: 0 3px;
 }
 
+/* apply some margin when using the row expander */
+.x-grid3-row-body p {
+    margin: 5px !important;
+}
+
 .icon-geoexplorer {
     background-image: url(img/geoexplorer.gif) !important;
 }
@@ -115,5 +120,13 @@
 
 .olControlZoomPanel .olControlZoomOutItemInactive {
     background-position:15px -255px;
-    top: 20px;
+    top: 123px;
 }
+
+/* position the zoom slider within map panel */
+.gx-scaleslider {
+    top: 90px;
+    left: 17px
+}
+
+



More information about the Commits mailing list