diff --git a/phpgwapi/js/jsapi/egw_preferences.js b/phpgwapi/js/jsapi/egw_preferences.js index 2a1b3d57a7..2f31573f2b 100644 --- a/phpgwapi/js/jsapi/egw_preferences.js +++ b/phpgwapi/js/jsapi/egw_preferences.js @@ -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;