From 0bd5328c19b076a23719b3860296e5507c773d34 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 5 Mar 2016 07:56:58 -0500 Subject: Added Ajax loading icon for submit buttons --- assets/js/src/Popover.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'assets/js/src') diff --git a/assets/js/src/Popover.js b/assets/js/src/Popover.js index 5614de85..3a209e8a 100644 --- a/assets/js/src/Popover.js +++ b/assets/js/src/Popover.js @@ -69,6 +69,11 @@ Popover.prototype.afterOpen = function() { data: popoverForm.serialize(), success: function(data, textStatus, request) { self.afterSubmit(data, request, self); + }, + beforeSend: function() { + var button = $('.popover-form button[type="submit"]'); + button.html(' ' + button.html()); + button.attr("disabled", true); } }); }); -- cgit v1.2.3