mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
set_preference now accepts an additional callback parameter, passed on to jsonq
This commit is contained in:
parent
db5fb7a86a
commit
a3a1d500ee
@ -79,10 +79,11 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function() {
|
||||
* @param {string} _app application name or "common"
|
||||
* @param {string} _name name of the pref
|
||||
* @param {string} _val value of the pref
|
||||
* @param {function} _callback Function passed along to the queue, called after preference is set server-side
|
||||
*/
|
||||
set_preference: function(_app, _name, _val)
|
||||
set_preference: function(_app, _name, _val, _callback)
|
||||
{
|
||||
this.jsonq('home.egw_framework.ajax_set_preference.template',[_app, _name, _val]);
|
||||
this.jsonq('home.egw_framework.ajax_set_preference.template',[_app, _name, _val], _callback);
|
||||
|
||||
// update own preference cache, if _app prefs are loaded (dont update otherwise, as it would block loading of other _app prefs!)
|
||||
if (typeof prefs[_app] != 'undefined') prefs[_app][_name] = _val;
|
||||
|
Loading…
Reference in New Issue
Block a user