Author: thanh_tung_do
Date: 2010-05-10 01:57:57 -0400 (Mon, 10 May 2010)
New Revision: 3019
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js
Log:
GTNPORTAL-1101:Fix problem with page editor when change language to Arabic
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js 2010-05-10
05:57:17 UTC (rev 3018)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js 2010-05-10
05:57:57 UTC (rev 3019)
@@ -194,7 +194,8 @@
UIPopupWindow.prototype.resize = function(evt) {
var targetPopup = document.getElementById(eXo.webui.UIPopupWindow.popupId) ;
var content = eXo.core.DOMUtil.findFirstDescendantByClass(targetPopup, "div",
"PopupContent") ;
- var pointerX = eXo.core.Browser.findMouseRelativeX(targetPopup, evt) ;
+ var isRTL = eXo.core.I18n.isRT();
+ var pointerX = eXo.core.Browser.findMouseRelativeX(targetPopup, evt, isRTL) ;
var pointerY = eXo.core.Browser.findMouseRelativeY(targetPopup, evt) ;
var delta = eXo.core.Browser.findPosYInContainer(content,targetPopup) +
content.style.borderWidth + content.style.padding + content.style.margin;
@@ -202,6 +203,11 @@
//TODO: Check if the bottom is not null before assign new value to
'content.style.height'
if((pointerY-delta) > 0) content.style.height =
(pointerY-delta-POPUP_WINDOW_BOTTOM_HEIGHT)+"px" ;
targetPopup.style.height = "auto";
+
+ if(isRTL){
+ pointerX = (-1) * pointerX
+ }
+
if(pointerX > 200) targetPopup.style.width = (pointerX+5) + "px" ;
} ;