[fusion-commits] r1643 - trunk/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Nov 6 13:32:54 EST 2008


Author: pagameba
Date: 2008-11-06 13:32:54 -0500 (Thu, 06 Nov 2008)
New Revision: 1643

Modified:
   trunk/widgets/Print.js
Log:
Fixes #153.  Jx no longer provides the getObj interface, it was removed as unnecessary because getElementById is now supported on sub-elements by MooTools.  The Print dialog code was not updated to remove the use of getObj.

Modified: trunk/widgets/Print.js
===================================================================
--- trunk/widgets/Print.js	2008-11-06 18:30:46 UTC (rev 1642)
+++ trunk/widgets/Print.js	2008-11-06 18:32:54 UTC (rev 1643)
@@ -84,13 +84,10 @@
                 label: OpenLayers.i18n('printTitle'),
                 id: 'printablePage',
                 contentURL : this.dialogContentURL,
-                onContentLoad: OpenLayers.Function.bind(this.contentLoaded, this),
-                imageBaseUrl: this.imageBaseUrl,
+                onContentLoaded: OpenLayers.Function.bind(this.contentLoaded, this),
                 width: 350,
                 height: 250,
                 resize: true,
-                top: (size.height-250)/2,
-                left: (size.width-350)/2,
                 toolbars: [toolbar]
             };
             var d = new Jx.Dialog(o);
@@ -130,29 +127,25 @@
     },
     
     contentLoaded: function(dialog) {
-        dialog.registerIds(['dialogPrintShowtitle', 
-                                 'dialogPrintTitle',
-                                 'dialogPrintShowlegend',
-                                 'dialogPrintShowNorthArrow'], dialog.content);
-        dialog.getObj('dialogPrintShowtitle').checked = this.showTitle;
-        dialog.getObj('dialogPrintTitle').value = this.pageTitle;
-        dialog.getObj('dialogPrintTitle').disabled = !this.showTitle;
-        dialog.getObj('dialogPrintShowlegend').checked = this.showLegend;
-        dialog.getObj('dialogPrintShowNorthArrow').checked = this.showNorthArrow;
+        dialog.content.getElementById('dialogPrintShowtitle').checked = this.showTitle;
+        dialog.content.getElementById('dialogPrintTitle').value = this.pageTitle;
+        dialog.content.getElementById('dialogPrintTitle').disabled = !this.showTitle;
+        dialog.content.getElementById('dialogPrintShowlegend').checked = this.showLegend;
+        dialog.content.getElementById('dialogPrintShowNorthArrow').checked = this.showNorthArrow;
         
-         OpenLayers.Event.observe(dialog.getObj('dialogPrintShowtitle'), 'click', OpenLayers.Function.bind(this.controlTitle, this));
+         OpenLayers.Event.observe(dialog.content.getElementById('dialogPrintShowtitle'), 'click', OpenLayers.Function.bind(this.controlTitle, this));
     },
     
     controlTitle: function() {
-        this.dialog.getObj('dialogPrintTitle').disabled = !this.dialog.getObj('dialogPrintShowtitle').checked;
+        this.dialog.content.getElementById('dialogPrintTitle').disabled = !this.dialog.content.getElementById('dialogPrintShowtitle').checked;
         
     },
     
     generate: function() {
-        this.showTitle = this.dialog.getObj('dialogPrintShowtitle').checked;
-        this.pageTitle = this.dialog.getObj('dialogPrintTitle').value;
-        this.showLegend = this.dialog.getObj('dialogPrintShowlegend').checked;
-        this.showNorthArrow = this.dialog.getObj('dialogPrintShowNorthArrow').checked;
+        this.showTitle = this.dialog.content.getElementById('dialogPrintShowtitle').checked;
+        this.pageTitle = this.dialog.content.getElementById('dialogPrintTitle').value;
+        this.showLegend = this.dialog.content.getElementById('dialogPrintShowlegend').checked;
+        this.showNorthArrow = this.dialog.content.getElementById('dialogPrintShowNorthArrow').checked;
         this.openPrintable();
     },
     



More information about the fusion-commits mailing list