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'); ...@@ -739,7 +739,7 @@ require('./task_list');
Notes.prototype.replyToDiscussionNote = function(e) { Notes.prototype.replyToDiscussionNote = function(e) {
var form, replyLink; var form, replyLink;
form = this.formClone.clone(); form = this.cleanForm(this.formClone.clone());
replyLink = $(e.target).closest(".js-discussion-reply-button"); replyLink = $(e.target).closest(".js-discussion-reply-button");
// insert the form after the button // insert the form after the button
replyLink replyLink
...@@ -863,7 +863,7 @@ require('./task_list'); ...@@ -863,7 +863,7 @@ require('./task_list');
} }
if (addForm) { if (addForm) {
newForm = this.formClone.clone(); newForm = this.cleanForm(this.formClone.clone());
newForm.appendTo(notesContent); newForm.appendTo(notesContent);
// show the form // show the form
return this.setupDiscussionNoteForm($link, newForm); return this.setupDiscussionNoteForm($link, newForm);
...@@ -1049,6 +1049,20 @@ require('./task_list'); ...@@ -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; return Notes;
})(); })();
}).call(window); }).call(window);
- noteable_type = @note.noteable_type - 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 %button.btn.btn-nr.btn-create.comment-btn.js-comment-button.js-comment-submit-button
Comment Comment
- if @note.can_be_discussion_note? - 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