Commit 3fc10d46 authored by Valery Sizov's avatar Valery Sizov

Emoji bug: Invalid url to image

parent fbac9e10
...@@ -73,7 +73,7 @@ class @AwardsHandler ...@@ -73,7 +73,7 @@ class @AwardsHandler
getImage: (emoji, custom_path) -> getImage: (emoji, custom_path) ->
if custom_path if custom_path
$(".awards-menu li").first().html().replace(/emoji\/.*\.png/, custom_path) $("<img>").attr({src: custom_path, width: 20, height: 20}).wrap("<div>").parent().html()
else else
$("li[data-emoji='" + emoji + "']").html() $("li[data-emoji='" + emoji + "']").html()
......
...@@ -136,7 +136,7 @@ class Projects::NotesController < Projects::ApplicationController ...@@ -136,7 +136,7 @@ class Projects::NotesController < Projects::ApplicationController
discussion_id: note.discussion_id, discussion_id: note.discussion_id,
html: note_to_html(note), html: note_to_html(note),
award: note.is_award, award: note.is_award,
emoji_path: note.is_award ? ::AwardEmoji.path_to_emoji_image(note.note) : "", emoji_path: note.is_award ? view_context.image_url(::AwardEmoji.path_to_emoji_image(note.note)) : "",
note: note.note, note: note.note,
discussion_html: note_to_discussion_html(note), discussion_html: note_to_discussion_html(note),
discussion_with_diff_html: note_to_discussion_with_diff_html(note) discussion_with_diff_html: note_to_discussion_with_diff_html(note)
......
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