[gatein-commits] gatein SVN: r5453 - in portal/branches/branch-GTNPORTAL-1700/web: portal/src/main/webapp/groovy/portal/webui/container and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Dec 2 04:07:36 EST 2010


Author: phuong_vu
Date: 2010-12-02 04:07:35 -0500 (Thu, 02 Dec 2010)
New Revision: 5453

Modified:
   portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
   portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl
Log:
GTNPORTAL-1691 Don't show column container after delete portlet

Modified: portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js	2010-12-02 08:58:55 UTC (rev 5452)
+++ portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js	2010-12-02 09:07:35 UTC (rev 5453)
@@ -611,7 +611,12 @@
 UIPortal.prototype.removeComponent = function(componentId) {
 		var comp = document.getElementById(componentId);
 		var viewPage = eXo.core.DOMUtil.findAncestorByClass(comp, "VIEW-PAGE");
-		
+
+		var parent = comp.parentNode;
+		if (eXo.core.DOMUtil.getChildrenByTagName(parent, "div").length === 1 && !eXo.core.DOMUtil.hasClass(parent, "EmptyContainer")) {
+			eXo.core.DOMUtil.addClass(parent, "EmptyContainer");
+		}
+
 		//Check if the removing component is a column
 		if (comp.parentNode.nodeName.toUpperCase() == "TD") eXo.core.DOMUtil.removeElement(comp.parentNode);
 		else eXo.core.DOMUtil.removeElement(comp);

Modified: portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl	2010-12-02 08:58:55 UTC (rev 5452)
+++ portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl	2010-12-02 09:07:35 UTC (rev 5453)
@@ -42,10 +42,10 @@
 				<div class="VIEW-CONTAINER VIEW-BLOCK">
 			<%} %> 
 					<%if(hasPermission) {%>
-						<div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
-							<div>
+						<div>
+						  <div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
 								<%uicomponent.renderChildren();%>
-							</div>
+						  </div>
 						</div>
 						<%} else out.print("<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
 				</div>



More information about the gatein-commits mailing list