Author: phuong_vu
Date: 2010-09-14 03:53:33 -0400 (Tue, 14 Sep 2010)
New Revision: 4182
Modified:
portal/branches/branch-r4047/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js
Log:
GTNPORTAL-1444 Fix js bug with IE : always ignore Text node when use Node.nextSibling
Modified:
portal/branches/branch-r4047/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js
===================================================================
---
portal/branches/branch-r4047/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js 2010-09-14
04:19:09 UTC (rev 4181)
+++
portal/branches/branch-r4047/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js 2010-09-14
07:53:33 UTC (rev 4182)
@@ -137,14 +137,14 @@
Browser.setOpacity(maskLayer, opacity) ;
}
- if(object != null){
- if(object.nextSibling) {
- maskLayer.nextSiblingOfObject = object.nextSibling ;
- maskLayer.parentOfObject = null ;
+ if(object != null) {
+ var tempNextSibling = document.createElement("span");
+ if(object.nextSibling) {
+ object.parentNode.insertBefore(tempNextSibling, object.nextSibling);
} else {
- maskLayer.nextSiblingOfObject = null ;
- maskLayer.parentOfObject = object.parentNode ;
+ object.parentNode.appendChild(tempNextSibling);
}
+ maskLayer.nextSiblingOfObject = tempNextSibling ;
//object.style.zIndex = maskLayer.maxZIndex + 1 ;
object.style.zIndex = maskLayer.maxZIndex;
@@ -198,18 +198,18 @@
}
if(object != null){
- if(object.nextSibling) {
- maskLayer.nextSiblingOfObject = object.nextSibling ;
- maskLayer.parentOfObject = null ;
- } else {
- maskLayer.nextSiblingOfObject = null ;
- maskLayer.parentOfObject = object.parentNode ;
- }
+ var tempNextSibling = document.createElement("span");
+ if(object.nextSibling) {
+ object.parentNode.insertBefore(tempNextSibling, object.nextSibling);
+ } else {
+ object.parentNode.appendChild(tempNextSibling);
+ }
+ maskLayer.nextSiblingOfObject = tempNextSibling ;
+
+ object.style.zIndex = maskLayer.maxZIndex + 1 ;
+ object.style.display = "block" ;
- object.style.zIndex = maskLayer.maxZIndex + 1 ;
- object.style.display = "block" ;
-
- blockContainer.appendChild(object) ;
+ blockContainer.appendChild(object) ;
}
}catch(err) {}
@@ -283,16 +283,11 @@
var parentNode = maskLayer.parentNode ;
maskLayer.nextSibling.style.display = "none" ;
- if (maskLayer.nextSiblingOfObject) {
- maskLayer.nextSiblingOfObject.parentNode.insertBefore(maskLayer.nextSibling,
maskLayer.nextSiblingOfObject) ;
- maskLayer.nextSiblingOfObject = null ;
- } else {
- maskLayer.parentOfObject.appendChild(maskLayer.nextSibling) ;
- maskLayer.parentOfObject = null ;
- }
-
- parentNode.removeChild(maskLayer) ;
+ maskLayer.nextSiblingOfObject.parentNode.insertBefore(maskLayer.nextSibling,
maskLayer.nextSiblingOfObject) ;
+ maskLayer.nextSiblingOfObject.parentNode.removeChild(maskLayer.nextSiblingOfObject);
+ maskLayer.nextSiblingOfObject = null ;
+ parentNode.removeChild(maskLayer) ;
}
} ;
Show replies by date