Browse Source

Merge pull request #563 from matthewperry/7.x-LIB-38

7.x lib 38
pull/564/head
Jordan Dukart 10 years ago
parent
commit
682372fb63
  1. 9
      js/spinner.js

9
js/spinner.js

@ -22,9 +22,11 @@
});
for (var base in settings.spinner) {
var id = '#' + base;
// Don't add spinner to the hidden next/ingest button.
if (id != '#edit-hidden-next') {
$(id, context).once('spinner', function () {
var spinner = new Spinner(settings.spinner[base].opts);
$(id).parents('form').one('submit', function(event) {
$(id).parents('form').one('submit', function (event) {
if ($(this).data('clicked').is(id)) {
event.preventDefault();
// Add Message.
@ -39,12 +41,12 @@
if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
$(':submit').attr('disabled', 'disabled');
}
setTimeout(function() {
setTimeout(function () {
// Allow for the button to be clicked, then click it then
// prevent the default behavoir.
$(id).removeAttr('disabled')
.click()
.click(function(event) {
.click(function (event) {
event.preventDefault();
});
}, 500);
@ -54,5 +56,6 @@
});
}
}
}
};
})(jQuery);

Loading…
Cancel
Save