Overlay a small icon on video thumbnails

patches
Jerome Charaoui 2013-12-21 23:48:10 -05:00
parent 0443b99492
commit 1409c13e30
3 changed files with 5 additions and 2 deletions

View File

@ -26,7 +26,7 @@
"status": "open",
"status": "fixed",

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -97,7 +97,10 @@ $(document).ready(function() {
photos = [];
for (i = 0; i < currentAlbum.photos.length; ++i) {
link = $("<a href=\"#!/" + photoFloat.photoHash(currentAlbum, currentAlbum.photos[i]) + "\"></a>");
image = $("<img title=\"" + photoFloat.trimExtension(currentAlbum.photos[i].name) + "\" alt=\"" + photoFloat.trimExtension(currentAlbum.photos[i].name) + "\" src=\"" + photoFloat.photoPath(currentAlbum, currentAlbum.photos[i], 150, true) + "\" height=\"150\" width=\"150\" />");
image = $("<img title=\"" + photoFloat.trimExtension(currentAlbum.photos[i].name) + "\" alt=\"" + photoFloat.trimExtension(currentAlbum.photos[i].name) + "\" src=\"" + photoFloat.photoPath(currentAlbum, currentAlbum.photos[i], 150, true) + "\" height=\"150\" width=\"150\" />");
if (currentAlbum.photos[i].mediaType == "video")
image.css("background-image", "url(" + image.attr("src") + ")").attr("src", "img/video-icon.png");
else
image.get(0).photo = currentAlbum.photos[i];
link.append(image);
photos.push(link);