mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-10 00:37:54 +02:00
new JSON response method "message" to call egw.message eg. in a popup, by using the context from the egw.json call
This commit is contained in:
@ -368,6 +368,17 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd)
|
||||
throw 'Invalid parameters';
|
||||
}, null, 'alert');
|
||||
|
||||
// Regisert the "message" plugin
|
||||
json.registerJSONPlugin(function(type, res, req) {
|
||||
//Check whether all needed parameters have been passed and call the alertHandler function
|
||||
if ((typeof res.data.message != 'undefined'))
|
||||
{
|
||||
req.egw.message(res.data.message, res.data.type);
|
||||
return true;
|
||||
}
|
||||
throw 'Invalid parameters';
|
||||
}, null, 'message');
|
||||
|
||||
// Register the "assign" plugin
|
||||
json.registerJSONPlugin(function(type, res, req) {
|
||||
//Check whether all needed parameters have been passed and call the alertHandler function
|
||||
|
Reference in New Issue
Block a user