Commit 96d962bc authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'add-loading-state-to-ready-draft-button' into 'master'

Add loader to ready/draft button

See merge request gitlab-org/gitlab!84513
parents c1f99e6f 48a7b669
......@@ -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