[fusion-commits] r1363 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Apr 7 15:42:08 EDT 2008
Author: zjames
Date: 2008-04-07 15:42:06 -0400 (Mon, 07 Apr 2008)
New Revision: 1363
Modified:
trunk/widgets/SaveMap.js
Log:
Re #48, DWF printlayout fix
Modified: trunk/widgets/SaveMap.js
===================================================================
--- trunk/widgets/SaveMap.js 2008-04-07 18:32:50 UTC (rev 1362)
+++ trunk/widgets/SaveMap.js 2008-04-07 19:42:06 UTC (rev 1363)
@@ -53,10 +53,11 @@
//for DWF, parse printLayouts and build menu
if (this.format == 'DWF') {
- if (json.ResourceId) {
- this.printLayout = json.ResourceId[0];
- if (json.Scale) {
- this.printScale = json.Scale[0];
+ var config = json.PrintLayout && json.PrintLayout[0];
+ if (config && config.ResourceId) {
+ this.printLayout = config.ResourceId[0];
+ if (config.Scale) {
+ this.printScale = config.Scale[0];
}
} else {
//TODO: Warning that the widget is improperly configured
@@ -89,7 +90,7 @@
if (this.printLayout) {
szLayout = '&layout=' + this.printLayout;
} else {
- //TODO: issue an error?
+ alert('DWF Save is not properly configured.')
return;
}
if (this.printScale) {
More information about the fusion-commits
mailing list