From f4c44aa86a6e2b028c0718a910a2cc78e88d4ef8 Mon Sep 17 00:00:00 2001 From: Zach Wily Date: Mon, 28 Feb 2011 14:04:07 -0700 Subject: [PATCH] fix media comments in the same html block; fixes #3923 When two media comments were in the same html block, we were accidentally finding the media_id for the first one when building the media comment thumbnail. Change-Id: I31ce651e1a7654ed9ede6eca7c3abb8d70f7a2bc Reviewed-on: https://gerrit.instructure.com/2462 Reviewed-by: Brian Whitmer Tested-by: Hudson --- public/javascripts/media_comments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/media_comments.js b/public/javascripts/media_comments.js index d2204992df4..679aec4db37 100644 --- a/public/javascripts/media_comments.js +++ b/public/javascripts/media_comments.js @@ -232,10 +232,10 @@ var dimensions = $.fn.mediaCommentThumbnail.sizes[size] || $.fn.mediaCommentThumbnail.sizes['normal']; this.each(function() { var id = $.trim($(this).find(".media_comment_id:first").text()); - id = id || $.trim($(this).parent().find(".media_comment_id:first").text()); if(!id && $(this).attr('id') && $(this).attr('id').match(/^media_comment_/)) { id = $(this).attr('id').substring(14); } + id = id || $.trim($(this).parent().find(".media_comment_id:first").text()); if(id) { var url = "http://" + INST.kalturaSettings.resource_domain + "/p/" + INST.kalturaSettings.partner_id + "/thumbnail/entry_id/"; url = url + id;