Make sure empty / all / none option is first in the list

This commit is contained in:
Nathan Gray 2012-03-19 19:22:21 +00:00
parent 5f1c65b31e
commit 00c9b4f613

View File

@ -162,7 +162,15 @@ var et2_selectbox = et2_inputWidget.extend({
{ {
option.attr("title", _title); option.attr("title", _title);
} }
if(_label == this.options.empty_label || this.options.empty_label == "" && _value == "")
{
// Make sure empty / all option is first
option.prependTo(this.input);
}
else
{
option.appendTo(this.input); option.appendTo(this.input);
}
}, },
/** /**