From e56a3f68f1e39e333ddbd31a93e002fcccdf317f Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Wed, 29 Apr 2009 23:05:28 +0200 Subject: [PATCH] [svn r20196] FS#4008 - Correction of a wrong javascript, see SVN#20038. The correction is aimed properly to be met the demand under FS#4007 - "Images galery in FCK : should not center in the screen. Should stay where it opens." --- .../editor/plugins/ImageManager/assets/popup.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/popup.js b/main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/popup.js index 1adcf93b71..1892911036 100644 --- a/main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/popup.js +++ b/main/inc/lib/fckeditor/editor/plugins/ImageManager/assets/popup.js @@ -15,7 +15,7 @@ // by each window's script. Added translation for a few other HTML elements. function getAbsolutePos(el) { - // var r = { x: el.offsetLeft, y: el.offsetTop }; // avoiding being in the center of the page + var r = { x: el.offsetLeft, y: el.offsetTop }; if (el.offsetParent) { var tmp = getAbsolutePos(el.offsetParent); r.x += tmp.x; @@ -62,7 +62,11 @@ function __dlg_init(bottom) { var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2; var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2; + // Avoiding being in the center of the page. + /* window.moveTo(x, y); + */ + //window.innerWidth = body.offsetWidth + 5; //window.innerHeight = body_height + 2; } else { @@ -78,10 +82,15 @@ function __dlg_init(bottom) { var x = (screen.availWidth - W) / 2; var y = (screen.availHeight - H) / 2; //alert('x:'+x+' y:'+y+' ch:'+ch); + + // Avoiding being in the center of the page. + /* if(Dialog.is_ie) window.moveTo(x, y); else //opera window.moveTo(x, y - H/4); + */ + } document.body.onkeypress = __dlg_close_on_esc; };