add js prefix to classes used to toggle description on commit message in merge request
This commit is contained in:
parent
603ef5d49e
commit
5d478e5cee
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue