From d2626085f69f6048887307b8f789954dddc58966 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 8 Mar 2021 21:20:11 +0200 Subject: [PATCH] fix wrong context causing eg. attachments to mail to no longer work --- api/js/jsapi/egw.js | 2 +- api/js/jsapi/egw_json.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/js/jsapi/egw.js b/api/js/jsapi/egw.js index e584d9d9b6..f6aabb4403 100644 --- a/api/js/jsapi/egw.js +++ b/api/js/jsapi/egw.js @@ -478,5 +478,5 @@ var exports = {}; */ function et2_call(_func) { - return egw.applyFunc(_func, [].slice.call(arguments, 1)); + return egw.applyFunc(_func, [].slice.call(arguments, 1), window); } diff --git a/api/js/jsapi/egw_json.js b/api/js/jsapi/egw_json.js index 3020ccf2df..655ec43ce3 100644 --- a/api/js/jsapi/egw_json.js +++ b/api/js/jsapi/egw_json.js @@ -503,7 +503,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) */ applyFunc: function(_func, args, _context) { - let parent = _context || window; + let parent = _context || _wnd; let func = _func; if (typeof _func === 'string') @@ -524,7 +524,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) { self.includeJS('/'+parts[1]+'/js/app.js', function () { - resolve(self.applyFunc(_func, args)); + resolve(self.applyFunc(_func, args, _context)); }, self, self.webserverUrl); }); }