diff options
-rw-r--r-- | app/assets/javascripts/merge_request.js | 12 | ||||
-rw-r--r-- | app/views/shared/_commit_message_container.html.haml | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/app/assets/javascripts/merge_request.js b/app/assets/javascripts/merge_request.js index 194a27ae22b..462dbc44e9f 100644 --- a/app/assets/javascripts/merge_request.js +++ b/app/assets/javascripts/merge_request.js @@ -112,20 +112,20 @@ MergeRequest.prototype.initCommitMessageListeners = function() { var textarea = $('textarea.js-commit-message'); - $('a.with-description-link').on('click', function(e) { + $('a.js-with-description-link').on('click', function(e) { e.preventDefault(); textarea.val(textarea.data('messageWithDescription')); - $('p.with-description-hint').hide(); - $('p.without-description-hint').show(); + $('p.js-with-description-hint').hide(); + $('p.js-without-description-hint').show(); }); - $('a.without-description-link').on('click', function(e) { + $('a.js-without-description-link').on('click', function(e) { e.preventDefault(); textarea.val(textarea.data('messageWithoutDescription')); - $('p.with-description-hint').show(); - $('p.without-description-hint').hide(); + $('p.js-with-description-hint').show(); + $('p.js-without-description-hint').hide(); }); }; diff --git a/app/views/shared/_commit_message_container.html.haml b/app/views/shared/_commit_message_container.html.haml index 2b2da446d09..c196bc06b17 100644 --- a/app/views/shared/_commit_message_container.html.haml +++ b/app/views/shared/_commit_message_container.html.haml @@ -17,9 +17,9 @@ Try to keep the first line under 52 characters and the others under 72. - if descriptions.present? - %p.hint.with-description-hint - = link_to "#", class: "with-description-link" do + %p.hint.js-with-description-hint + = link_to "#", class: "js-with-description-link" do Include description in commit message - %p.hint.without-description-hint.hide - = link_to "#", class: "without-description-link" do + %p.hint.js-without-description-hint.hide + = link_to "#", class: "js-without-description-link" do Don't include description in commit message |