mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-14 01:08:34 +02:00
allow app to specify "availHeight" for its popup height and keep that height in automatic resize, for OS (eg. Linux) does not report an availHeight < height, we subtract 100px
This commit is contained in:
@ -279,7 +279,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
||||
if (_popup)
|
||||
{
|
||||
var w_h = _popup.split('x');
|
||||
if (w_h[1] == 'egw_getWindowOuterHeight()') w_h[1] = egw_getWindowOuterHeight();
|
||||
if (w_h[1] == 'availHeight') w_h[1] = this.availHeight();
|
||||
var popup_window = _wnd.egw_openWindowCentered2(url, _target || '_blank', w_h[0], w_h[1], false, _target_app, true);
|
||||
|
||||
// Remember which windows are open
|
||||
@ -303,6 +303,14 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get available height of screen
|
||||
*/
|
||||
availHeight: function()
|
||||
{
|
||||
return screen.availHeight < screen.height ? screen.availHeight : screen.height - 100;
|
||||
},
|
||||
|
||||
/**
|
||||
* Use frameworks (framed template) link handler to open a url
|
||||
*
|
||||
|
Reference in New Issue
Block a user