summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/dispatcher.js
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-04-10 15:51:24 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-04-20 13:34:18 -0500
commit36387ce1b4a687a41f450c9fcccc348e478ca296 (patch)
treef22ef9dcfaef98e2bd643d63ec5e06fa46d28cfd /app/assets/javascripts/dispatcher.js
parent60a6389a7223f14156aeeec9a3854f8ea88de1f0 (diff)
downloadgitlab-ce-36387ce1b4a687a41f450c9fcccc348e478ca296.tar.gz
Add Fork/Cancel confirmation to "Replace"/"Delete" buttons30637-replace-delete-buttons-get-fork-cancel-confirmation
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/30637
Diffstat (limited to 'app/assets/javascripts/dispatcher.js')
-rw-r--r--app/assets/javascripts/dispatcher.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index 02a7df9b2a0..20db2698ba8 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -91,11 +91,13 @@ const ShortcutsBlob = require('./shortcuts_blob');
fileBlobPermalinkUrl,
});
- new BlobForkSuggestion(
- document.querySelector('.js-edit-blob-link-fork-toggler'),
- document.querySelector('.js-cancel-fork-suggestion'),
- document.querySelector('.js-file-fork-suggestion-section'),
- );
+ new BlobForkSuggestion({
+ openButtons: document.querySelectorAll('.js-edit-blob-link-fork-toggler'),
+ forkButtons: document.querySelectorAll('.js-fork-suggestion-button'),
+ cancelButtons: document.querySelectorAll('.js-cancel-fork-suggestion-button'),
+ suggestionSections: document.querySelectorAll('.js-file-fork-suggestion-section'),
+ actionTextPieces: document.querySelectorAll('.js-file-fork-suggestion-section-action'),
+ });
}
switch (page) {