Commit c0c06120 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review

Merge "Bug 1737581: Disable copy collection button after first click"

parents 16f35685 84ee402c
......@@ -139,7 +139,7 @@ function formStartProcessing(form, btn) {
processingStart();
var button = jQuery(btn);
if (button.length) {
button.val(get_string('processing') + ' ...');
button.text(get_string('processing') + ' ...');
// we add a hidden input field so the "disabled" button still gets to
// pass its value through
......@@ -149,7 +149,7 @@ function formStartProcessing(form, btn) {
});
button.after(node);
button.attr('disabled', true);
button.prop('disabled', true);
button.blur();
// Start the progress meter if it is enabled.
......
......@@ -110,9 +110,13 @@ jQuery(function($) {
$("#copy-view-button").on('click', function() {
// drop the collection bit from the url
var url = copyurl.replace(/collection=(.*)/, '');
$(this).text(get_string('processing') + ' ...').prop('disabled', true).blur();
processingStart();
window.location = url;
});
$("#copy-collection-button").on('click', function() {
$(this).text(get_string('processing') + ' ...').prop('disabled', true).blur();
processingStart();
window.location = copyurl;
});
......
......@@ -6,5 +6,4 @@
}
.loading-message {
margin-left: 5px;
display: none;
}
\ No newline at end of file
......@@ -55,7 +55,7 @@
<a href="{$WWWROOT}admin/" accesskey="a" class="admin-site">{str tag="administration"}</a>
</div>
{/if}
<div id="loading-box" class="loading-box" style='display:none'></div>
<div id="loading-box" class="loading-box hidden"></div>
</div>
<div class="nav-toggle-area">
{if $MAINNAV}
......
......@@ -6,5 +6,4 @@
}
.loading-message {
margin-left: 5px;
display: none;
}
\ No newline at end of file
......@@ -49,7 +49,7 @@
<img src="{$sitelogosmall}" alt="{$sitename}">
</a>
{/if}
<div id="loading-box" class="loading-box" style='display:none'></div>
<div id="loading-box" class="loading-box hidden"></div>
</div>
{if $MAINNAV}
<!-- Brand and toggle get grouped for better mobile display -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment