[gatein-commits] gatein SVN: r988 - in portal/trunk/web: portal/src/main/webapp/groovy/webui/core and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Dec 11 03:28:51 EST 2009
Author: tan_pham_dinh
Date: 2009-12-11 03:28:50 -0500 (Fri, 11 Dec 2009)
New Revision: 988
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UISitemapTree.gtmpl
Log:
GTNPORTAL-348: Some improvements in UISitemap
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2009-12-11 08:28:29 UTC (rev 987)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2009-12-11 08:28:50 UTC (rev 988)
@@ -566,14 +566,12 @@
};
UIPortal.prototype.collapseExpand = function(element) {
- var node = element.parentNode ;
- var subGroup = eXo.core.DOMUtil.findFirstChildByClass(node, "div", "ChildrenContainer") ;
+ var subGroup = eXo.core.DOMUtil.findFirstChildByClass(element.parentNode, "div", "ChildrenContainer") ;
var className = element.className;
if(!subGroup) return false;
if(subGroup.style.display == "none") {
if (className.indexOf("ExpandIcon") == 0) element.className = "CollapseIcon FloatLeft" ;
subGroup.style.display = "block" ;
- return false;
} else {
if (className.indexOf("CollapseIcon") == 0) element.className = "ExpandIcon FloatLeft" ;
subGroup.style.display = "none" ;
Modified: portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UISitemapTree.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UISitemapTree.gtmpl 2009-12-11 08:28:29 UTC (rev 987)
+++ portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UISitemapTree.gtmpl 2009-12-11 08:28:50 UTC (rev 988)
@@ -52,7 +52,10 @@
println """
<div class="$lastNode Node ClearFix">
<div class="CollapseIcon FloatLeft" onclick="eXo.portal.UIPortal.collapseExpand(this);$actionCollapse">
- <a class="NodeIcon DefaultPageIcon" href="$actionLink">$label</a>
+ """;
+ if(treeNode.getNode().getPageReference() == null) println "<a class='NodeIcon DefaultPageIcon' href='javascript:void(0);'>$label</a>";
+ else println "<a class='NodeIcon DefaultPageIcon' href='$actionLink'>$label</a>";
+ println """
</div>
<div class="ChildrenContainer FloatLeft" style="display: block">
""";
@@ -63,7 +66,10 @@
println """
<div class="$lastNode Node ClearFix">
<div class="ExpandIcon FloatLeft" onclick="if(eXo.portal.UIPortal.collapseExpand(this)){$actionExpand}">
- <a class="NodeIcon DefaultPageIcon" href="$actionLink">$label</a>
+ """;
+ if(treeNode.getNode().getPageReference() == null) println "<a class='NodeIcon DefaultPageIcon' href='javascript:void(0);'>$label</a>";
+ else println "<a class='NodeIcon DefaultPageIcon' href='$actionLink'>$label</a>";
+ println """
</div>
<div class="ChildrenContainer FloatLeft" style="display: none">
""";
@@ -102,10 +108,6 @@
<div class="UISiteTree">
<% TreeNode treeNodeRoot = uicomponent.getTreeNodes() ;%>
<% renderNodes(treeNodeRoot,portalURI,useAJAX); %>
-
-
-
-
</div>
</div>
</div>
More information about the gatein-commits
mailing list