fix wrong context causing eg. attachments to mail to no longer work

This commit is contained in:
Ralf Becker 2021-03-08 21:20:11 +02:00
parent 1fdec427d9
commit d2626085f6
2 changed files with 3 additions and 3 deletions

View File

@ -478,5 +478,5 @@ var exports = {};
*/ */
function et2_call(_func) function et2_call(_func)
{ {
return egw.applyFunc(_func, [].slice.call(arguments, 1)); return egw.applyFunc(_func, [].slice.call(arguments, 1), window);
} }

View File

@ -503,7 +503,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd)
*/ */
applyFunc: function(_func, args, _context) applyFunc: function(_func, args, _context)
{ {
let parent = _context || window; let parent = _context || _wnd;
let func = _func; let func = _func;
if (typeof _func === 'string') 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 () self.includeJS('/'+parts[1]+'/js/app.js', function ()
{ {
resolve(self.applyFunc(_func, args)); resolve(self.applyFunc(_func, args, _context));
}, self, self.webserverUrl); }, self, self.webserverUrl);
}); });
} }