Commit 9c4a06a8 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Fix close buttob bug when toggling dropdown

parent 09330dd1
...@@ -30,6 +30,10 @@ GLForm.prototype.setupForm = function() { ...@@ -30,6 +30,10 @@ GLForm.prototype.setupForm = function() {
this.form.addClass('gfm-form'); this.form.addClass('gfm-form');
// remove notify commit author checkbox for non-commit notes // remove notify commit author checkbox for non-commit notes
gl.utils.disableButtonIfEmptyField(this.form.find('.js-note-text'), this.form.find('.js-comment-button')); gl.utils.disableButtonIfEmptyField(this.form.find('.js-note-text'), this.form.find('.js-comment-button'));
const newDiscussionToggle = this.form.find('.js-note-new-discussion');
if (newDiscussionToggle) gl.utils.disableButtonIfEmptyField(this.form.find('.js-note-text'), newDiscussionToggle);
gl.GfmAutoComplete.setup(this.form.find('.js-gfm-input')); gl.GfmAutoComplete.setup(this.form.find('.js-gfm-input'));
new DropzoneInput(this.form); new DropzoneInput(this.form);
autosize(this.textarea); autosize(this.textarea);
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
.btn-group.append-right-10.comment-type-dropdown.js-comment-type-dropdown .btn-group.append-right-10.comment-type-dropdown.js-comment-type-dropdown
= f.submit 'Comment', class: "btn btn-nr btn-create comment-btn js-comment-button js-comment-submit-button" = f.submit 'Comment', class: "btn btn-nr btn-create comment-btn js-comment-button js-comment-submit-button"
- if @note.can_be_discussion_note? - if @note.can_be_discussion_note?
= button_tag type: 'button', class: 'btn btn-nr dropdown-toggle comment-btn js-comment-button js-note-new-discussion', data: { 'dropdown-trigger' => '#resolvable-comment-menu' } do = button_tag type: 'button', class: 'btn btn-nr dropdown-toggle comment-btn js-note-new-discussion', data: { 'dropdown-trigger' => '#resolvable-comment-menu' } do
= icon('caret-down') = icon('caret-down')
%ul#resolvable-comment-menu.dropdown-menu{ data: { dropdown: true } } %ul#resolvable-comment-menu.dropdown-menu{ data: { dropdown: true } }
%li#comment{ data: { value: '', 'button-text' => 'Comment', 'secondary-button-text' => 'Comment & close merge request' }, class: 'droplab-item-selected' } %li#comment{ data: { value: '', 'button-text' => 'Comment', 'secondary-button-text' => 'Comment & close merge request' }, class: 'droplab-item-selected' }
......
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