Commit b47b6abf authored by Alfredo Sumaran's avatar Alfredo Sumaran

Fix squared buttons by removing not needed CSS classes

Also removes dropdown HTML where is not needed.
parent 99dec8e6
......@@ -739,7 +739,7 @@ require('./task_list');
Notes.prototype.replyToDiscussionNote = function(e) {
var form, replyLink;
form = this.formClone.clone();
form = this.cleanForm(this.formClone.clone());
replyLink = $(e.target).closest(".js-discussion-reply-button");
// insert the form after the button
replyLink
......@@ -863,7 +863,7 @@ require('./task_list');
}
if (addForm) {
newForm = this.formClone.clone();
newForm = this.cleanForm(this.formClone.clone());
newForm.appendTo(notesContent);
// show the form
return this.setupDiscussionNoteForm($link, newForm);
......@@ -1049,6 +1049,20 @@ require('./task_list');
});
};
Notes.prototype.cleanForm = function($form) {
// Remove JS classes that are not needed here
$form
.find('.js-comment-type-dropdown')
.removeClass('btn-group');
// Remove dropdown
$form
.find('.dropdown-menu')
.remove();
return $form;
}
return Notes;
})();
}).call(window);
- noteable_type = @note.noteable_type
.btn-group.append-right-10.comment-type-dropdown.js-comment-type-dropdown
.pull-left.btn-group.append-right-10.comment-type-dropdown.js-comment-type-dropdown
%button.btn.btn-nr.btn-create.comment-btn.js-comment-button.js-comment-submit-button
Comment
- if @note.can_be_discussion_note?
......
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