summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Gizotti <gabriel@gizotti.com>2016-12-05 21:43:40 +1000
committerGabriel Gizotti <gabriel@gizotti.com>2016-12-16 19:13:17 +1000
commit5d478e5ceec3db9c38ef2ab1fafd7235fe3bb244 (patch)
treeee3cc6c20cac29bc6909c6ca1fb891c1814748ff
parent603ef5d49ed453cbb47b68d3af078529c6b834a1 (diff)
downloadgitlab-ce-5d478e5ceec3db9c38ef2ab1fafd7235fe3bb244.tar.gz
add js prefix to classes used to toggle description on commit message in merge request
-rw-r--r--app/assets/javascripts/merge_request.js12
-rw-r--r--app/views/shared/_commit_message_container.html.haml8
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