Author: tan_pham_dinh
Date: 2010-01-19 01:14:54 -0500 (Tue, 19 Jan 2010)
New Revision: 1360
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js
Log:
GTNPORTAL-418: Make DashboardWorkspace appear in middle of UIDashboard
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js 2010-01-19
05:35:44 UTC (rev 1359)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js 2010-01-19
06:14:54 UTC (rev 1360)
@@ -290,7 +290,6 @@
colsContainer.style.width = "100%" ;
eXo.webui.UIDashboard.initHeight(windowId) ;
- eXo.webui.UIDashboard.initPopup(windowId);
setTimeout("eXo.webui.UIDashboard.initDragDrop('" + windowId +
"'," + canEdit + ");", 300) ;
};
@@ -385,13 +384,12 @@
}
};
- UIDashboard.prototype.initPopup = function(windowId) {
- var uiWindow = document.getElementById(windowId);
- var uiDashboardCont = eXo.core.DOMUtil.findFirstDescendantByClass(uiWindow,
"div", "UIDashboardContainer");
- var popup = eXo.core.DOMUtil.findPreviousElementByTagName(uiDashboardCont,
"div");
+ UIDashboard.prototype.initPopup = function(popup) {
+ if(typeof(popup) == "string") popup = document.getElementById(popup);
if(!popup || popup.style.display == "none") return;
- var deltaY = Math.ceil((uiWindow.offsetHeight - popup.offsetHeight) / 2);
- popup.style.top = eXo.core.Browser.findPosY(uiWindow) + deltaY + "px";
+ var uiDashboard = eXo.core.DOMUtil.findAncestorByClass(popup,
"UIDashboard");
+ var deltaY = Math.ceil((uiDashboard.offsetHeight - popup.offsetHeight) / 2);
+ popup.style.top = eXo.core.Browser.findPosY(uiDashboard) + deltaY + "px";
};
UIDashboard.prototype.createTarget = function(width, height) {
Show replies by date