diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-09 18:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-09 18:09:24 +0300 |
commit | a3596259bcca06bf4adcdb391d0ea3110fe7deff (patch) | |
tree | deba3f6bbb1836133c4cafeb2ffe921d6bf3fed7 /app/assets/javascripts/merge_request.js | |
parent | 7ce86c261b3f910cf17b0b47a4200847578947df (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/merge_request.js')
-rw-r--r-- | app/assets/javascripts/merge_request.js | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/app/assets/javascripts/merge_request.js b/app/assets/javascripts/merge_request.js index 0ddb2c2334c..e89b886df83 100644 --- a/app/assets/javascripts/merge_request.js +++ b/app/assets/javascripts/merge_request.js @@ -19,11 +19,9 @@ function MergeRequest(opts) { this.opts = opts != null ? opts : {}; this.submitNoteForm = this.submitNoteForm.bind(this); this.$el = $('.merge-request'); - this.$('.show-all-commits').on('click', () => this.showAllCommits()); this.initTabs(); this.initMRBtnListeners(); - this.initCommitMessageListeners(); if ($('.description.js-task-list-container').length) { this.taskList = new TaskList({ @@ -59,11 +57,6 @@ MergeRequest.prototype.initTabs = function () { window.mrTabs = new MergeRequestTabs(this.opts); }; -MergeRequest.prototype.showAllCommits = function () { - this.$('.first-commits').remove(); - return this.$('.all-commits').removeClass('hide'); -}; - MergeRequest.prototype.initMRBtnListeners = function () { const _this = this; const draftToggles = document.querySelectorAll('.js-draft-toggle-button'); @@ -128,26 +121,6 @@ MergeRequest.prototype.submitNoteForm = function (form, $button) { } }; -MergeRequest.prototype.initCommitMessageListeners = function () { - $(document).on('click', 'a.js-with-description-link', (e) => { - const textarea = $('textarea.js-commit-message'); - e.preventDefault(); - - textarea.val(textarea.data('messageWithDescription')); - $('.js-with-description-hint').hide(); - $('.js-without-description-hint').show(); - }); - - $(document).on('click', 'a.js-without-description-link', (e) => { - const textarea = $('textarea.js-commit-message'); - e.preventDefault(); - - textarea.val(textarea.data('messageWithoutDescription')); - $('.js-with-description-hint').show(); - $('.js-without-description-hint').hide(); - }); -}; - MergeRequest.decreaseCounter = function (by = 1) { const $el = $('.js-merge-counter'); const count = Math.max(parseInt($el.text().replace(/[^\d]/, ''), 10) - by, 0); |