Merge pull request #325 from kadimi/patch-4

Attach "chosen" to dropdowns correctly
This commit is contained in:
Brian Miyaji
2019-03-12 16:14:40 +11:00
committed by GitHub

View File

@@ -14,13 +14,16 @@ jQuery(document).ready(function($){
}); });
// Chosen select // Chosen select
$(".chosen-select").chosen({ $(document).on("postbox-toggled", function() {
allow_single_deselect: true, $(".chosen-select").filter(":visible").chosen({
search_contains: true, allow_single_deselect: true,
single_backstroke_delete: false, search_contains: true,
disable_search_threshold: 10, single_backstroke_delete: false,
placeholder_text_multiple: localized_strings.none disable_search_threshold: 10,
}); placeholder_text_multiple: localized_strings.none
});
}).trigger("postbox-toggled");
// Auto key placeholder // Auto key placeholder
$("#poststuff #title").on("keyup", function() { $("#poststuff #title").on("keyup", function() {
@@ -886,4 +889,4 @@ jQuery(document).ready(function($){
// Trigger box score time converter // Trigger box score time converter
$('.sp-convert-time-input').change(); $('.sp-convert-time-input').change();
}); });