nicer workaround

This commit is contained in:
Ralf Becker 2011-06-03 10:14:12 +00:00
parent 310b22c172
commit 2bba68b575

View File

@ -403,31 +403,26 @@ function egw_openWindowCentered(_url, _windowName, _width, _height)
// return the left position of the window // return the left position of the window
function egw_getWindowLeft() function egw_getWindowLeft()
{ {
// workaround for https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=648250 window.(outerHeight|outerWidth|screenX|screenY) throw exception // workaround for Fennec bug https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=648250 window.(outerHeight|outerWidth|screenX|screenY) throw exception
if(is_mozilla && navigator.userAgent.toLowerCase().indexOf('fennec') == -1) try {
{ if(is_mozilla) return window.screenX;
return window.screenX;
} }
else catch (e) {}
{
return window.screenLeft; return window.screenLeft;
} }
}
// return the left position of the window // return the left position of the window
function egw_getWindowTop() function egw_getWindowTop()
{ {
// workaround for https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=648250 window.(outerHeight|outerWidth|screenX|screenY) throw exception // workaround for Fennec bug https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=648250 window.(outerHeight|outerWidth|screenX|screenY) throw exception
if(is_mozilla && navigator.userAgent.toLowerCase().indexOf('fennec') == -1) try {
{ if(is_mozilla) return window.screenY;
return window.screenY;
} }
else catch (e) {}
{
//alert(window.screenTop);
return window.screenTop-90; return window.screenTop-90;
} }
}
// get the outerWidth of the browser window. For IE we simply return the innerWidth // get the outerWidth of the browser window. For IE we simply return the innerWidth
function egw_getWindowInnerWidth() function egw_getWindowInnerWidth()
@ -464,30 +459,26 @@ function egw_getWindowInnerHeight()
// get the outerWidth of the browser window. For IE we simply return the innerWidth // get the outerWidth of the browser window. For IE we simply return the innerWidth
function egw_getWindowOuterWidth() function egw_getWindowOuterWidth()
{ {
// workaround for https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=648250 window.(outerHeight|outerWidth|screenX|screenY) throw exception // workaround for Fennec bug https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=648250 window.(outerHeight|outerWidth|screenX|screenY) throw exception
if (is_mozilla && navigator.userAgent.toLowerCase().indexOf('fennec') == -1) try {
{ if (is_mozilla) return window.outerWidth;
return window.outerWidth;
} }
else catch (e) {}
{
return egw_getWindowInnerWidth(); return egw_getWindowInnerWidth();
} }
}
// get the outerHeight of the browser window. For IE we simply return the innerHeight // get the outerHeight of the browser window. For IE we simply return the innerHeight
function egw_getWindowOuterHeight() function egw_getWindowOuterHeight()
{ {
// workaround for https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=648250 window.(outerHeight|outerWidth|screenX|screenY) throw exception // workaround for Fennec bug https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=648250 window.(outerHeight|outerWidth|screenX|screenY) throw exception
if (is_mozilla && navigator.userAgent.toLowerCase().indexOf('fennec') == -1) try {
{ if (is_mozilla) return window.outerHeight;
return window.outerHeight;
} }
else catch (e) {}
{
return egw_getWindowInnerHeight(); return egw_getWindowInnerHeight();
} }
}
// ie selectbox dropdown menu hack. as ie is not able to resize dropdown menus from selectboxes, we // ie selectbox dropdown menu hack. as ie is not able to resize dropdown menus from selectboxes, we
// read the content of the dropdown menu and present it as popup resized for the user. if the user // read the content of the dropdown menu and present it as popup resized for the user. if the user