Fixed showing preview link for non-images in upload
This commit is contained in:
parent
aa228d5125
commit
06180f5b50
1 changed files with 4 additions and 1 deletions
|
@ -331,13 +331,16 @@ App.Presenters.PostUploadPresenter = function(
|
|||
post.getThumbnail(null, null).then(function(thumbnailDataURL) {
|
||||
var $thumbnail = $el.find('.form-slider .thumbnail');
|
||||
var $img = $thumbnail.find('img');
|
||||
var $link = $thumbnail.find('a');
|
||||
if (thumbnailDataURL === null) {
|
||||
$img.hide();
|
||||
$link.hide();
|
||||
} else {
|
||||
$img.show();
|
||||
$img.attr('src', thumbnailDataURL);
|
||||
$link.show();
|
||||
$link.attr('href', thumbnailDataURL);
|
||||
}
|
||||
$el.find('.form-slider .thumbnail a').attr('href', thumbnailDataURL);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue