When using allow_single_deselect, first element must have blank text.
This commit is contained in:
parent
5a783bbb96
commit
eb2636838e
6 changed files with 6 additions and 6 deletions
|
@ -52,7 +52,7 @@
|
||||||
this.results_showing = false;
|
this.results_showing = false;
|
||||||
this.result_highlighted = null;
|
this.result_highlighted = null;
|
||||||
this.result_single_selected = null;
|
this.result_single_selected = null;
|
||||||
this.allow_single_deselect = this.options.allow_single_deselect || false;
|
this.allow_single_deselect = (this.options.allow_single_deselect != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
|
||||||
this.choices = 0;
|
this.choices = 0;
|
||||||
return this.results_none_found = this.options.no_results_text || "No results match";
|
return this.results_none_found = this.options.no_results_text || "No results match";
|
||||||
};
|
};
|
||||||
|
|
2
chosen/chosen.jquery.min.js
vendored
2
chosen/chosen.jquery.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -38,7 +38,7 @@
|
||||||
this.results_showing = false;
|
this.results_showing = false;
|
||||||
this.result_highlighted = null;
|
this.result_highlighted = null;
|
||||||
this.result_single_selected = null;
|
this.result_single_selected = null;
|
||||||
this.allow_single_deselect = this.options.allow_single_deselect || false;
|
this.allow_single_deselect = (this.options.allow_single_deselect != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
|
||||||
this.choices = 0;
|
this.choices = 0;
|
||||||
this.results_none_found = this.options.no_results_text || "No results match";
|
this.results_none_found = this.options.no_results_text || "No results match";
|
||||||
this.single_temp = new Template('<a href="javascript:void(0)" class="chzn-single"><span>#{default}</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>');
|
this.single_temp = new Template('<a href="javascript:void(0)" class="chzn-single"><span>#{default}</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>');
|
||||||
|
|
2
chosen/chosen.proto.min.js
vendored
2
chosen/chosen.proto.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -37,7 +37,7 @@ class Chosen
|
||||||
@results_showing = false
|
@results_showing = false
|
||||||
@result_highlighted = null
|
@result_highlighted = null
|
||||||
@result_single_selected = null
|
@result_single_selected = null
|
||||||
@allow_single_deselect = @options.allow_single_deselect || false
|
@allow_single_deselect = if @options.allow_single_deselect? and @form_field.options[0].text == "" then @options.allow_single_deselect else false
|
||||||
@choices = 0
|
@choices = 0
|
||||||
@results_none_found = @options.no_results_text or "No results match"
|
@results_none_found = @options.no_results_text or "No results match"
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Chosen
|
||||||
@results_showing = false
|
@results_showing = false
|
||||||
@result_highlighted = null
|
@result_highlighted = null
|
||||||
@result_single_selected = null
|
@result_single_selected = null
|
||||||
@allow_single_deselect = @options.allow_single_deselect || false
|
@allow_single_deselect = if @options.allow_single_deselect? and @form_field.options[0].text == "" then @options.allow_single_deselect else false
|
||||||
@choices = 0
|
@choices = 0
|
||||||
|
|
||||||
@results_none_found = @options.no_results_text or "No results match"
|
@results_none_found = @options.no_results_text or "No results match"
|
||||||
|
|
Loading…
Reference in a new issue