[Commits] r1733 - sandbox/cmoullet/ux/LayerManager/ux/widgets

commits at geoext.org commits at geoext.org
Wed Jan 13 08:39:07 CET 2010


Author: cmoullet
Date: 2010-01-13 08:39:07 +0100 (Wed, 13 Jan 2010)
New Revision: 1733

Modified:
   sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js
Log:
Add baseUrl. Still not finalized.

Modified: sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js
===================================================================
--- sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js	2010-01-13 07:33:32 UTC (rev 1732)
+++ sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js	2010-01-13 07:39:07 UTC (rev 1733)
@@ -11,7 +11,7 @@
 /** private: property[scriptSource]
  *  ``String``  Source of this script: complete URL
  */
-var scriptSource = (function() {
+var scriptSourceLayerMangerExportWindow = (function() {
     var scripts = document.getElementsByTagName('script'),
             script = scripts[scripts.length - 1];
 
@@ -99,6 +99,11 @@
      */
     downloadifyLoaded: false,
 
+    /** private: property[baseUrl]
+     *  ``String``  Base URL in order to get the images from the donloadify directory
+     */
+    baseUrl: scriptSourceLayerMangerExportWindow.replace('/widgets/LayerManagerExportWindow.js', ''),
+
     /** private: method[initComponent]
      *  Private initComponent override.
      */
@@ -143,7 +148,7 @@
         this.on(
                 'afterlayout', function() {
             var el = Ext.get('downloadify');
-            var baseUrl = scriptSource.replace('/widgets/LayerManagerExportWindow.js', '');
+
             if (el && !this.downloadifyLoaded && GetFlashVersion() >= 10.00) {
                 Downloadify.create('downloadify', {
                     filename: function() {
@@ -161,8 +166,8 @@
                         alert('Error occured during storage');
                     },
                     transparent: false,
-                    swf: baseUrl + '/downloadify/media/downloadify.swf',
-                    downloadImage: baseUrl + '/downloadify/images/extjs_download_default.png',
+                    swf: this.baseUrl + '/downloadify/media/downloadify.swf',
+                    downloadImage: this.baseUrl + '/downloadify/images/extjs_download_default.png',
                     width: 66,
                     height: 21,
                     append: false



More information about the Commits mailing list