Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
b47b6abf
Commit
b47b6abf
authored
Apr 05, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix squared buttons by removing not needed CSS classes
Also removes dropdown HTML where is not needed.
parent
99dec8e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+16
-2
app/views/projects/notes/_comment_type_button.html.haml
app/views/projects/notes/_comment_type_button.html.haml
+1
-1
No files found.
app/assets/javascripts/notes.js
View file @
b47b6abf
...
...
@@ -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
);
app/views/projects/notes/_comment_type_button.html.haml
View file @
b47b6abf
-
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?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment