Avoid triggering onChange event when loading

This commit is contained in:
Nathan Gray 2016-02-25 16:17:40 +00:00
parent 254a365911
commit baa28c6939

View File

@ -191,11 +191,11 @@ var et2_taglist = et2_selectbox.extend(
maxSelection: this.options.maxSelection, maxSelection: this.options.maxSelection,
maxSelectionRenderer: jQuery.proxy(function(v) { this.egw().lang('You can not choose more then %1 item(s)!', v); }, this), maxSelectionRenderer: jQuery.proxy(function(v) { this.egw().lang('You can not choose more then %1 item(s)!', v); }, this),
width: this.options.width, // propagate width width: this.options.width, // propagate width
highlight: false, // otherwise renderer have to return strings, highlight: false // otherwise renderer have to return strings
value: this.options.value
}, this.lib_options); }, this.lib_options);
this.taglist = this.taglist.magicSuggest(this.taglist_options); this.taglist = this.taglist.magicSuggest(this.taglist_options);
this.$taglist = $j(this.taglist); this.$taglist = $j(this.taglist);
this.taglist.addToSelection(this.options.value,true);
// AJAX _and_ select options - use custom function // AJAX _and_ select options - use custom function
if(this.options.autocomplete_url && !jQuery.isEmptyObject(this.options.select_options)) if(this.options.autocomplete_url && !jQuery.isEmptyObject(this.options.select_options))