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