Avoid console error on retina-screens

This commit is contained in:
Tobias Reich 2014-01-25 16:57:15 +01:00
parent 0c609dc303
commit 77398cab56
3 changed files with 11 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -27,11 +27,15 @@ build = {
title = albumJSON.title; title = albumJSON.title;
if (title.length>18) title = albumJSON.title.substr(0, 18) + "..."; if (title.length>18) title = albumJSON.title.substr(0, 18) + "...";
typeThumb0 = albumJSON.thumb0.split('.').pop();
typeThumb1 = albumJSON.thumb1.split('.').pop();
typeThumb2 = albumJSON.thumb2.split('.').pop();
album += "<div class='album' data-id='" + albumJSON.id + "' data-password='" + albumJSON.password + "'>"; album += "<div class='album' data-id='" + albumJSON.id + "' data-password='" + albumJSON.password + "'>";
album += "<img src='" + albumJSON.thumb2 + "' width='200' height='200' alt='thumb'>"; album += "<img src='" + albumJSON.thumb2 + "' width='200' height='200' alt='thumb' data-type='" + typeThumb2 + "'>";
album += "<img src='" + albumJSON.thumb1 + "' width='200' height='200' alt='thumb'>"; album += "<img src='" + albumJSON.thumb1 + "' width='200' height='200' alt='thumb' data-type='" + typeThumb1 + "'>";
album += "<img src='" + albumJSON.thumb0 + "' width='200' height='200' alt='thumb'>"; album += "<img src='" + albumJSON.thumb0 + "' width='200' height='200' alt='thumb' data-type='" + typeThumb0 + "'>";
album += "<div class='overlay'>"; album += "<div class='overlay'>";
if (albumJSON.password&&!lychee.publicMode) album += "<h1><span class='icon-lock'></span> " + title + "</h1>"; if (albumJSON.password&&!lychee.publicMode) album += "<h1><span class='icon-lock'></span> " + title + "</h1>";

View File

@ -154,7 +154,7 @@ view = {
if (smartData===""&&albumsData==="") $("body").append(build.no_content("picture")); if (smartData===""&&albumsData==="") $("body").append(build.no_content("picture"));
else lychee.content.html(smartData + albumsData); else lychee.content.html(smartData + albumsData);
$("img").retina(); $("img[data-type!='svg']").retina();
}, },
@ -249,7 +249,7 @@ view = {
}); });
lychee.content.html(photosData); lychee.content.html(photosData);
$("img").retina(); $("img[data-type!='svg']").retina();
}, },