[Commits] r1696 - sandbox/cmoullet/ux/LayerManager/ux/widgets
commits at geoext.org
commits at geoext.org
Sun Jan 10 15:59:35 CET 2010
Author: cmoullet
Date: 2010-01-10 15:59:35 +0100 (Sun, 10 Jan 2010)
New Revision: 1696
Modified:
sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js
Log:
Add source script code
Modified: sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js
===================================================================
--- sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js 2010-01-10 14:49:56 UTC (rev 1695)
+++ sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportWindow.js 2010-01-10 14:59:35 UTC (rev 1696)
@@ -65,6 +65,7 @@
this.on(
'afterlayout', function() {
var el = Ext.get('downloadify');
+ var baseUrl = scriptSource.replace('/widgets/LayerManagerExportWindow.js','');
if (el && !this.downloadifyLoaded) {
//alert('downloadify exists');
Downloadify.create('downloadify', {
@@ -83,8 +84,8 @@
alert('Error occured during storage');
},
transparent: false,
- swf: '../ux/downloadify/media/downloadify.swf',
- downloadImage: '../ux/downloadify/images/extjs_download_default.png',
+ swf: baseUrl + '/downloadify/media/downloadify.swf',
+ downloadImage: baseUrl + '/downloadify/images/extjs_download_default.png',
width: 66,
height: 21,
append: false
@@ -95,4 +96,15 @@
this);
}
-});
\ No newline at end of file
+});
+
+var scriptSource = (function() {
+ var scripts = document.getElementsByTagName('script'),
+ script = scripts[scripts.length - 1];
+
+ if (script.getAttribute.length !== undefined) {
+ return script.src
+ }
+
+ return script.getAttribute('src', -1)
+}());
\ No newline at end of file
More information about the Commits
mailing list