Author: hoang_to
Date: 2010-08-10 04:00:14 -0400 (Tue, 10 Aug 2010)
New Revision: 3790
Modified:
portal/branches/branched-r3776/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
Log:
Apply patch to GTNPORTAL-1116
Modified:
portal/branches/branched-r3776/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
---
portal/branches/branched-r3776/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-08-10
07:52:37 UTC (rev 3789)
+++
portal/branches/branched-r3776/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-08-10
08:00:14 UTC (rev 3790)
@@ -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")) {