1
0
mirror of https://github.com/EGroupware/egroupware.git synced 2024-12-30 18:49:24 +01:00
egroupware_official/phpgwapi/js/jsapi/egw_config.js
Ralf Becker 7f8b201330 * Mail/IE: fixed compose popup did not open again after it was closed eg. mail was send
r51526: fix wrong parameter order in call to egw.config() by removing it completly, as session is anway instance specific (and due to wrong order returned key was always empty)
r51527: garding againts data set in egw object by reference from an other window, causing data to be inaccessible in IE after window closes
r51528: removing an other unnecessary egw_info[flags][js_link_registry]=true
2015-02-02 19:54:53 +00:00

59 lines
1.3 KiB
JavaScript

/**
* EGroupware clientside API object
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package etemplate
* @subpackage api
* @link http://www.egroupware.org
* @author Andreas Stöckel (as AT stylite.de)
* @author Ralf Becker <RalfBecker@outdoor-training.de>
* @version $Id$
*/
"use strict";
/*egw:uses
egw_core;
*/
egw.extend('config', egw.MODULE_GLOBAL, function() {
/**
* Clientside config
*
* @access: private, use egw.config(_name, _app="phpgwapi")
*/
var configs = {};
return {
/**
* Query clientside config
*
* @param {string} _name name of config variable
* @param {string} _app default "phpgwapi"
* @return mixed
*/
config: function (_name, _app)
{
if (typeof _app == 'undefined') _app = 'phpgwapi';
if (typeof configs[_app] == 'undefined') return null;
return configs[_app][_name];
},
/**
* Set clientside configuration for all apps
*
* @param {object} _configs
* @param {boolean} _need_clone _configs need to be cloned, as it is from different window context
* and therefore will be inaccessible in IE, after that window is closed
*/
set_configs: function(_configs, _need_clone)
{
configs = _need_clone ? jQuery.extend(true, {}, _configs) : _configs;
}
};
});