mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-03 12:00:09 +01:00
for egw_openWindowCentered return a WindowID by default
This commit is contained in:
parent
65e7054869
commit
4795658fec
@ -103,8 +103,10 @@ function egw_set_checkbox_multiselect_enabled(_id, _enabled)
|
||||
}
|
||||
|
||||
// works only correctly in Mozilla/FF and Konqueror
|
||||
function egw_openWindowCentered2(_url, _windowName, _width, _height, _status)
|
||||
function egw_openWindowCentered2(_url, _windowName, _width, _height, _status, _app, _returnID)
|
||||
{
|
||||
if (typeof(_app) == 'undefined') _app = false;
|
||||
if (typeof(_returnID) == 'undefined') _returnID = false;
|
||||
windowWidth = egw_getWindowOuterWidth();
|
||||
windowHeight = egw_getWindowOuterHeight();
|
||||
|
||||
@ -116,12 +118,19 @@ function egw_openWindowCentered2(_url, _windowName, _width, _height, _status)
|
||||
",location=no,menubar=no,directories=no,toolbar=no,scrollbars=yes,resizable=yes,status="+_status);
|
||||
|
||||
// returning something, replaces whole window in FF, if used in link as "javascript:egw_openWindowCentered2()"
|
||||
//return windowID;
|
||||
if (_returnID === false)
|
||||
{
|
||||
// return nothing
|
||||
}
|
||||
else
|
||||
{
|
||||
return windowID;
|
||||
}
|
||||
}
|
||||
|
||||
function egw_openWindowCentered(_url, _windowName, _width, _height)
|
||||
{
|
||||
return egw_openWindowCentered2(_url, _windowName, _width, _height, 'no');
|
||||
return egw_openWindowCentered2(_url, _windowName, _width, _height, 'no', false, true);
|
||||
}
|
||||
|
||||
// return the left position of the window
|
||||
|
Loading…
Reference in New Issue
Block a user