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
Jérome Perrin
gitlab-ce
Commits
06e7de40
Commit
06e7de40
authored
Apr 07, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review changes
parent
8325d3fd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
9 deletions
+34
-9
app/assets/javascripts/comment_type_toggle.js
app/assets/javascripts/comment_type_toggle.js
+2
-2
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+1
-1
app/assets/stylesheets/pages/note_form.scss
app/assets/stylesheets/pages/note_form.scss
+30
-5
app/views/projects/notes/_comment_button.html.haml
app/views/projects/notes/_comment_button.html.haml
+1
-1
No files found.
app/assets/javascripts/comment_type_toggle.js
View file @
06e7de40
import
DropLab
from
'
~
/droplab/drop_lab
'
;
import
DropLab
from
'
.
/droplab/drop_lab
'
;
import
InputSetter
from
'
~
/droplab/plugins/input_setter
'
;
import
InputSetter
from
'
.
/droplab/plugins/input_setter
'
;
class
CommentTypeToggle
{
class
CommentTypeToggle
{
constructor
(
opts
=
{})
{
constructor
(
opts
=
{})
{
...
...
app/assets/javascripts/notes.js
View file @
06e7de40
...
@@ -791,7 +791,7 @@ require('./task_list');
...
@@ -791,7 +791,7 @@ require('./task_list');
if
(
typeof
gl
.
diffNotesCompileComponents
!==
'
undefined
'
)
{
if
(
typeof
gl
.
diffNotesCompileComponents
!==
'
undefined
'
)
{
var
$commentBtn
=
form
.
find
(
'
comment-and-resolve-btn
'
);
var
$commentBtn
=
form
.
find
(
'
comment-and-resolve-btn
'
);
$commentBtn
.
attr
(
'
:discussion-id
'
,
"
'
"
+
discussionID
+
"
'
"
);
$commentBtn
.
attr
(
'
:discussion-id
'
,
`'
${
discussionID
}
'`
);
gl
.
diffNotesCompileComponents
();
gl
.
diffNotesCompileComponents
();
}
}
...
...
app/assets/stylesheets/pages/note_form.scss
View file @
06e7de40
...
@@ -312,12 +312,20 @@
...
@@ -312,12 +312,20 @@
}
}
.comment-type-dropdown
{
.comment-type-dropdown
{
.dropdown-toggle
.fa
{
.comment-btn
{
width
:
auto
;
}
.dropdown-toggle
{
float
:
right
;
.toggle-icon
{
color
:
$white-light
;
color
:
$white-light
;
padding-right
:
2px
;
padding-right
:
2px
;
margin-top
:
2px
;
margin-top
:
2px
;
pointer-events
:
none
;
pointer-events
:
none
;
}
}
}
.dropdown-menu
{
.dropdown-menu
{
top
:
initial
;
top
:
initial
;
...
@@ -375,4 +383,21 @@
...
@@ -375,4 +383,21 @@
padding
:
0
;
padding
:
0
;
border-top
:
$gray-darkest
;
border-top
:
$gray-darkest
;
}
}
@media
(
max-width
:
$screen-xs-max
)
{
display
:
flex
;
width
:
100%
;
.comment-btn
{
flex-grow
:
1
;
flex-shrink
:
0
;
width
:
auto
;
}
.dropdown-toggle
{
flex-grow
:
0
;
flex-shrink
:
1
;
width
:
auto
;
}
}
}
}
app/views/projects/notes/_comment_button.html.haml
View file @
06e7de40
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
-
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-note-new-discussion js-disable-on-submit'
,
data:
{
'dropdown-trigger'
=>
'#resolvable-comment-menu'
},
'aria-label'
=>
'Open comment type dropdown'
do
=
button_tag
type:
'button'
,
class:
'btn btn-nr dropdown-toggle comment-btn js-note-new-discussion js-disable-on-submit'
,
data:
{
'dropdown-trigger'
=>
'#resolvable-comment-menu'
},
'aria-label'
=>
'Open comment type dropdown'
do
=
icon
(
'caret-down'
)
=
icon
(
'caret-down'
,
class:
'toggle-icon'
)
%ul
#resolvable-comment-menu
.dropdown-menu
{
data:
{
dropdown:
true
}
}
%ul
#resolvable-comment-menu
.dropdown-menu
{
data:
{
dropdown:
true
}
}
%li
#comment
.droplab-item-selected
{
data:
{
value:
''
,
'submit-text'
=>
'Comment'
,
'close-text'
=>
"Comment & close #{noteable_name}"
,
'reopen-text'
=>
"Comment & reopen #{noteable_name}"
}
}
%li
#comment
.droplab-item-selected
{
data:
{
value:
''
,
'submit-text'
=>
'Comment'
,
'close-text'
=>
"Comment & close #{noteable_name}"
,
'reopen-text'
=>
"Comment & reopen #{noteable_name}"
}
}
...
...
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