mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
use $method parameter of Api\Etemplate::exec() plus new et2_process handler as menuaction GET parameter
allows determining the called function on the URL to eg. send it to different FPM pool (before the menuaction of et2 was always "EGroupware\Api\Etemplate::ajax_process_content")
This commit is contained in:
parent
9f6451193e
commit
5576048f95
@ -1048,7 +1048,7 @@ var etemplate2 = /** @class */ (function () {
|
||||
if (data['open_target'] && !uniqueId.match(data['open_target'])) {
|
||||
uniqueId = data.DOMNodeID.replace('.', '-') + '-' + data['open_target'];
|
||||
}
|
||||
var et2 = new etemplate2(node, data.menuaction, uniqueId);
|
||||
var et2 = new etemplate2(node, data.data.menuaction, uniqueId);
|
||||
et2.load(data.name, data.url, data.data, null, null, null, data['fw-target']);
|
||||
return true;
|
||||
}
|
||||
|
@ -1343,7 +1343,7 @@ export class etemplate2
|
||||
{
|
||||
uniqueId = data.DOMNodeID.replace('.', '-') + '-' + data['open_target'];
|
||||
}
|
||||
const et2 = new etemplate2(node, data.menuaction, uniqueId);
|
||||
const et2 = new etemplate2(node, data.data.menuaction, uniqueId);
|
||||
et2.load(data.name, data.url, data.data, null, null, null, data['fw-target']);
|
||||
return true;
|
||||
}
|
||||
|
@ -334,7 +334,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
var et2 = new etemplate2(node, "EGroupware\\Api\\Etemplate::ajax_process_content");
|
||||
var et2 = new etemplate2(node, data.data.menuaction);
|
||||
et2.load(data.name,data.url,data.data);
|
||||
if (typeof data.response != 'undefined')
|
||||
{
|
||||
|
@ -207,6 +207,7 @@ class Etemplate extends Etemplate\Widget\Template
|
||||
'validation_errors' => self::$validation_errors,
|
||||
'langRequire' => array_values($langRequire),
|
||||
'currentapp' => $currentapp,
|
||||
'menuaction' => $method.(strpos($method, '::') !== false ? '::' : '.').'et2_process',
|
||||
);
|
||||
|
||||
if (!empty($data['content']['nm']['rows']) && is_array($data['content']['nm']['rows']))
|
||||
|
@ -159,6 +159,9 @@ class Request
|
||||
case 'etemplate': // eg. ajax code in an eTemplate widget
|
||||
$menuaction = ($appName = 'etemplate').'.'.$className.'.'.$functionName;
|
||||
break;
|
||||
case 'et2_process':
|
||||
$menuaction = ($className=Api\Etemplate::class).'::'.($functionName='ajax_process_content');
|
||||
break;
|
||||
case 'template': // calling current template / framework object
|
||||
$menuaction = $appName.'.'.$className.'.'.$functionName;
|
||||
$className = get_class($GLOBALS['egw']->framework);
|
||||
|
Loading…
Reference in New Issue
Block a user