diff --git a/app/assets/javascripts/backbone/plugins/image_embed.js.coffee b/app/assets/javascripts/backbone/plugins/image_embed.js.coffee index 4e0f497d..d50db04e 100644 --- a/app/assets/javascripts/backbone/plugins/image_embed.js.coffee +++ b/app/assets/javascripts/backbone/plugins/image_embed.js.coffee @@ -4,8 +4,8 @@ class Kandan.Plugins.ImageEmbed template: _.template '''
- - + +
<%= subtitle %>
diff --git a/app/assets/javascripts/backbone/plugins/youtube_embed.js.coffee b/app/assets/javascripts/backbone/plugins/youtube_embed.js.coffee index 961089ab..3d73e5bc 100644 --- a/app/assets/javascripts/backbone/plugins/youtube_embed.js.coffee +++ b/app/assets/javascripts/backbone/plugins/youtube_embed.js.coffee @@ -6,8 +6,8 @@ class Kandan.Plugins.YouTubeEmbed template: _.template '''
- - + +
<%= subtitle %>
@@ -27,7 +27,7 @@ class Kandan.Plugins.YouTubeEmbed videoUrl = message.content.split(" ")[0] videoId = message.content.match(@options.idRegex)[1] - thumbUrl = "http://img.youtube.com/vi/#{ video_id }/0.jpg" + thumbUrl = "http://img.youtube.com/vi/#{ videoId }/0.jpg" subtitle = null subtitle = "Youtube: #{comment}" if comment? and comment.length > 0 diff --git a/app/assets/javascripts/backbone/views/show_activity.js.coffee b/app/assets/javascripts/backbone/views/show_activity.js.coffee index 953b2695..ad4cfc5d 100644 --- a/app/assets/javascripts/backbone/views/show_activity.js.coffee +++ b/app/assets/javascripts/backbone/views/show_activity.js.coffee @@ -5,7 +5,7 @@ class Kandan.Views.ShowActivity extends Backbone.View render: ()-> activity = @options.activity.toJSON() - console.log("Rendering activity:") + activity.content = _.escape(activity.content) if activity.action != "message" @compiledTemplate = JST['user_notification']({activity: activity}) else @@ -13,7 +13,7 @@ class Kandan.Views.ShowActivity extends Backbone.View if modifiedMessage != false @compiledTemplate = modifiedMessage else - @compiledTemplate = Kandan.Helpers.Activities.buildFromMessageTemplate $.extend(activity, {content: _.escape(activity.content)}) + @compiledTemplate = Kandan.Helpers.Activities.buildFromMessageTemplate activity $(@el).data("activity-id", activity.id) $(@el).attr("id", "activity-#{activity.id}")