[Commits] r1869 - in sandbox/redlining/ux/FeatureEditing: examples ux/widgets ux/widgets/form

commits at geoext.org commits at geoext.org
Thu Feb 4 15:58:25 CET 2010


Author: adube
Date: 2010-02-04 15:58:25 +0100 (Thu, 04 Feb 2010)
New Revision: 1869

Modified:
   sandbox/redlining/ux/FeatureEditing/examples/ControlerOnlyExample.js
   sandbox/redlining/ux/FeatureEditing/examples/RedLiningPanelExample.js
   sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js
   sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js
Log:
popupOptions, examples now with unanchored popups

Modified: sandbox/redlining/ux/FeatureEditing/examples/ControlerOnlyExample.js
===================================================================
--- sandbox/redlining/ux/FeatureEditing/examples/ControlerOnlyExample.js	2010-02-03 18:52:58 UTC (rev 1868)
+++ sandbox/redlining/ux/FeatureEditing/examples/ControlerOnlyExample.js	2010-02-04 14:58:25 UTC (rev 1869)
@@ -15,7 +15,8 @@
 
     controler = new GeoExt.ux.FeatureEditingControler({
         'cosmetic': true,
-        map: mapPanel.map
+        map: mapPanel.map,
+        popupOptions: {anchored: false, unpinnable: false, draggable: true}
     });
     
     new Ext.Panel({

Modified: sandbox/redlining/ux/FeatureEditing/examples/RedLiningPanelExample.js
===================================================================
--- sandbox/redlining/ux/FeatureEditing/examples/RedLiningPanelExample.js	2010-02-03 18:52:58 UTC (rev 1868)
+++ sandbox/redlining/ux/FeatureEditing/examples/RedLiningPanelExample.js	2010-02-04 14:58:25 UTC (rev 1869)
@@ -18,7 +18,8 @@
         region: "east",
         width: 300,
         //downloadService: 'http://localhost:5000/filemanager/download',
-        map: mapPanel.map
+        map: mapPanel.map,
+        popupOptions: {anchored: false, unpinnable: false, draggable: true}
     });
     
     new Ext.Panel({

Modified: sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js
===================================================================
--- sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js	2010-02-03 18:52:58 UTC (rev 1868)
+++ sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js	2010-02-04 14:58:25 UTC (rev 1869)
@@ -201,6 +201,22 @@
      */
     toggleGroup: null,
 
+    /** api: property[popupOptions]
+     *  ``Object``
+     *  The options hash used when creating GeoExt.Popup objects.
+     */
+    popupOptions: {},
+
+    /** private: property[popupOptions]
+     *  ``Object``
+     *  The default popup options.
+     */
+    defaultPopupOptions: {
+        title: OpenLayers.i18n('Edit Feature'),
+        layout: 'fit',
+        width: 280
+    },
+
     /** private: method[constructor]
      *  Private constructor override.
      */
@@ -670,14 +686,16 @@
         this.featurePanel = new GeoExt.ux.form.FeaturePanel(options);
 
         // display the popup
-        var popup = new GeoExt.Popup({
+        popupOptions = {
             feature: feature,
-            title: OpenLayers.i18n('Edit Feature'),
             controler: this,
-            layout: 'fit',
-            width: 280,
             items: [this.featurePanel]
-        });
+        };
+        popupOptions = OpenLayers.Util.applyDefaults(popupOptions,
+                                                     this.popupOptions);
+        popupOptions = OpenLayers.Util.applyDefaults(popupOptions,
+                                                     this.defaultPopupOptions);
+        var popup = new GeoExt.Popup(popupOptions);
         feature.popup = popup;
         this.popup = popup;
         popup.on({

Modified: sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js
===================================================================
--- sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js	2010-02-03 18:52:58 UTC (rev 1868)
+++ sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js	2010-02-04 14:58:25 UTC (rev 1869)
@@ -54,6 +54,19 @@
      */
     'export': true,
 
+    /** api: property[toggleGroup]
+     *  ``String``
+     *  The name of the group used for the buttons created.  If none is
+     *  provided, it's set to this.map.id.
+     */
+    toggleGroup: null,
+
+    /** api: property[popupOptions]
+     *  ``Object``
+     *  The options hash used when creating GeoExt.Popup objects.
+     */
+    popupOptions: {},
+
     /** private: method[initComponent]
      */
     initComponent: function() {
@@ -83,7 +96,9 @@
             'cosmetic': true,
             'map': this.map,
             'import': this['import'],
-            'export': this['export']
+            'export': this['export'],
+            'toggleGroup': this.toggleGroup,
+            'popupOptions': this.popupOptions
         });
     }
 });



More information about the Commits mailing list