From fce9c3483a9a7b2fbf8ba58ff6ce780ced9fce75 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Thu, 19 Mar 2015 22:48:50 +0100 Subject: [PATCH] Added link to full image preview in post uploads --- public_html/js/Presenters/PostUploadPresenter.js | 5 +++++ public_html/templates/post-upload.tpl | 1 + 2 files changed, 6 insertions(+) diff --git a/public_html/js/Presenters/PostUploadPresenter.js b/public_html/js/Presenters/PostUploadPresenter.js index aa0d9adf..b341dfe5 100644 --- a/public_html/js/Presenters/PostUploadPresenter.js +++ b/public_html/js/Presenters/PostUploadPresenter.js @@ -340,6 +340,11 @@ App.Presenters.PostUploadPresenter = function( } else { $el.find('.form-slider .thumbnail img').show()[0].setAttribute('src', thumbnailDataURL); } + $el.find('.form-slider .thumbnail a').attr( + 'href', + post.file !== null ? + URL.createObjectURL(post.file) + : thumbnailDataURL); }); } diff --git a/public_html/templates/post-upload.tpl b/public_html/templates/post-upload.tpl index d817747c..1603487c 100644 --- a/public_html/templates/post-upload.tpl +++ b/public_html/templates/post-upload.tpl @@ -73,6 +73,7 @@