mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
AssetAdmin reset button and chosen.js (fixes #1640)
See https://github.com/harvesthq/chosen/issues/215
This commit is contained in:
parent
88595e38f9
commit
65209a0ed5
@ -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();
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user