Commit 48a7b669 authored by Stijn Smits's avatar Stijn Smits Committed by Kushal Pandya

Add loader to ready/draft button

parent ad80d746
......@@ -72,11 +72,15 @@ MergeRequest.prototype.initMRBtnListeners = function () {
const wipEvent = getParameterValues('merge_request[wip_event]', url)[0];
const mobileDropdown = draftToggle.closest('.dropdown.show');
const loader = document.createElement('span');
loader.classList.add('gl-spinner', 'gl-mr-3');
if (mobileDropdown) {
$(mobileDropdown.firstElementChild).dropdown('toggle');
}
draftToggle.setAttribute('disabled', 'disabled');
draftToggle.prepend(loader);
axios
.put(draftToggle.href, null, { params: { format: 'json' } })
......
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