forked from extern/egroupware
fix en translation is always used for common, caused by preferences had a stub default preference for common AND egw.includeJS immediatly called callback for a file just sheduled to be loaded, but not yet arrived
This commit is contained in:
parent
b56175a0f4
commit
53c6059d84
@ -164,10 +164,12 @@ egw.extend('files', egw.MODULE_WND_LOCAL, function(_app, _wnd)
|
|||||||
i--; // as index will be incr by for!
|
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)
|
if (!_jsFiles.length)
|
||||||
{
|
{
|
||||||
_callback.call(_context);
|
egw_LAB.wait(function(){
|
||||||
|
_callback.call(_context);
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,19 +24,13 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function() {
|
|||||||
*
|
*
|
||||||
* @access: private, use egw.preferences() or egw.set_perferences()
|
* @access: private, use egw.preferences() or egw.set_perferences()
|
||||||
*/
|
*/
|
||||||
var prefs = {
|
var prefs = {};
|
||||||
common: {
|
|
||||||
dateformat: "Y-m-d",
|
|
||||||
timeformat: 24,
|
|
||||||
lang: "en"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Return the actual extension
|
// Return the actual extension
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Setting prefs for an app or 'common'
|
* Setting prefs for an app or 'common'
|
||||||
*
|
*
|
||||||
* @param object _data object with name: value pairs to set
|
* @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
|
* @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
|
* 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!
|
* 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 _name name of the preference, eg. 'dateformat', or '*' to get all the application's preferences
|
||||||
* @param string _app='common'
|
* @param string _app='common'
|
||||||
* @return string preference value
|
* @return string preference value
|
||||||
* @todo add a callback to query it asynchron
|
* @todo add a callback to query it asynchron
|
||||||
*/
|
*/
|
||||||
preference: function(_name, _app)
|
preference: function(_name, _app)
|
||||||
{
|
{
|
||||||
if (typeof _app == 'undefined') _app = 'common';
|
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
|
* Set a preference and sends it to the server
|
||||||
*
|
*
|
||||||
* Server will silently ignore setting preferences, if user has no right to do so!
|
* Server will silently ignore setting preferences, if user has no right to do so!
|
||||||
*
|
*
|
||||||
* @param string _app application name or "common"
|
* @param string _app application name or "common"
|
||||||
* @param string _name name of the pref
|
* @param string _name name of the pref
|
||||||
* @param string _val value of the pref
|
* @param string _val value of the pref
|
||||||
|
Loading…
Reference in New Issue
Block a user