[gatein-commits] gatein SVN: r3912 - exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Aug 24 12:20:28 EDT 2010


Author: hoang_to
Date: 2010-08-24 12:20:28 -0400 (Tue, 24 Aug 2010)
New Revision: 3912

Modified:
   exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
Log:
EXOGTN-18: Edit/Delete icons on portlets 's info bar are not showed in IE7 when the language is Arabic

Modified: exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js	2010-08-24 16:18:03 UTC (rev 3911)
+++ exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js	2010-08-24 16:20:28 UTC (rev 3912)
@@ -98,6 +98,56 @@
 		}
 		newLayer.parentNode.style.top = -height + "px";
 		editBlock.style.display = "block";		
+
+		//resize width of portlet/container control if IE + LTR align BEGIN
+
+		var uiInfoBar = DOMUtil.findFirstDescendantByClass(editBlock, "div", "UIInfoBar");
+
+		if( uiInfoBar && (eXo.core.Browser.isIE6() || (eXo.core.Browser.isIE7() && eXo.core.I18n.isRT()))){
+			//resize width of portlet/container only one time
+			if(uiInfoBar.style.width == ""){
+				var dragControlArea = DOMUtil.findFirstDescendantByClass(uiInfoBar, "div", "DragControlArea");
+				
+				var portletIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "div", "PortletIcon");
+				var editPortletPropertiesIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "a", "EditPortletPropertiesIcon");
+				var deletePortletIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "a", "DeletePortletIcon");
+				
+				var contarnerIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "div", "ContainerIcon");
+				var editContainerIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "a", "EditContainerIcon");
+				var deleteContainerIcon = DOMUtil.findFirstDescendantByClass(uiInfoBar, "a", "DeleteContainerIcon");
+				
+				var uiInfoBarWidth =  dragControlArea.offsetWidth;
+				
+				if(DOMUtil.hasClass(portlet, "UIPortlet")){
+					uiInfoBarWidth += portletIcon.offsetWidth;
+					
+					if(editPortletPropertiesIcon){
+						uiInfoBarWidth += editPortletPropertiesIcon.offsetWidth;
+					}
+					
+					if(deletePortletIcon){
+						uiInfoBarWidth += deletePortletIcon.offsetWidth;
+					}
+				}
+				
+				if(DOMUtil.hasClass(portlet, "UIContainer")){
+					uiInfoBarWidth += contarnerIcon.offsetWidth
+					
+					if(editContainerIcon){
+						uiInfoBarWidth += editContainerIcon.offsetWidth;
+					}
+					
+					if(deleteContainerIcon){
+						uiInfoBarWidth += deleteContainerIcon.offsetWidth;
+					}
+				}
+	
+				uiInfoBar.style.width= uiInfoBarWidth + 35 + "px";
+			}
+
+		}
+		//resize width of portlet/container control if IE + LTR align END
+		
 	}	else {
 		editBlock.style.display = "none";
 		if(!DOMUtil.hasClass(portlet, "UIPortlet")) {



More information about the gatein-commits mailing list