- Apply 'none' user selection preference (with admin consideration)

- Avoid potential infinite loop with no select options
This commit is contained in:
Nathan Gray
2014-09-29 20:37:23 +00:00
parent 0f9adabe4a
commit 84821bef95
2 changed files with 11 additions and 3 deletions

View File

@@ -440,7 +440,9 @@ var et2_selectbox = et2_inputWidget.extend(
{
_value = _value.split(',');
}
if(this.input !== null && this.options.select_options && this.input.children().length == 0)
if(this.input !== null && this.options.select_options && (
!jQuery.isEmptyObject(this.options.select_options) || this.options.select_options.length > 0
) && this.input.children().length == 0)
{
// No options set yet
this.set_select_options(this.options.select_options);