diff --git a/phpgwapi/js/jsapi/jsapi.js b/phpgwapi/js/jsapi/jsapi.js index 8d7854ce41..45e3a3e859 100644 --- a/phpgwapi/js/jsapi/jsapi.js +++ b/phpgwapi/js/jsapi/jsapi.js @@ -234,8 +234,9 @@ function egw_refresh(_msg, _app, _id, _type, _targetapp, _replace, _with) //alert("egw_refresh(\'"+_msg+"\',\'"+_app+"\',\'"+_id+"\',\'"+_type+"\')"); var win = typeof _targetapp != 'undefined' ? egw_appWindow(_targetapp) : window; - // if window defines an app_refresh method, just call it - if (typeof win.app_refresh == "function" || typeof win.app_refresh.registered == "function" && win.app_refresh.registered(_app)) + // if window registered an app_refresh method or overwritten app_refresh, just call it + if(typeof win.app_refresh == "function" && typeof win.app_refresh.registered == "undefined" || + typeof win.app_refresh != "undefined" && win.app_refresh.registered(_app)) { win.app_refresh(_msg, _app, _id, _type); return; @@ -247,7 +248,7 @@ function egw_refresh(_msg, _app, _id, _type, _targetapp, _replace, _with) var et2 = etemplate2.getByApplication(_app); for(var i = 0; i < et2.length; i++) { - et2[i].refresh(_msg,_id,_type); + et2[i].refresh(_msg,_app,_id,_type); } return; }