Author: liem_nguyen
Date: 2009-12-23 02:18:51 -0500 (Wed, 23 Dec 2009)
New Revision: 1136
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalControl.js
Log:
GTNPORTAL-379 IE7: Can't hide sub-group
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalControl.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalControl.js 2009-12-23
04:48:24 UTC (rev 1135)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalControl.js 2009-12-23
07:18:51 UTC (rev 1136)
@@ -34,15 +34,22 @@
UIPortalControl.prototype.collapseTree = function(selectedElement ) {
var DOMUtil = eXo.core.DOMUtil ;
- var parentNode = DOMUtil.findAncestorByClass(selectedElement, "Node");
+ var parentNode = DOMUtil.findAncestorByClass(selectedElement, "Node");
var childrenContainer = DOMUtil.findFirstDescendantByClass(parentNode, "div",
"ChildrenContainer");
- var expandIcon = document.createElement('a');
- expandIcon.href = childrenContainer.getAttribute("actionLink") ;
- expandIcon.className = "ExpandIcon" ;
- expandIcon.innerHTML = selectedElement.innerHTML ;
- parentNode.removeChild(childrenContainer);
- parentNode.insertBefore(expandIcon, selectedElement);
- parentNode.removeChild(selectedElement);
+
+ if (eXo.core.Browser.browserType != "ie") {
+ var expandIcon = document.createElement('a');
+ expandIcon.href = childrenContainer.getAttribute("actionLink") ;
+ expandIcon.className = "ExpandIcon" ;
+ expandIcon.innerHTML = selectedElement.innerHTML ;
+ parentNode.removeChild(childrenContainer);
+ parentNode.insertBefore(expandIcon, selectedElement);
+ parentNode.removeChild(selectedElement);
+ } else {
+ // Fix for GTNPORTAL-379 IE7: Can't hide sub-group
+ var newHTML = "<div onclick=\"" +
childrenContainer.getAttribute("actionLink") + "\"
class=\"ExpandIcon\">" + selectedElement.innerHTML +
"</div>";
+ parentNode.innerHTML = newHTML;
+ }
};
UIPortalControl.prototype.onEnterPress = function(e) {