[Commits] r1688 - in sandbox/cmoullet/ux/LayerManager: examples ux/data

commits at geoext.org commits at geoext.org
Sat Jan 9 07:08:58 CET 2010


Author: cmoullet
Date: 2010-01-09 07:08:58 +0100 (Sat, 09 Jan 2010)
New Revision: 1688

Modified:
   sandbox/cmoullet/ux/LayerManager/examples/LayerManagerExample.js
   sandbox/cmoullet/ux/LayerManager/ux/data/Export.js
   sandbox/cmoullet/ux/LayerManager/ux/data/Import.js
Log:
Add new export parameters

Modified: sandbox/cmoullet/ux/LayerManager/examples/LayerManagerExample.js
===================================================================
--- sandbox/cmoullet/ux/LayerManager/examples/LayerManagerExample.js	2010-01-09 05:11:56 UTC (rev 1687)
+++ sandbox/cmoullet/ux/LayerManager/examples/LayerManagerExample.js	2010-01-09 06:08:58 UTC (rev 1688)
@@ -58,7 +58,7 @@
         text: 'Export KML',
         enableToggle: false,
         handler: function() {
-            GeoExt.ux.data.Export.KMLExport(map, sundials);
+            GeoExt.ux.data.Export.KMLExport(map, [sundials], null, null);
         }
     });
 

Modified: sandbox/cmoullet/ux/LayerManager/ux/data/Export.js
===================================================================
--- sandbox/cmoullet/ux/LayerManager/ux/data/Export.js	2010-01-09 05:11:56 UTC (rev 1687)
+++ sandbox/cmoullet/ux/LayerManager/ux/data/Export.js	2010-01-09 06:08:58 UTC (rev 1688)
@@ -78,8 +78,13 @@
     exportWindow.close();
 };
 
-GeoExt.ux.data.Export.OpenWindowDownloadify = function() {
-    GeoExt.ux.data.Export.exportWindow = window.open("../ux/data/ExportWindow.html", "_blank", "menubar=1,scrollbars=1,width=800,height=600");
+GeoExt.ux.data.Export.OpenWindowDownloadify = function(exportWindowLocation) {
+    if (exportWindowLocation) {
+       GeoExt.ux.data.Export.exportWindow = window.open(exportWindowLocation, "_blank", "menubar=1,scrollbars=1,width=800,height=600");    
+    } else {
+       GeoExt.ux.data.Export.exportWindow = window.open("../ux/data/ExportWindow.html", "_blank", "menubar=1,scrollbars=1,width=800,height=600");
+    }
+
 };
 
 GeoExt.ux.data.Export.ChildOnLoad = function() {
@@ -93,26 +98,26 @@
 
 GeoExt.ux.data.Export.exportWindow = null;
 
-GeoExt.ux.data.Export.KMLExport = function(map, layer) {
+GeoExt.ux.data.Export.KMLExport = function(map, layers, features, exportWindowLocation) {
     GeoExt.ux.data.Export.format = 'KML';
-    GeoExt.ux.data.Export.content = GeoExt.ux.data.Export(map, GeoExt.ux.data.Export.format, [layer], null);
+    GeoExt.ux.data.Export.content = GeoExt.ux.data.Export(map, GeoExt.ux.data.Export.format, layers, features);
     if (Ext.isIE) {
         GeoExt.ux.data.Export.OpenWindowIE();
     } else if (Ext.isGecko) {
         if (GetFlashVersion() > 10.00) {
-            GeoExt.ux.data.Export.OpenWindowDownloadify();
+            GeoExt.ux.data.Export.OpenWindowDownloadify(exportWindowLocation);
         } else {
             alert('Please install Flash 10');
         }
     } else if (Ext.isChrome) {
         if (GetFlashVersion() > 10.00) {
-            GeoExt.ux.data.Export.OpenWindowDownloadify();
+            GeoExt.ux.data.Export.OpenWindowDownloadify(exportWindowLocation);
         } else {
             alert('Please install Flash 10');
         }
     } else if (Ext.isSafari) {
         if (GetFlashVersion() > 10.00) {
-            GeoExt.ux.data.Export.OpenWindowDownloadify();
+            GeoExt.ux.data.Export.OpenWindowDownloadify(exportWindowLocation);
         } else {
             alert('Please install Flash 10');
         }

Modified: sandbox/cmoullet/ux/LayerManager/ux/data/Import.js
===================================================================
--- sandbox/cmoullet/ux/LayerManager/ux/data/Import.js	2010-01-09 05:11:56 UTC (rev 1687)
+++ sandbox/cmoullet/ux/LayerManager/ux/data/Import.js	2010-01-09 06:08:58 UTC (rev 1688)
@@ -59,5 +59,4 @@
         ]
     });
     importWindow.show();
-
 };
\ No newline at end of file



More information about the Commits mailing list