mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 10:53:39 +01:00
* Mail/Admin: fix not working mail wizard
caused by loading app.js again and therefore this.et2 is not set --> only load / use egw.applyFunc() if not already set
This commit is contained in:
parent
d733cb48e9
commit
5ca7452613
@ -150,11 +150,18 @@
|
|||||||
// Code is app.appname.function, add the arguments so it can be executed
|
// Code is app.appname.function, add the arguments so it can be executed
|
||||||
if (typeof _code == 'string' && _code.indexOf('app') == 0 && _code.split('.').length >= 3 && _code.indexOf('(') == -1)
|
if (typeof _code == 'string' && _code.indexOf('app') == 0 && _code.split('.').length >= 3 && _code.indexOf('(') == -1)
|
||||||
{
|
{
|
||||||
return function(ev, widget)
|
const parts = _code.split('.');
|
||||||
|
const app = _widget.getInstanceManager().app_obj;
|
||||||
|
// check if we need to load the object
|
||||||
|
if (parts.length === 3 && typeof app[parts[1]] === 'undefined')
|
||||||
{
|
{
|
||||||
const app = widget.getInstanceManager().app_obj;
|
return function (ev, widget)
|
||||||
return egw.applyFunc(_code, [ev, _widget], context);
|
{
|
||||||
|
return egw.applyFunc(_code, [ev, widget]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// Code is app.appname.function, add the arguments so it can be executed
|
||||||
|
_code += '(ev,widget)';
|
||||||
}
|
}
|
||||||
// use app object from etemplate2, which might be private and not just window.app
|
// use app object from etemplate2, which might be private and not just window.app
|
||||||
_code = _code.replace(/(window\.)?app\./, 'widget.getInstanceManager().app_obj.');
|
_code = _code.replace(/(window\.)?app\./, 'widget.getInstanceManager().app_obj.');
|
||||||
|
Loading…
Reference in New Issue
Block a user