mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-11 00:18:25 +01:00
Fix app_refresh to support applications that set window.app_refresh instead of calling register_app_refresh()
This commit is contained in:
parent
b62262b566
commit
33e94d355c
@ -235,14 +235,14 @@ function egw_refresh(_msg, _app, _id, _type, _targetapp, _replace, _with)
|
|||||||
var win = typeof _targetapp != 'undefined' ? egw_appWindow(_targetapp) : window;
|
var win = typeof _targetapp != 'undefined' ? egw_appWindow(_targetapp) : window;
|
||||||
|
|
||||||
// if window defines an app_refresh method, just call it
|
// if window defines an app_refresh method, just call it
|
||||||
if (typeof win.app_refresh != 'undefined' && win.app_refresh.registered(_app))
|
if (typeof win.app_refresh == "function" || typeof win.app_refresh.registered == "function" && win.app_refresh.registered(_app))
|
||||||
{
|
{
|
||||||
win.app_refresh(_msg, _app, _id, _type);
|
win.app_refresh(_msg, _app, _id, _type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// etemplate2 specific to avoid reloading whole page
|
// etemplate2 specific to avoid reloading whole page
|
||||||
if(etemplate2 && etemplate2.getByApplication)
|
if(typeof etemplate2 != "undefined" && etemplate2.getByApplication)
|
||||||
{
|
{
|
||||||
var et2 = etemplate2.getByApplication(_app);
|
var et2 = etemplate2.getByApplication(_app);
|
||||||
for(var i = 0; i < et2.length; i++)
|
for(var i = 0; i < et2.length; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user