Author: nathangray
New Revision: 55340
URL: http://svn.stylite.de/viewvc/egroupware?rev=55340&view=rev
Log:
Need to get cachable options synchronously if it’s a read only in a nextmatch row as we won’t be able to set it later
Modified:
trunk/etemplate/js/et2_widget_selectbox.js
— trunk/etemplate/js/et2_widget_selectbox.js (original)
+++ trunk/etemplate/js/et2_widget_selectbox.js Wed Mar 9 22:05:09 2016
@@ -1109,17 +1109,34 @@
var cache_id = widget._type+'_'+options_string;
var cache = egw.window.et2_selectbox.type_cache[cache_id];
-
-
// Options for a selectbox in a nextmatch must be returned now, as the
-
// widget we have is not enough to set the options later.
-
var in_nextmatch = false;
-
if(typeof cache === 'undefined' || typeof cache.length === 'undefined')
-
{
-
var parent = widget._parent;
-
while(parent !== null && !in_nextmatch)
-
{
-
in_nextmatch = (parent._type === 'nextmatch')
-
parent = parent._parent;
-
}
-
}
-
if (typeof cache == 'undefined' || in_nextmatch)
{
// Fetch with json instead of jsonq because there may be more than
// one widget listening for the response by the time it gets back,
// and we can't do that when it's queued.
-
var req = egw.json(
widget.getInstanceManager().app+'.etemplate_widget_menupopup.ajax_get_options.etemplate',
[widget._type,options_string,attrs.value]
-
).sendRequest(!in_nextmatch);
-
if(typeof cache === 'undefined')
-
{
-
egw.window.et2_selectbox.type_cache[cache_id] = req;
-
}
-
cache = req;
-
}
if(typeof cache.done == 'function')
{
// pending, wait for it
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs