diff --git a/phpgwapi/js/jsapi/egw_files.js b/phpgwapi/js/jsapi/egw_files.js index a0d73b2c11..eed1109cbc 100644 --- a/phpgwapi/js/jsapi/egw_files.js +++ b/phpgwapi/js/jsapi/egw_files.js @@ -164,10 +164,12 @@ egw.extend('files', egw.MODULE_WND_LOCAL, function(_app, _wnd) i--; // as index will be incr by for! } } - // check if all files already included --> call callback right away + // check if all files already included or sheduled to be included --> call callback via egw_LAB.wait if (!_jsFiles.length) { - _callback.call(_context); + egw_LAB.wait(function(){ + _callback.call(_context); + }); return; } diff --git a/phpgwapi/js/jsapi/egw_preferences.js b/phpgwapi/js/jsapi/egw_preferences.js index 6076abbbef..e0029890ca 100644 --- a/phpgwapi/js/jsapi/egw_preferences.js +++ b/phpgwapi/js/jsapi/egw_preferences.js @@ -24,19 +24,13 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function() { * * @access: private, use egw.preferences() or egw.set_perferences() */ - var prefs = { - common: { - dateformat: "Y-m-d", - timeformat: 24, - lang: "en" - } - }; + var prefs = {}; // Return the actual extension return { /** * Setting prefs for an app or 'common' - * + * * @param object _data object with name: value pairs to set * @param string _app application name, 'common' or undefined to prefes of all apps at once */ @@ -54,15 +48,15 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function() { /** * Query an EGroupware user preference - * + * * If a prefernce is not already loaded (only done for "common" by default), it is synchroniosly queryed from the server! - * + * * @param string _name name of the preference, eg. 'dateformat', or '*' to get all the application's preferences * @param string _app='common' * @return string preference value * @todo add a callback to query it asynchron */ - preference: function(_name, _app) + preference: function(_name, _app) { if (typeof _app == 'undefined') _app = 'common'; @@ -79,9 +73,9 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function() { /** * Set a preference and sends it to the server - * + * * Server will silently ignore setting preferences, if user has no right to do so! - * + * * @param string _app application name or "common" * @param string _name name of the pref * @param string _val value of the pref