Browse Source

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

Tobias Reich 10 years ago
parent
commit
d678cd97d7
3 changed files with 14 additions and 4 deletions
  1. 0 0
      assets/js/min/main.js
  2. 6 2
      assets/js/modules/build.js
  3. 8 2
      assets/js/modules/view.js

File diff suppressed because it is too large
+ 0 - 0
assets/js/min/main.js


+ 6 - 2
assets/js/modules/build.js

@@ -30,9 +30,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();
@@ -45,7 +49,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>";

+ 8 - 2
assets/js/modules/view.js

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

Some files were not shown because too many files changed in this diff