From 06180f5b50dd4aa250a3fcc39dea9d1d53254a09 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 21 Mar 2015 08:17:58 +0100 Subject: [PATCH] Fixed showing preview link for non-images in upload --- public_html/js/Presenters/PostUploadPresenter.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public_html/js/Presenters/PostUploadPresenter.js b/public_html/js/Presenters/PostUploadPresenter.js index a9e2c3e7..4aeda40d 100644 --- a/public_html/js/Presenters/PostUploadPresenter.js +++ b/public_html/js/Presenters/PostUploadPresenter.js @@ -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); }); }