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
eaff5afc
Commit
eaff5afc
authored
May 26, 2016
by
Fatih Acet
Committed by
Z.J. van de Weg
Jun 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show emoji menu in notes.
parent
2f9c2149
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
app/assets/javascripts/awards_handler.coffee
app/assets/javascripts/awards_handler.coffee
+6
-3
app/assets/stylesheets/pages/notes.scss
app/assets/stylesheets/pages/notes.scss
+16
-0
app/views/projects/notes/_note.html.haml
app/views/projects/notes/_note.html.haml
+3
-0
No files found.
app/assets/javascripts/awards_handler.coffee
View file @
eaff5afc
...
...
@@ -51,7 +51,7 @@ class @AwardsHandler
$
(
'#emoji_search'
).
focus
()
else
$addBtn
.
addClass
'is-loading is-active'
url
=
$addBtn
.
data
'award-menu-url'
url
=
@
getAwardMenuUrl
()
@
createEmojiMenu
url
,
=>
$addBtn
.
removeClass
'is-loading'
...
...
@@ -74,6 +74,7 @@ class @AwardsHandler
positionMenu
:
(
$menu
,
$addBtn
)
->
position
=
$addBtn
.
data
(
'position'
)
# The menu could potentially be off-screen or in a hidden overflow element
...
...
@@ -240,8 +241,10 @@ class @AwardsHandler
return
@
createEmoji_
emoji
if
$
(
'.emoji-menu'
).
length
awardMenuUrl
=
gl
.
awardMenuUrl
or
'/emojis'
@
createEmojiMenu
awardMenuUrl
,
=>
@
createEmoji
emoji
@
createEmojiMenu
@
getAwardMenuUrl
(),
=>
@
createEmoji
emoji
getAwardMenuUrl
:
->
return
gl
.
awardMenuUrl
or
'/emojis'
resolveNameToCssClass
:
(
emoji
)
->
...
...
app/assets/stylesheets/pages/notes.scss
View file @
eaff5afc
...
...
@@ -120,6 +120,22 @@ ul.notes {
padding-bottom
:
3px
;
}
.note-emoji-button
{
.fa-spinner
{
display
:
none
;
}
&
.is-loading
{
.fa-smile-o
{
display
:
none
;
}
.fa-spinner
{
display
:
inline-block
;
}
}
}
}
}
...
...
app/views/projects/notes/_note.html.haml
View file @
eaff5afc
...
...
@@ -22,6 +22,9 @@
%span
.note-role
=
access
-
if
note_editable
=
link_to
'#'
,
title:
'Add Reaction'
,
class:
'note-emoji-button js-add-award js-note-emoji'
,
data:
{
position:
'right'
}
do
=
icon
(
'spinner spin'
)
=
icon
(
'smile-o'
)
=
link_to
'#'
,
title:
'Edit comment'
,
class:
'note-action-button js-note-edit'
do
=
icon
(
'pencil'
)
=
link_to
namespace_project_note_path
(
note
.
project
.
namespace
,
note
.
project
,
note
),
title:
'Remove comment'
,
method: :delete
,
data:
{
confirm:
'Are you sure you want to remove this comment?'
},
remote:
true
,
class:
'note-action-button js-note-delete danger'
do
...
...
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