From 7edd12d251785926b908bfa44da2e1098f9c5a40 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 23 May 2014 09:19:46 +0000 Subject: [PATCH] run observers in main window (eg. not iframe, which might be opener!) --- phpgwapi/js/jsapi/egw_message.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phpgwapi/js/jsapi/egw_message.js b/phpgwapi/js/jsapi/egw_message.js index bfa1e68e71..097494ec6f 100644 --- a/phpgwapi/js/jsapi/egw_message.js +++ b/phpgwapi/js/jsapi/egw_message.js @@ -193,10 +193,11 @@ egw.extend('message', egw.MODULE_WND_LOCAL, function(_app, _wnd) // notify app observers: if observer for _app itself returns false, no regular refresh will take place // app's own observer can replace current app_refresh functionality var no_regular_refresh = false; - for(var app in _wnd.app) + for(var app in _wnd.egw.window.app) // run observers in main window (eg. not iframe, which might be opener!) { - if (typeof _wnd.app[app].observer == 'function' && - _wnd.app[app].observer(_msg, _app, _id, _type, _msg_type, _targetapp) === false && app === _app) + var app_obj = _wnd.egw.window.app[app]; + if (typeof app_obj.observer == 'function' && + app_obj.observer(_msg, _app, _id, _type, _msg_type, _targetapp) === false && app === _app) { no_regular_refresh = true; }