Fix taglist-account not suggesting anything by making sure select_options don't get set.

This commit is contained in:
Nathan Gray 2014-03-17 20:24:34 +00:00
parent bcf8bb8c07
commit f337d45b29
2 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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]+$/,