diff options
author | Robert Speicher <robert@gitlab.com> | 2015-11-22 04:10:25 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2015-11-22 04:10:25 +0000 |
commit | 7b70a03e44559900921f06464ff6422d4ed15712 (patch) | |
tree | ef22603153e9572cbcb2af684ebdb005ae78598f /app | |
parent | b166ee6b1d6113642388bd5dc1b95fb53fc69d7b (diff) | |
parent | 3fc10d46f180d5b1904496e4f4e528d215057dbd (diff) | |
download | gitlab-ce-7b70a03e44559900921f06464ff6422d4ed15712.tar.gz |
Merge branch 'award_fix' into 'master'
Emoji bug: Invalid url to image
Closes #3591
See merge request !1868
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/awards_handler.coffee | 2 | ||||
-rw-r--r-- | app/controllers/projects/notes_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/awards_handler.coffee b/app/assets/javascripts/awards_handler.coffee index 635c9b4f8d2..09b48fe5572 100644 --- a/app/assets/javascripts/awards_handler.coffee +++ b/app/assets/javascripts/awards_handler.coffee @@ -73,7 +73,7 @@ class @AwardsHandler getImage: (emoji, 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 $("li[data-emoji='" + emoji + "']").html() diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb index ead940aea6c..5ac18446aa7 100644 --- a/app/controllers/projects/notes_controller.rb +++ b/app/controllers/projects/notes_controller.rb @@ -136,7 +136,7 @@ class Projects::NotesController < Projects::ApplicationController discussion_id: note.discussion_id, html: note_to_html(note), 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, discussion_html: note_to_discussion_html(note), discussion_with_diff_html: note_to_discussion_with_diff_html(note) |