Merge branch 'master' of https://github.com/electerious/Lychee into multiselect

This commit is contained in:
Tobias Reich 2014-01-28 22:58:45 +01:00
commit 7166a536e4
3 changed files with 18 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -69,14 +69,18 @@ build = {
if (!photoJSON) return ""; if (!photoJSON) return "";
var photo = "", var photo = "",
longTitle = "",
title = photoJSON.title; title = photoJSON.title;
if (title.length>18) title = photoJSON.title.substr(0, 18) + "..."; if (title.length>18) {
title = photoJSON.title.substr(0, 18) + "...";
longTitle = photoJSON.title;
}
photo += "<div class='photo' data-album-id='" + photoJSON.album + "' data-id='" + photoJSON.id + "'>"; photo += "<div class='photo' data-album-id='" + photoJSON.album + "' data-id='" + photoJSON.id + "'>";
photo += "<img src='" + photoJSON.thumbUrl + "' width='200' height='200' alt='thumb'>"; photo += "<img src='" + photoJSON.thumbUrl + "' width='200' height='200' alt='thumb'>";
photo += "<div class='overlay'>"; photo += "<div class='overlay'>";
photo += "<h1>" + title + "</h1>"; photo += "<h1 title='" + longTitle + "'>" + title + "</h1>";
photo += "<a>" + photoJSON.sysdate + "</a>"; photo += "<a>" + photoJSON.sysdate + "</a>";
photo += "</div>"; photo += "</div>";

View File

@ -167,8 +167,8 @@ view = {
if (albums.json.content[albumID].password) prefix = "<span class='icon-lock'></span> "; if (albums.json.content[albumID].password) prefix = "<span class='icon-lock'></span> ";
if (title.length>18) { if (title.length>18) {
longTitle = title;
title = title.substr(0, 18) + "..."; title = title.substr(0, 18) + "...";
longTitle = albums.json.content[albumID].title;
} }
$(".album[data-id='" + albumID + "'] .overlay h1") $(".album[data-id='" + albumID + "'] .overlay h1")
@ -262,11 +262,17 @@ view = {
title: function(photoID) { title: function(photoID) {
var title = album.json.content[photoID].title; var longTitle = "",
title = album.json.content[photoID].title;
if (title.length>18) title = title.substr(0, 18) + "..."; if (title.length>18) {
longTitle = title;
title = title.substr(0, 18) + "...";
}
$(".photo[data-id='" + photoID + "'] .overlay h1").html(title); $(".photo[data-id='" + photoID + "'] .overlay h1")
.html(title)
.attr("title", longTitle);
}, },