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

commits at geoext.org commits at geoext.org
Sat Jan 9 10:20:14 CET 2010


Author: cmoullet
Date: 2010-01-09 10:20:14 +0100 (Sat, 09 Jan 2010)
New Revision: 1690

Added:
   sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js
Modified:
   sandbox/cmoullet/ux/LayerManager/examples/LayerManagerExample.html
   sandbox/cmoullet/ux/LayerManager/ux/data/Export.js
Log:
Add extjs window export

Modified: sandbox/cmoullet/ux/LayerManager/examples/LayerManagerExample.html
===================================================================
--- sandbox/cmoullet/ux/LayerManager/examples/LayerManagerExample.html	2010-01-09 06:14:38 UTC (rev 1689)
+++ sandbox/cmoullet/ux/LayerManager/examples/LayerManagerExample.html	2010-01-09 09:20:14 UTC (rev 1690)
@@ -13,6 +13,7 @@
     <script type="text/javascript" src="../ux/data/FormatStore.js"></script>
     <script type="text/javascript" src="../ux/data/Export.js"></script>
     <script type="text/javascript" src="../ux/data/Import.js"></script>
+    <script type="text/javascript" src="../ux/widgets/LayerManagerExportWindow.js"></script>
     <script type="text/javascript" src="../ux/widgets/LayerManagerExportPanel.js"></script>
     <script type="text/javascript" src="../ux/widgets/LayerManagerImportPanel.js"></script>
     <script type="text/javascript" src="../ux/widgets/LayerManagerWindow.js"></script>

Modified: sandbox/cmoullet/ux/LayerManager/ux/data/Export.js
===================================================================
--- sandbox/cmoullet/ux/LayerManager/ux/data/Export.js	2010-01-09 06:14:38 UTC (rev 1689)
+++ sandbox/cmoullet/ux/LayerManager/ux/data/Export.js	2010-01-09 09:20:14 UTC (rev 1690)
@@ -79,6 +79,11 @@
 };
 
 GeoExt.ux.data.Export.OpenWindowDownloadify = function(exportWindowLocation) {
+    var exportWindow = new GeoExt.ux.LayerManagerExportWindow({
+        filename: 'export.' + GeoExt.ux.data.Export.format.toLowerCase(),
+        filecontent: GeoExt.ux.data.Export.content.replace(/&lt;/g, '<').replace(/&gt;/g, '>')
+    });
+    //exportWindow.show();
     if (exportWindowLocation) {
        GeoExt.ux.data.Export.exportWindow = window.open(exportWindowLocation, "_blank", "menubar=1,scrollbars=1,width=800,height=600");    
     } else {

Added: sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js
===================================================================
--- sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js	                        (rev 0)
+++ sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js	2010-01-09 09:20:14 UTC (rev 1690)
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2008-2009 The Open Source Geospatial Foundation
+ *
+ * Published under the BSD license.
+ * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
+ * of the license.
+ */
+
+Ext.namespace('GeoExt.ux');
+
+GeoExt.ux.LayerManagerExportWindow = Ext.extend(Ext.Window, {
+    id: 'layermanagerexportwindow',
+    modal: true,
+    title: OpenLayers.i18n('Export Window'),
+    width: 500,
+    height:300,
+    minWidth: 300,
+    minHeight: 200,
+    layout:'absolute',
+    plain:true,
+    bodyStyle:'padding:5px;',
+    filename: null,
+    filecontent: null,
+
+    initComponent: function() {
+        this.items = [
+            {
+                x: 10,
+                y: 5,
+                xtype: 'textfield',
+                name: 'filename',
+                value: this.filename,
+                anchor: '100%'
+            },
+            {
+                x: 10,
+                y: 35,
+                xtype: 'textarea',
+                value: this.filecontent,
+                anchor: '100% 100%'  // anchor width and height
+            }
+        ];
+        GeoExt.ux.LayerManagerExportWindow.superclass.initComponent.call(this);
+    }
+});
\ No newline at end of file



More information about the Commits mailing list