[fusion-commits] r2400 - in trunk: . lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Jun 14 04:16:06 EDT 2011
Author: liuar
Date: 2011-06-14 01:16:06 -0700 (Tue, 14 Jun 2011)
New Revision: 2400
Added:
trunk/lib/IE9patch.js
Modified:
trunk/build.xml
trunk/lib/fusion.js
Log:
Temporary workaround for IE9 compatibility issue. I will revert this changelist after this issue get fixed in JxLib/Mootools
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2011-06-03 18:56:58 UTC (rev 2399)
+++ trunk/build.xml 2011-06-14 08:16:06 UTC (rev 2400)
@@ -213,8 +213,9 @@
files=" SingleFile.js
fusion.js
proj4js-compressed.js
+ IE9patch.js
OpenLayers/OpenLayers.js
- OLpatch.js
+ OLpatch.js
jxlib.uncompressed.js
Error.js
EventMgr.js
Added: trunk/lib/IE9patch.js
===================================================================
--- trunk/lib/IE9patch.js (rev 0)
+++ trunk/lib/IE9patch.js 2011-06-14 08:16:06 UTC (rev 2400)
@@ -0,0 +1,24 @@
+document.newElement = function(tag, props) {
+ var createdElement;
+ if (Browser.Engine.trident && props){
+ ['name', 'type', 'checked'].each(function(attribute){
+ if (!props[attribute]) return;
+ tag += ' ' + attribute + '="' + props[attribute] + '"';
+ if (attribute != 'checked') delete props[attribute];
+ });
+
+ var replaceTag = '<' + tag +'>';
+
+ try {
+ createdElement = this.createElement(replaceTag);
+ }
+ catch (e) {
+ createdElement = this.createElement(tag);
+ }
+ }
+ else {
+ createdElement = this.createElement(tag);
+ }
+
+ return document.id(this.createElement(tag)).set(props);
+};
\ No newline at end of file
Modified: trunk/lib/fusion.js
===================================================================
--- trunk/lib/fusion.js 2011-06-03 18:56:58 UTC (rev 2399)
+++ trunk/lib/fusion.js 2011-06-14 08:16:06 UTC (rev 2400)
@@ -1400,6 +1400,7 @@
var coreScripts = ['lib/OpenLayers/OpenLayers.js',
'lib/OLpatch.js',
'lib/jxLib/jxlib.uncompressed.js',
+ 'lib/IE9patch.js',
'lib/Proj4js/proj4js-compressed.js',
'lib/EventMgr.js',
'lib/Error.js',
More information about the fusion-commits
mailing list