diff --git a/etemplate/js/et2_core_valueWidget.js b/etemplate/js/et2_core_valueWidget.js index 3645b069a8..ae0a0fab1b 100644 --- a/etemplate/js/et2_core_valueWidget.js +++ b/etemplate/js/et2_core_valueWidget.js @@ -56,7 +56,7 @@ var et2_valueWidget = et2_baseWidget.extend( // Set the value for this element var contentMgr = this.getArrayMgr("content"); if (contentMgr != null) { - var val = contentMgr.getEntry(this.id); + var val = contentMgr.getEntry(this.id,false,true); if (val !== null) { _attrs["value"] = val; diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 5fda74654b..1bba2edac8 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -3362,7 +3362,10 @@ var et2_nextmatch_customfilter = et2_nextmatch_filterheader.extend( this.real_node._type = _attrs.widget_type; et2_selectbox.find_select_options(this.real_node, select_options, _attrs); this.real_node._type = correct_type; - this.real_node.set_select_options(select_options); + if(typeof this.real_node.set_select_options === 'function') + { + this.real_node.set_select_options(select_options); + } }, // Just pass the real DOM node through, in case anybody asks @@ -3372,7 +3375,7 @@ var et2_nextmatch_customfilter = et2_nextmatch_filterheader.extend( // Also need to pass through real children getChildren: function() { - return this.real_node.getChildren(); + return this.real_node.getChildren() || []; }, setNextmatch: function(_nextmatch) { diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index fcadbbda37..21df559b2c 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -553,7 +553,7 @@ var et2_selectbox = et2_inputWidget.extend( this.options.expand_multiple_rows = _rows; var surroundings = this.getSurroundings(); - if(_rows <= 1 ) + if(_rows <= 1 && this.expand_button ) { // Remove surroundings.removeDOMNode(this.expand_button.get(0)); @@ -1099,7 +1099,11 @@ jQuery.extend(et2_selectbox, attrs.select_options = egw.window.et2_selectbox.type_cache[this.cache_id]; egw.window.setTimeout(jQuery.proxy(function() { - this.widget.set_select_options(et2_selectbox.find_select_options(this.widget,{}, this.widget.options)); + // Avoid errors if widget is destroyed before the timeout + if(this.widget && typeof this.widget.id !== 'undefined') + { + this.widget.set_select_options(et2_selectbox.find_select_options(this.widget,{}, this.widget.options)); + } },this),1); },{widget:widget,cache_id:cache_id})); return [];