AssetAdmin reset button and chosen.js (fixes #1640)

See https://github.com/harvesthq/chosen/issues/215
This commit is contained in:
Ingo Schommer 2013-06-13 00:45:41 +02:00
parent 88595e38f9
commit 65209a0ed5

View File

@ -974,13 +974,14 @@ jQuery.noConflict();
/**
* Reset button handler. IE8 does not bubble reset events to
*/
$(".cms-search-form button[type=reset]").entwine({
$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({
onclick: function(e) {
e.preventDefault();
var form = $(this).parents('form');
form.clearForm();
form.find(".dropdown select").prop('selectedIndex', 0).trigger("liszt:updated"); // Reset chosen.js
form.submit();
}
})