Author: mwringe
Date: 2011-08-31 12:06:32 -0400 (Wed, 31 Aug 2011)
New Revision: 7264
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js
Log:
JBEPP-1051: merge in patch from GTNPORTAL-2035 to fix infinite scroll in portal user
permissions.
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js 2011-08-31
15:24:39 UTC (rev 7263)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js 2011-08-31
16:06:32 UTC (rev 7264)
@@ -127,8 +127,15 @@
maskLayer.className = "MaskLayer" ;
maskLayer.id = "MaskLayer" ;
maskLayer.maxZIndex = eXo.webui.UIPopup.zIndex + 1; //3 ;
+ var offsetParent = maskLayer.offsetParent;
+ if (offsetParent && eXo.core.Browser.findPosX(offsetParent) != 0
+ && eXo.core.Browser.findPosY(offsetParent) != 0) {
+ maskLayer.style.width = offsetParent.offsetWidth + "px";
+ maskLayer.style.height = offsetParent.offsetHeight + "px";
+ } else {
maskLayer.style.width = Browser.getBrowserWidth() + "px";
maskLayer.style.height = Browser.getBrowserHeight() + "px";
+ }
maskLayer.style.top = "0px" ;
maskLayer.style.left = "0px" ;
maskLayer.style.zIndex = maskLayer.maxZIndex ;
@@ -221,8 +228,14 @@
*/
UIMaskLayer.prototype.doScroll = function() {
- if(document.getElementById("MaskLayer")) {
var maskLayer = document.getElementById("MaskLayer") ;
+ if(maskLayer) {
+ var offsetParent = maskLayer.offsetParent;
+ if (offsetParent && eXo.core.Browser.findPosX(offsetParent) != 0
+ || eXo.core.Browser.findPosY(offsetParent) != 0) {
+ maskLayer = document.getElementById("subMaskLayer");
+ if (!maskLayer) return;
+ }
if(document.documentElement && document.documentElement.scrollTop) {
maskLayer.style.top = document.documentElement.scrollTop + "px" ;
} else {
@@ -244,6 +257,13 @@
var UIMaskLayer = eXo.core.UIMaskLayer ;
var Browser = eXo.core.Browser ;
var object = UIMaskLayer.object ;
+ if (object && object.previousSibling) {
+ var offsetParent = object.previousSibling.offsetParent;
+ if (offsetParent && (eXo.core.Browser.findPosX(offsetParent) != 0
+ || eXo.core.Browser.findPosY(offsetParent) != 0)) {
+ eXo.portal.UIMaskWorkspace.resetPosition();
+ }
+ }
var blockContainer = UIMaskLayer.blockContainer ;
var position = UIMaskLayer.position ;
object.style.position = "absolute" ;
@@ -271,6 +291,9 @@
left = (blockContainer.offsetWidth - object.offsetWidth) / 2 ;
top = (Browser.getBrowserHeight() - object.offsetHeight) / 2 + topPos ;
}
+ if ((top + object.offsetHeight) > topPos + Browser.getBrowserHeight()) {
+ top = topPos + Browser.getBrowserHeight() - object.offsetHeight;
+ }
object.style.left = left + "px" ;
object.style.top = top + "px" ;
@@ -309,6 +332,17 @@
UIMaskLayer.prototype.resizeMaskLayer = function() {
var maskLayer = document.getElementById("MaskLayer");
if (maskLayer) {
+ var offsetParent = maskLayer.offsetParent;
+ if (offsetParent && (eXo.core.Browser.findPosX(offsetParent) != 0
+ || eXo.core.Browser.findPosY(offsetParent) != 0)) {
+ maskLayer = document.getElementById("subMaskLayer");
+ if (!maskLayer) return;
+ offsetParent = maskLayer.offsetParent;
+ }
+ }
+
+ if (maskLayer && offsetParent && eXo.core.Browser.findPosX(offsetParent)
== 0
+ && eXo.core.Browser.findPosY(offsetParent) == 0) {
maskLayer.style.width = eXo.core.Browser.getBrowserWidth() + "px";
maskLayer.style.height = eXo.core.Browser.getBrowserHeight() + "px";
}
Show replies by date