diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-11-11 16:12:51 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-11-19 02:25:27 +0300 |
commit | fd2c0fe446c7f761b845c91307ef8110d869e8e8 (patch) | |
tree | 1a2b6c53f6a4c5c24fcb57adad7a2cd115e72623 /app/assets/javascripts/notes.js.coffee | |
parent | 61867abeeccf9e6f65ba38c365d8bdf6b61387f4 (diff) |
award emoji
Diffstat (limited to 'app/assets/javascripts/notes.js.coffee')
-rw-r--r-- | app/assets/javascripts/notes.js.coffee | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index ea75c656bcc..cd27b20dd7c 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -113,13 +113,16 @@ class @Notes renderNote: (note) -> # render note if it not present in loaded list # or skip if rendered - if @isNewNote(note) + if @isNewNote(note) && !note.award @note_ids.push(note.id) $('ul.main-notes-list'). append(note.html). syntaxHighlight() @initTaskList() + if note.award + awards_handler.addAward("emoji-" + note.note) + ### Check if note does not exists on page ### @@ -255,7 +258,6 @@ class @Notes ### addNote: (xhr, note, status) => @renderNote(note) - @updateVotes() ### Called in response to the new note form being submitted @@ -473,9 +475,6 @@ class @Notes form = $(e.target).closest(".js-discussion-note-form") @removeDiscussionNoteForm(form) - updateVotes: -> - true - ### Called after an attachment file has been selected. |