|
|
|
@ -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); |
|
|
|
|