Commit eaff5afc authored by Fatih Acet's avatar Fatih Acet 🙌 Committed by Z.J. van de Weg

Show emoji menu in notes.

parent 2f9c2149
......@@ -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) ->
......
......@@ -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;
}
}
}
}
}
......
......@@ -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
......
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