[icinga-checkins] icinga.org: icinga-web/master: * IE fix for DOMParser

git at icinga.org git at icinga.org
Mon Jan 24 15:59:06 CET 2011


Module: icinga-web
Branch: master
Commit: 4e720350e7b352bc66df77e043256ec87561d0fa
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=4e720350e7b352bc66df77e043256ec87561d0fa

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Jan 24 14:42:28 2011 +0100

* IE fix for DOMParser

---

 app/modules/AppKit/lib/js/AppKitUtil.js |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/app/modules/AppKit/lib/js/AppKitUtil.js b/app/modules/AppKit/lib/js/AppKitUtil.js
index fb429ba..0f424f6 100755
--- a/app/modules/AppKit/lib/js/AppKitUtil.js
+++ b/app/modules/AppKit/lib/js/AppKitUtil.js
@@ -249,7 +249,12 @@ AppKit.util.Dom = (function () {
 		parseDOMfromString : function(string, contentType) {
 			if (!Ext.isEmpty(window.DOMParser)) {
 				return (new DOMParser()).parseFromString(string, contentType || 'text/xml').firstChild;
-				
+			}
+			else {
+				xmlDoc=new ActiveXObject('Microsoft.XMLDOM');
+				xmlDoc.async='false';
+				xmlDoc.loadXML(string);
+				return xmlDoc.firstChild
 			}
 			
 			throw('parseDOMfromString: could not create a new DOMParser instance!');
@@ -261,4 +266,4 @@ AppKit.util.Dom = (function () {
 })();
 
 
-	
\ No newline at end of file
+	





More information about the icinga-checkins mailing list