[fusion-commits] r2737 - in trunk: lib widgets/QuickPlot
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Jun 25 19:47:36 PDT 2013
Author: jng
Date: 2013-06-25 19:47:36 -0700 (Tue, 25 Jun 2013)
New Revision: 2737
Modified:
trunk/lib/fusion.js
trunk/widgets/QuickPlot/QuickPlotPanel.js
Log:
Fix QuickPlot fubar in IE8. Add a new Fusion.trim() utility function to allow for future code to not have to check for the absence of String.prototype.trim and just call this function instead.
Modified: trunk/lib/fusion.js
===================================================================
--- trunk/lib/fusion.js 2013-06-26 02:01:50 UTC (rev 2736)
+++ trunk/lib/fusion.js 2013-06-26 02:47:36 UTC (rev 2737)
@@ -789,11 +789,20 @@
}
return o;
},
+
+ /**
+ * Function: trim
+ *
+ * Utility function to trim a given string of any trailing whitespace
+ */
+ trim: function(str) {
+ return (typeof String.prototype.trim == 'undefined') ? str.replace(/^\s+|\s+$/g, '') : str.trim();
+ },
- /**
+ /**
* Function: xml2json
*
- * Callback method to convert the XNR response into an actual json object
+ * Callback method to convert the XHR response into an actual json object
* and triggers the call to the callback method
*
* Parameters:
@@ -1492,6 +1501,7 @@
if (!Fusion._singleFile) {
var coreScripts = [ 'lib/jxLib/jxlib.uncompressed.js', //JxLib has first dibs on any globals
'lib/Proj4js/proj4js-combined.js',
+ 'layers/MapGuide/php/csmap2proj4.js',
'lib/OpenLayers/OpenLayers.js',
'lib/EventMgr.js',
'lib/Error.js',
Modified: trunk/widgets/QuickPlot/QuickPlotPanel.js
===================================================================
--- trunk/widgets/QuickPlot/QuickPlotPanel.js 2013-06-26 02:01:50 UTC (rev 2736)
+++ trunk/widgets/QuickPlot/QuickPlotPanel.js 2013-06-26 02:47:36 UTC (rev 2737)
@@ -25,7 +25,7 @@
var i;
for (i = 0; i < widget.paperList.length; i++) {
var elOpt = document.createElement("option");
- var name= widget.paperList[i].name.trim();
+ var name = getParent().Fusion.trim(widget.paperList[i].name);
//users may set the page size as 279.4,215.9 which make the height before width
//we should always set width before height
More information about the fusion-commits
mailing list