Added link to full image preview in post uploads

This commit is contained in:
Marcin Kurczewski 2015-03-19 22:48:50 +01:00
parent a3157a48ec
commit fce9c3483a
2 changed files with 6 additions and 0 deletions

View file

@ -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);
});
}

View file

@ -73,6 +73,7 @@
<div class="form-slider">
<div class="thumbnail">
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="Thumbnail"/>
<a href="#" target="_blank">Open preview in a new tab</a>
</div>
<form class="form-wrapper">