Commit 5d478e5c authored by Gabriel Gizotti's avatar Gabriel Gizotti

add js prefix to classes used to toggle description on commit message in merge request

parent 603ef5d4
......@@ -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();
});
};
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment