Change a couple of prototype-style references into jQuery references. Fixes group display on search and deselect issues.
This commit is contained in:
parent
a3c9ea9a29
commit
e4a8f08843
|
@ -427,7 +427,7 @@
|
|||
result_data = this.results_data[pos];
|
||||
result_data.selected = false;
|
||||
this.form_field.options[result_data.options_index].selected = false;
|
||||
result = $(this.form_field.id + "chzn_o_" + pos);
|
||||
result = $("#" + this.form_field.id + "chzn_o_" + pos);
|
||||
result.removeClass("result-selected").addClass("active-result").show();
|
||||
this.result_clear_highlight();
|
||||
this.winnow_results();
|
||||
|
@ -454,7 +454,7 @@
|
|||
option = _ref[_i];
|
||||
if (!option.disabled && !option.empty) {
|
||||
if (option.group) {
|
||||
$(option.dom_id).hide();
|
||||
$('#' + option.dom_id).hide();
|
||||
} else if (!(this.is_multiple && option.selected)) {
|
||||
found = false;
|
||||
result_id = option.dom_id;
|
||||
|
|
|
@ -379,7 +379,7 @@ class Chosen
|
|||
result_data.selected = false
|
||||
|
||||
@form_field.options[result_data.options_index].selected = false
|
||||
result = $(@form_field.id + "chzn_o_" + pos)
|
||||
result = $("#" + @form_field.id + "chzn_o_" + pos)
|
||||
result.removeClass("result-selected").addClass("active-result").show()
|
||||
|
||||
this.result_clear_highlight()
|
||||
|
@ -407,7 +407,7 @@ class Chosen
|
|||
for option in @results_data
|
||||
if not option.disabled and not option.empty
|
||||
if option.group
|
||||
$(option.dom_id).hide()
|
||||
$('#' + option.dom_id).hide()
|
||||
else if not (@is_multiple and option.selected)
|
||||
found = false
|
||||
result_id = option.dom_id
|
||||
|
|
Loading…
Reference in a new issue