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 <brian@instructure.com> Tested-by: Hudson <hudson@instructure.com>
This commit is contained in:
parent
3ada5ea514
commit
f4c44aa86a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue