From 691be65de111d1e6fb25e06a6037981ec13514bd Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Wed, 24 Aug 2016 16:42:49 +0100 Subject: [PATCH] replace chosen- with chzn- --- media/jui/js/chosen.jquery.js | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/media/jui/js/chosen.jquery.js b/media/jui/js/chosen.jquery.js index 060c16284240f..14c0516a67afd 100755 --- a/media/jui/js/chosen.jquery.js +++ b/media/jui/js/chosen.jquery.js @@ -593,18 +593,18 @@ This file is generated by `grunt build`, do not edit it by hand. Chosen.prototype.setup = function() { this.form_field_jq = $(this.form_field); this.current_selectedIndex = this.form_field.selectedIndex; - return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl"); + return this.is_rtl = this.form_field_jq.hasClass("chzn-rtl"); }; Chosen.prototype.set_up_html = function() { var container_classes, container_props; - container_classes = ["chosen-container"]; - container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single")); + container_classes = ["chzn-container"]; + container_classes.push("chzn-container-" + (this.is_multiple ? "multi" : "single")); if (this.inherit_select_classes && this.form_field.className) { container_classes.push(this.form_field.className); } if (this.is_rtl) { - container_classes.push("chosen-rtl"); + container_classes.push("chzn-rtl"); } container_props = { 'class': container_classes.join(' '), @@ -616,22 +616,22 @@ This file is generated by `grunt build`, do not edit it by hand. } this.container = $("
", container_props); if (this.is_multiple) { - this.container.html('
    '); + this.container.html('
      '); } else { - this.container.html('' + this.default_text + '
        '); + this.container.html('' + this.default_text + '
          '); } this.form_field_jq.hide().after(this.container); - this.dropdown = this.container.find('div.chosen-drop').first(); + this.dropdown = this.container.find('div.chzn-drop').first(); this.search_field = this.container.find('input').first(); - this.search_results = this.container.find('ul.chosen-results').first(); + this.search_results = this.container.find('ul.chzn-results').first(); this.search_field_scale(); this.search_no_results = this.container.find('li.no-results').first(); if (this.is_multiple) { - this.search_choices = this.container.find('ul.chosen-choices').first(); + this.search_choices = this.container.find('ul.chzn-choices').first(); this.search_container = this.container.find('li.search-field').first(); } else { - this.search_container = this.container.find('div.chosen-search').first(); - this.selected_item = this.container.find('.chosen-single').first(); + this.search_container = this.container.find('div.chzn-search').first(); + this.selected_item = this.container.find('.chzn-single').first(); } this.results_build(); this.set_tab_index(); @@ -741,14 +741,14 @@ This file is generated by `grunt build`, do not edit it by hand. Chosen.prototype.search_field_disabled = function() { this.is_disabled = this.form_field_jq[0].disabled; if (this.is_disabled) { - this.container.addClass('chosen-disabled'); + this.container.addClass('chzn-disabled'); this.search_field[0].disabled = true; if (!this.is_multiple) { this.selected_item.unbind("focus.chosen", this.activate_action); } return this.close_field(); } else { - this.container.removeClass('chosen-disabled'); + this.container.removeClass('chzn-disabled'); this.search_field[0].disabled = false; if (!this.is_multiple) { 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. } $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action); this.results_show(); - } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) { + } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chzn-single").length)) { evt.preventDefault(); this.results_toggle(); } @@ -798,7 +798,7 @@ This file is generated by `grunt build`, do not edit it by hand. }; Chosen.prototype.blur_test = function(evt) { - if (!this.active_field && this.container.hasClass("chosen-container-active")) { + if (!this.active_field && this.container.hasClass("chzn-container-active")) { return this.close_field(); } }; @@ -807,14 +807,14 @@ This file is generated by `grunt build`, do not edit it by hand. $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action); this.active_field = false; this.results_hide(); - this.container.removeClass("chosen-container-active"); + this.container.removeClass("chzn-container-active"); this.clear_backstroke(); this.show_search_field_default(); return this.search_field_scale(); }; Chosen.prototype.activate_field = function() { - this.container.addClass("chosen-container-active"); + this.container.addClass("chzn-container-active"); this.active_field = true; this.search_field.val(this.search_field.val()); return this.search_field.focus(); @@ -822,7 +822,7 @@ This file is generated by `grunt build`, do not edit it by hand. Chosen.prototype.test_active_click = function(evt) { var active_container; - active_container = $(evt.target).closest('.chosen-container'); + active_container = $(evt.target).closest('.chzn-container'); if (active_container.length && this.container[0] === active_container[0]) { return this.active_field = true; } else { @@ -840,10 +840,10 @@ This file is generated by `grunt build`, do not edit it by hand. this.single_set_selected_text(); if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) { this.search_field[0].readOnly = true; - this.container.addClass("chosen-container-single-nosearch"); + this.container.addClass("chzn-container-single-nosearch"); } else { this.search_field[0].readOnly = false; - this.container.removeClass("chosen-container-single-nosearch"); + this.container.removeClass("chzn-container-single-nosearch"); } } 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. }); return false; } - this.container.addClass("chosen-with-drop"); + this.container.addClass("chzn-with-drop"); this.results_showing = true; this.search_field.focus(); 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. Chosen.prototype.results_hide = function() { if (this.results_showing) { this.result_clear_highlight(); - this.container.removeClass("chosen-with-drop"); + this.container.removeClass("chzn-with-drop"); this.form_field_jq.trigger("chosen:hiding_dropdown", { chosen: this }); @@ -1076,10 +1076,10 @@ This file is generated by `grunt build`, do not edit it by hand. text = this.default_text; } if (text === this.default_text) { - this.selected_item.addClass("chosen-default"); + this.selected_item.addClass("chzn-default"); } else { this.single_deselect_control_build(); - this.selected_item.removeClass("chosen-default"); + this.selected_item.removeClass("chzn-default"); } return this.selected_item.find("span").html(text); }; @@ -1112,7 +1112,7 @@ This file is generated by `grunt build`, do not edit it by hand. if (!this.selected_item.find("abbr").length) { this.selected_item.find("span").first().after(""); } - return this.selected_item.addClass("chosen-single-with-deselect"); + return this.selected_item.addClass("chzn-single-with-deselect"); }; Chosen.prototype.get_search_text = function() {