commit
d42eb81f6a
|
@ -54,7 +54,7 @@
|
||||||
if (this.is_multiple) {
|
if (this.is_multiple) {
|
||||||
container_div.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>');
|
container_div.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>');
|
||||||
} else {
|
} else {
|
||||||
container_div.html('<a href="#" class="chzn-single"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" /></div><ul class="chzn-results"></ul></div>');
|
container_div.html('<a href="javascript:void(0)" class="chzn-single"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" /></div><ul class="chzn-results"></ul></div>');
|
||||||
}
|
}
|
||||||
this.form_field_jq.hide().after(container_div);
|
this.form_field_jq.hide().after(container_div);
|
||||||
this.container = $('#' + this.container_id);
|
this.container = $('#' + this.container_id);
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
var choice_id, link;
|
var choice_id, link;
|
||||||
choice_id = this.form_field.id + "_chzn_c_" + item.array_index;
|
choice_id = this.form_field.id + "_chzn_c_" + item.array_index;
|
||||||
this.choices += 1;
|
this.choices += 1;
|
||||||
this.search_container.before('<li class="search-choice" id="' + choice_id + '"><span>' + item.text + '</span><a href="#" class="search-choice-close" rel="' + item.array_index + '"></a></li>');
|
this.search_container.before('<li class="search-choice" id="' + choice_id + '"><span>' + item.text + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + item.array_index + '"></a></li>');
|
||||||
link = $('#' + choice_id).find("a").first();
|
link = $('#' + choice_id).find("a").first();
|
||||||
return link.click(__bind(function(evt) {
|
return link.click(__bind(function(evt) {
|
||||||
return this.choice_destroy_link_click(evt);
|
return this.choice_destroy_link_click(evt);
|
||||||
|
|
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
|
@ -28,9 +28,9 @@
|
||||||
this.result_highlighted = null;
|
this.result_highlighted = null;
|
||||||
this.result_single_selected = null;
|
this.result_single_selected = null;
|
||||||
this.choices = 0;
|
this.choices = 0;
|
||||||
this.single_temp = new Template('<a href="#" 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" /></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" /></div><ul class="chzn-results"></ul></div>');
|
||||||
this.multi_temp = new Template('<ul class="chzn-choices"><li class="search-field"><input type="text" value="#{default}" class="default" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>');
|
this.multi_temp = new Template('<ul class="chzn-choices"><li class="search-field"><input type="text" value="#{default}" class="default" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>');
|
||||||
this.choice_temp = new Template('<li class="search-choice" id="#{id}"><span>#{choice}</span><a href="#" class="search-choice-close" rel="#{position}"></a></li>');
|
this.choice_temp = new Template('<li class="search-choice" id="#{id}"><span>#{choice}</span><a href="javascript:void(0)" class="search-choice-close" rel="#{position}"></a></li>');
|
||||||
return this.no_results_temp = new Template('<li class="no-results">No results match "<span>#{terms}</span>"</li>');
|
return this.no_results_temp = new Template('<li class="no-results">No results match "<span>#{terms}</span>"</li>');
|
||||||
};
|
};
|
||||||
Chosen.prototype.set_up_html = function() {
|
Chosen.prototype.set_up_html = function() {
|
||||||
|
|
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
|
@ -58,7 +58,7 @@ class Chosen
|
||||||
if @is_multiple
|
if @is_multiple
|
||||||
container_div.html '<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + @default_text + '" class="default" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'
|
container_div.html '<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + @default_text + '" class="default" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'
|
||||||
else
|
else
|
||||||
container_div.html '<a href="#" class="chzn-single"><span>' + @default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" /></div><ul class="chzn-results"></ul></div>';
|
container_div.html '<a href="javascript:void(0)" class="chzn-single"><span>' + @default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" /></div><ul class="chzn-results"></ul></div>';
|
||||||
|
|
||||||
@form_field_jq.hide().after container_div
|
@form_field_jq.hide().after container_div
|
||||||
@container = ($ '#' + @container_id)
|
@container = ($ '#' + @container_id)
|
||||||
|
@ -320,7 +320,7 @@ class Chosen
|
||||||
choice_build: (item) ->
|
choice_build: (item) ->
|
||||||
choice_id = @form_field.id + "_chzn_c_" + item.array_index
|
choice_id = @form_field.id + "_chzn_c_" + item.array_index
|
||||||
@choices += 1
|
@choices += 1
|
||||||
@search_container.before '<li class="search-choice" id="' + choice_id + '"><span>' + item.text + '</span><a href="#" class="search-choice-close" rel="' + item.array_index + '"></a></li>'
|
@search_container.before '<li class="search-choice" id="' + choice_id + '"><span>' + item.text + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + item.array_index + '"></a></li>'
|
||||||
link = $('#' + choice_id).find("a").first()
|
link = $('#' + choice_id).find("a").first()
|
||||||
link.click (evt) => this.choice_destroy_link_click(evt)
|
link.click (evt) => this.choice_destroy_link_click(evt)
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,9 @@ class Chosen
|
||||||
@choices = 0
|
@choices = 0
|
||||||
|
|
||||||
# HTML Templates
|
# HTML Templates
|
||||||
@single_temp = new Template('<a href="#" 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" /></div><ul class="chzn-results"></ul></div>')
|
@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" /></div><ul class="chzn-results"></ul></div>')
|
||||||
@multi_temp = new Template('<ul class="chzn-choices"><li class="search-field"><input type="text" value="#{default}" class="default" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>')
|
@multi_temp = new Template('<ul class="chzn-choices"><li class="search-field"><input type="text" value="#{default}" class="default" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>')
|
||||||
@choice_temp = new Template('<li class="search-choice" id="#{id}"><span>#{choice}</span><a href="#" class="search-choice-close" rel="#{position}"></a></li>')
|
@choice_temp = new Template('<li class="search-choice" id="#{id}"><span>#{choice}</span><a href="javascript:void(0)" class="search-choice-close" rel="#{position}"></a></li>')
|
||||||
@no_results_temp = new Template('<li class="no-results">No results match "<span>#{terms}</span>"</li>')
|
@no_results_temp = new Template('<li class="no-results">No results match "<span>#{terms}</span>"</li>')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue