Skip to content

Commit

Permalink
Toggle disabled state for buttons/checkboxes on architectures AJAX ev…
Browse files Browse the repository at this point in the history
…ents

To prevent multiple clicks
  • Loading branch information
dmarcoux committed Feb 25, 2019
1 parent db98283 commit d5009ad
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -26,6 +26,7 @@
- content_for :ready_function do
:plain
$('#architectures').on('ajax:before ajax:complete', '.custom-control-input, .filter-button', function() {
$(this).prop('disabled', function(_, previousValue) { return !previousValue; });
$(this).siblings('i.fa-spinner').toggleClass('fa-spin invisible');
});
$('.filter-button').on('ajax:success', function() {
Expand Down

0 comments on commit d5009ad

Please sign in to comment.