Do not fail if selectbox cannot find the top level definition, just make a new cache for the scope

This commit is contained in:
Nathan Gray 2016-03-18 15:46:08 +00:00
parent c2eaabaa5b
commit e5cb830108

View File

@ -1108,7 +1108,11 @@ jQuery.extend(et2_selectbox, //(function(){ "use strict"; return
options_string = options_string.replace(/,+$/, ''); options_string = options_string.replace(/,+$/, '');
var cache_id = widget._type+'_'+options_string; var cache_id = widget._type+'_'+options_string;
var cache = egw.window.et2_selectbox.type_cache[cache_id]; var cache = (
egw.window.et2_selectbox ?
egw.window.et2_selectbox :
egw(window).window.et2_selectbox
).type_cache[cache_id] || {};
// Options for a selectbox in a nextmatch must be returned now, as the // Options for a selectbox in a nextmatch must be returned now, as the
// widget we have is not enough to set the options later. // widget we have is not enough to set the options later.