[Commits] r1852 - in sandbox/ahocevar/playground/trunk/geoext: examples lib/GeoExt/plugins

commits at geoext.org commits at geoext.org
Sun Jan 31 19:02:05 CET 2010


Author: ahocevar
Date: 2010-01-31 19:02:05 +0100 (Sun, 31 Jan 2010)
New Revision: 1852

Modified:
   sandbox/ahocevar/playground/trunk/geoext/examples/print-form.js
   sandbox/ahocevar/playground/trunk/geoext/lib/GeoExt/plugins/PrintPageField.js
   sandbox/ahocevar/playground/trunk/geoext/lib/GeoExt/plugins/PrintProviderField.js
Log:
Improvements from Bart's review.

Modified: sandbox/ahocevar/playground/trunk/geoext/examples/print-form.js
===================================================================
--- sandbox/ahocevar/playground/trunk/geoext/examples/print-form.js	2010-01-31 15:38:21 UTC (rev 1851)
+++ sandbox/ahocevar/playground/trunk/geoext/examples/print-form.js	2010-01-31 18:02:05 UTC (rev 1852)
@@ -51,7 +51,7 @@
         zoom: 6
     });
     // The form with fields controlling the print output
-    var formPanel = new GeoExt.form.FormPanel({
+    var formPanel = new Ext.form.FormPanel({
         region: "west",
         width: 150,
         bodyStyle: "padding:5px",

Modified: sandbox/ahocevar/playground/trunk/geoext/lib/GeoExt/plugins/PrintPageField.js
===================================================================
--- sandbox/ahocevar/playground/trunk/geoext/lib/GeoExt/plugins/PrintPageField.js	2010-01-31 15:38:21 UTC (rev 1851)
+++ sandbox/ahocevar/playground/trunk/geoext/lib/GeoExt/plugins/PrintPageField.js	2010-01-31 18:02:05 UTC (rev 1852)
@@ -171,7 +171,6 @@
         this.printPage.un("change", this.onPageChange, this);
         this.printPage.printProvider.un("layoutchange", this.onLayoutChange,
             this);
-        GeoExt.plugins.PrintPageField.superclass.destroy.apply(this, arguments);
     }
 
 });

Modified: sandbox/ahocevar/playground/trunk/geoext/lib/GeoExt/plugins/PrintProviderField.js
===================================================================
--- sandbox/ahocevar/playground/trunk/geoext/lib/GeoExt/plugins/PrintProviderField.js	2010-01-31 15:38:21 UTC (rev 1851)
+++ sandbox/ahocevar/playground/trunk/geoext/lib/GeoExt/plugins/PrintProviderField.js	2010-01-31 18:02:05 UTC (rev 1852)
@@ -15,7 +15,9 @@
 
 /** api: example
  *  A form with combo boxes for layout and resolution, and a text field for a
- *  map title. The latter is a custom parameter to the print module:
+ *  map title. The latter is a custom parameter to the print module, which is
+ *  a default for all print pages. For setting custom parameters on the page
+ *  level, use :class:`GeoExt.plugins.PrintPageField`):
  * 
  *  .. code-block:: javascript
  *     
@@ -164,8 +166,19 @@
         if(!this._updating) {
             this.target.setValue(rec.get(this.target.displayField));
         }
+    },
+    
+    /** private: method[destroy]
+     */
+    destroy: function() {
+        this.target.un("render", this.onRender, this);
+        this.target.un("select", this.onFieldChange, this);
+        this.target.un("valid", this.onFieldChange, this);
+        this.printProvider.un("layoutchange", this.onProviderChange, this);
+        this.printProvider.un("dpichange", this.onProviderChange,
+            this);
     }
-    
+
 });
 
 /** api: ptype = gx_printproviderfield */



More information about the Commits mailing list