diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-11 00:09:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-11 00:09:21 +0300 |
commit | 06bb4eba7828ce59fde366734828458c037059b4 (patch) | |
tree | 44b95a53123d91684cc1c67716ef87cc1c0964fb /app/assets/javascripts/confirm_modal.js | |
parent | 219eead23f9feb5da9ec378c451d773aea2dfe61 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/confirm_modal.js')
-rw-r--r-- | app/assets/javascripts/confirm_modal.js | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/app/assets/javascripts/confirm_modal.js b/app/assets/javascripts/confirm_modal.js index ff29d5fa355..4b4fdf03873 100644 --- a/app/assets/javascripts/confirm_modal.js +++ b/app/assets/javascripts/confirm_modal.js @@ -3,40 +3,9 @@ import ConfirmModal from '~/vue_shared/components/confirm_modal.vue'; const mountConfirmModal = () => { return new Vue({ - data() { - return { - path: '', - method: '', - modalAttributes: null, - showModal: false, - }; - }, - mounted() { - document.querySelectorAll('.js-confirm-modal-button').forEach(button => { - button.addEventListener('click', e => { - e.preventDefault(); - - this.path = button.dataset.path; - this.method = button.dataset.method; - this.modalAttributes = JSON.parse(button.dataset.modalAttributes); - this.showModal = true; - }); - }); - }, - methods: { - dismiss() { - this.showModal = false; - }, - }, render(h) { return h(ConfirmModal, { - props: { - path: this.path, - method: this.method, - modalAttributes: this.modalAttributes, - showModal: this.showModal, - }, - on: { dismiss: this.dismiss }, + props: { selector: '.js-confirm-modal-button' }, }); }, }).$mount(); |