From f337d45b2912fe98c056ac1ff9f364c9388895bc Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 17 Mar 2014 20:24:34 +0000 Subject: [PATCH] Fix taglist-account not suggesting anything by making sure select_options don't get set. --- etemplate/js/et2_widget_selectbox.js | 4 +++- etemplate/js/et2_widget_taglist.js | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index 48c7f39c26..7d4209ff50 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -159,7 +159,9 @@ var et2_selectbox = et2_inputWidget.extend( // If select_options are already known, skip the rest if(this.options && this.options.select_options && !jQuery.isEmptyObject(this.options.select_options) || - _attrs.select_options && !jQuery.isEmptyObject(_attrs.select_options) + _attrs.select_options && !jQuery.isEmptyObject(_attrs.select_options) || + // Allow children to skip select_options - check to make sure default got set to something (should be {}) + typeof _attrs.select_options == 'undefined' || _attrs.select_options === null ) { return; diff --git a/etemplate/js/et2_widget_taglist.js b/etemplate/js/et2_widget_taglist.js index be28587617..8c615abcfc 100644 --- a/etemplate/js/et2_widget_taglist.js +++ b/etemplate/js/et2_widget_taglist.js @@ -376,6 +376,11 @@ var et2_taglist_account = et2_taglist.extend( set_account_type: function(value) { this.options.autocomplete_params.account_type = this.options.account_type = value; + if(this.taglist != null) + { + // Update taglist too, since it already copied the params + this.taglist.setDataUrlParams(this.options.autocomplete_params); + } }, int_reg_exp: /^[0-9]+$/,