Skip to content
Snippets Groups Projects
Commit eaff5afc authored by Fatih Acet's avatar Fatih Acet Committed by Zeger-Jan van de Weg
Browse files

Show emoji menu in notes.

parent 2f9c2149
No related branches found
No related tags found
No related merge requests found
Loading
@@ -51,7 +51,7 @@ class @AwardsHandler
Loading
@@ -51,7 +51,7 @@ class @AwardsHandler
$('#emoji_search').focus() $('#emoji_search').focus()
else else
$addBtn.addClass 'is-loading is-active' $addBtn.addClass 'is-loading is-active'
url = $addBtn.data 'award-menu-url' url = @getAwardMenuUrl()
   
@createEmojiMenu url, => @createEmojiMenu url, =>
$addBtn.removeClass 'is-loading' $addBtn.removeClass 'is-loading'
Loading
@@ -74,6 +74,7 @@ class @AwardsHandler
Loading
@@ -74,6 +74,7 @@ class @AwardsHandler
   
   
positionMenu: ($menu, $addBtn) -> positionMenu: ($menu, $addBtn) ->
position = $addBtn.data('position') position = $addBtn.data('position')
   
# The menu could potentially be off-screen or in a hidden overflow element # The menu could potentially be off-screen or in a hidden overflow element
Loading
@@ -240,8 +241,10 @@ class @AwardsHandler
Loading
@@ -240,8 +241,10 @@ class @AwardsHandler
   
return @createEmoji_ emoji if $('.emoji-menu').length return @createEmoji_ emoji if $('.emoji-menu').length
   
awardMenuUrl = gl.awardMenuUrl or '/emojis' @createEmojiMenu @getAwardMenuUrl(), => @createEmoji emoji
@createEmojiMenu awardMenuUrl, => @createEmoji emoji
getAwardMenuUrl: -> return gl.awardMenuUrl or '/emojis'
   
   
resolveNameToCssClass: (emoji) -> resolveNameToCssClass: (emoji) ->
Loading
Loading
Loading
@@ -120,6 +120,22 @@ ul.notes {
Loading
@@ -120,6 +120,22 @@ ul.notes {
padding-bottom: 3px; padding-bottom: 3px;
} }
   
.note-emoji-button {
.fa-spinner {
display: none;
}
&.is-loading {
.fa-smile-o {
display: none;
}
.fa-spinner {
display: inline-block;
}
}
}
} }
} }
   
Loading
Loading
Loading
@@ -22,6 +22,9 @@
Loading
@@ -22,6 +22,9 @@
%span.note-role %span.note-role
= access = access
- if note_editable - 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 = link_to '#', title: 'Edit comment', class: 'note-action-button js-note-edit' do
= icon('pencil') = 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 = 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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment