Merge branch 'pr/66'

Conflicts:
	assets/js/min/main.js
This commit is contained in:
Tobias Reich 2014-01-28 22:23:04 +01:00
commit e5df07d6ac
3 changed files with 20 additions and 5 deletions

File diff suppressed because one or more lines are too long

8
assets/js/modules/build.js Executable file → Normal file
View File

@ -24,9 +24,13 @@ build = {
if (!albumJSON) return "";
var album = "",
longTitle = "",
title = albumJSON.title;
if (title.length>18) title = albumJSON.title.substr(0, 18) + "...";
if (title.length>18) {
title = albumJSON.title.substr(0, 18) + "...";
longTitle = albumJSON.title;
}
typeThumb0 = albumJSON.thumb0.split('.').pop();
typeThumb1 = albumJSON.thumb1.split('.').pop();
@ -39,7 +43,7 @@ build = {
album += "<div class='overlay'>";
if (albumJSON.password&&!lychee.publicMode) album += "<h1><span class='icon-lock'></span> " + title + "</h1>";
else album += "<h1>" + title + "</h1>";
else album += "<h1 title='" + longTitle + "'>" + title + "</h1>";
album += "<a>" + albumJSON.sysdate + "</a>";
album += "</div>";

View File

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