Author: phuong_vu
Date: 2011-09-01 00:34:29 -0400 (Thu, 01 Sep 2011)
New Revision: 7270
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js
Log:
GTNPORTAL-2034 Navigation portlet doesn't render correctly in non-default layout
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js 2011-08-31
22:32:32 UTC (rev 7269)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js 2011-09-01
04:34:29 UTC (rev 7270)
@@ -263,9 +263,12 @@
if (eXo.portal.UIPortalNavigation.currentOpenedMenu)
eXo.portal.UIPortalNavigation.hideMenu();
eXo.portal.UIPortalNavigation.superClass.pushVisibleContainer(menuItemContainer.id);
- var offParent = item.offsetParent ;
- var y = item.offsetHeight + item.offsetTop;
- var x = item.offsetLeft + 2;
+ //Need this code to make menuItemContainer.offsetParent works correctly
+ menuItemContainer.style.display = "block";
+ menuItemContainer.style.position = "absolute";
+ var offParent = menuItemContainer.offsetParent ;
+ var y = item.offsetHeight + eXo.core.Browser.findPosYInContainer(item, offParent);
+ var x = eXo.core.Browser.findPosXInContainer(item, offParent) + 2;
if(eXo.core.I18n.isRT()) {
x = eXo.core.Browser.findPosX(offParent) + offParent.offsetWidth -
eXo.core.Browser.findPosX(item) - item.offsetWidth;
// if(eXo.core.Browser.isIE6()) x +=
parseInt(document.getElementById("UIWorkingWorkspace").style.marginRight) ;