Skip to content

Commit 691be65

Browse files
committed
replace chosen- with chzn-
1 parent 863b5f9 commit 691be65

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

media/jui/js/chosen.jquery.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -593,18 +593,18 @@ This file is generated by `grunt build`, do not edit it by hand.
593593
Chosen.prototype.setup = function() {
594594
this.form_field_jq = $(this.form_field);
595595
this.current_selectedIndex = this.form_field.selectedIndex;
596-
return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
596+
return this.is_rtl = this.form_field_jq.hasClass("chzn-rtl");
597597
};
598598

599599
Chosen.prototype.set_up_html = function() {
600600
var container_classes, container_props;
601-
container_classes = ["chosen-container"];
602-
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
601+
container_classes = ["chzn-container"];
602+
container_classes.push("chzn-container-" + (this.is_multiple ? "multi" : "single"));
603603
if (this.inherit_select_classes && this.form_field.className) {
604604
container_classes.push(this.form_field.className);
605605
}
606606
if (this.is_rtl) {
607-
container_classes.push("chosen-rtl");
607+
container_classes.push("chzn-rtl");
608608
}
609609
container_props = {
610610
'class': container_classes.join(' '),
@@ -616,22 +616,22 @@ This file is generated by `grunt build`, do not edit it by hand.
616616
}
617617
this.container = $("<div />", container_props);
618618
if (this.is_multiple) {
619-
this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
619+
this.container.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop"><ul class="chzn-results"></ul></div>');
620620
} else {
621-
this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
621+
this.container.html('<a class="chzn-single chzn-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chzn-drop"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>');
622622
}
623623
this.form_field_jq.hide().after(this.container);
624-
this.dropdown = this.container.find('div.chosen-drop').first();
624+
this.dropdown = this.container.find('div.chzn-drop').first();
625625
this.search_field = this.container.find('input').first();
626-
this.search_results = this.container.find('ul.chosen-results').first();
626+
this.search_results = this.container.find('ul.chzn-results').first();
627627
this.search_field_scale();
628628
this.search_no_results = this.container.find('li.no-results').first();
629629
if (this.is_multiple) {
630-
this.search_choices = this.container.find('ul.chosen-choices').first();
630+
this.search_choices = this.container.find('ul.chzn-choices').first();
631631
this.search_container = this.container.find('li.search-field').first();
632632
} else {
633-
this.search_container = this.container.find('div.chosen-search').first();
634-
this.selected_item = this.container.find('.chosen-single').first();
633+
this.search_container = this.container.find('div.chzn-search').first();
634+
this.selected_item = this.container.find('.chzn-single').first();
635635
}
636636
this.results_build();
637637
this.set_tab_index();
@@ -741,14 +741,14 @@ This file is generated by `grunt build`, do not edit it by hand.
741741
Chosen.prototype.search_field_disabled = function() {
742742
this.is_disabled = this.form_field_jq[0].disabled;
743743
if (this.is_disabled) {
744-
this.container.addClass('chosen-disabled');
744+
this.container.addClass('chzn-disabled');
745745
this.search_field[0].disabled = true;
746746
if (!this.is_multiple) {
747747
this.selected_item.unbind("focus.chosen", this.activate_action);
748748
}
749749
return this.close_field();
750750
} else {
751-
this.container.removeClass('chosen-disabled');
751+
this.container.removeClass('chzn-disabled');
752752
this.search_field[0].disabled = false;
753753
if (!this.is_multiple) {
754754
return this.selected_item.bind("focus.chosen", this.activate_action);
@@ -768,7 +768,7 @@ This file is generated by `grunt build`, do not edit it by hand.
768768
}
769769
$(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
770770
this.results_show();
771-
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
771+
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chzn-single").length)) {
772772
evt.preventDefault();
773773
this.results_toggle();
774774
}
@@ -798,7 +798,7 @@ This file is generated by `grunt build`, do not edit it by hand.
798798
};
799799

800800
Chosen.prototype.blur_test = function(evt) {
801-
if (!this.active_field && this.container.hasClass("chosen-container-active")) {
801+
if (!this.active_field && this.container.hasClass("chzn-container-active")) {
802802
return this.close_field();
803803
}
804804
};
@@ -807,22 +807,22 @@ This file is generated by `grunt build`, do not edit it by hand.
807807
$(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
808808
this.active_field = false;
809809
this.results_hide();
810-
this.container.removeClass("chosen-container-active");
810+
this.container.removeClass("chzn-container-active");
811811
this.clear_backstroke();
812812
this.show_search_field_default();
813813
return this.search_field_scale();
814814
};
815815

816816
Chosen.prototype.activate_field = function() {
817-
this.container.addClass("chosen-container-active");
817+
this.container.addClass("chzn-container-active");
818818
this.active_field = true;
819819
this.search_field.val(this.search_field.val());
820820
return this.search_field.focus();
821821
};
822822

823823
Chosen.prototype.test_active_click = function(evt) {
824824
var active_container;
825-
active_container = $(evt.target).closest('.chosen-container');
825+
active_container = $(evt.target).closest('.chzn-container');
826826
if (active_container.length && this.container[0] === active_container[0]) {
827827
return this.active_field = true;
828828
} else {
@@ -840,10 +840,10 @@ This file is generated by `grunt build`, do not edit it by hand.
840840
this.single_set_selected_text();
841841
if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
842842
this.search_field[0].readOnly = true;
843-
this.container.addClass("chosen-container-single-nosearch");
843+
this.container.addClass("chzn-container-single-nosearch");
844844
} else {
845845
this.search_field[0].readOnly = false;
846-
this.container.removeClass("chosen-container-single-nosearch");
846+
this.container.removeClass("chzn-container-single-nosearch");
847847
}
848848
}
849849
this.update_results_content(this.results_option_build({
@@ -888,7 +888,7 @@ This file is generated by `grunt build`, do not edit it by hand.
888888
});
889889
return false;
890890
}
891-
this.container.addClass("chosen-with-drop");
891+
this.container.addClass("chzn-with-drop");
892892
this.results_showing = true;
893893
this.search_field.focus();
894894
this.search_field.val(this.search_field.val());
@@ -905,7 +905,7 @@ This file is generated by `grunt build`, do not edit it by hand.
905905
Chosen.prototype.results_hide = function() {
906906
if (this.results_showing) {
907907
this.result_clear_highlight();
908-
this.container.removeClass("chosen-with-drop");
908+
this.container.removeClass("chzn-with-drop");
909909
this.form_field_jq.trigger("chosen:hiding_dropdown", {
910910
chosen: this
911911
});
@@ -1076,10 +1076,10 @@ This file is generated by `grunt build`, do not edit it by hand.
10761076
text = this.default_text;
10771077
}
10781078
if (text === this.default_text) {
1079-
this.selected_item.addClass("chosen-default");
1079+
this.selected_item.addClass("chzn-default");
10801080
} else {
10811081
this.single_deselect_control_build();
1082-
this.selected_item.removeClass("chosen-default");
1082+
this.selected_item.removeClass("chzn-default");
10831083
}
10841084
return this.selected_item.find("span").html(text);
10851085
};
@@ -1112,7 +1112,7 @@ This file is generated by `grunt build`, do not edit it by hand.
11121112
if (!this.selected_item.find("abbr").length) {
11131113
this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
11141114
}
1115-
return this.selected_item.addClass("chosen-single-with-deselect");
1115+
return this.selected_item.addClass("chzn-single-with-deselect");
11161116
};
11171117

11181118
Chosen.prototype.get_search_text = function() {

0 commit comments

Comments
 (0)