Code cleanup
This commit is contained in:
parent
5b865de5a6
commit
c57a284713
@ -53,16 +53,22 @@ view = {
|
|||||||
|
|
||||||
var albumID = album.getID();
|
var albumID = album.getID();
|
||||||
|
|
||||||
|
lychee.header.removeClass("view");
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
|
|
||||||
case "albums":
|
case "albums":
|
||||||
lychee.header.removeClass("view");
|
|
||||||
$("#tools_album, #tools_photo").hide();
|
$("#tools_album, #tools_photo").hide();
|
||||||
$("#tools_albums").show();
|
$("#tools_albums").show();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "album":
|
case "album":
|
||||||
lychee.header.removeClass("view");
|
|
||||||
$("#tools_albums, #tools_photo").hide();
|
$("#tools_albums, #tools_photo").hide();
|
||||||
$("#tools_album").show();
|
$("#tools_album").show();
|
||||||
|
|
||||||
album.json.content === false ? $("#button_archive").hide() : $("#button_archive").show();
|
album.json.content === false ? $("#button_archive").hide() : $("#button_archive").show();
|
||||||
if (lychee.publicMode&&album.json.downloadable==="0") $("#button_archive").hide();
|
if (lychee.publicMode&&album.json.downloadable==="0") $("#button_archive").hide();
|
||||||
if (albumID==="s"||albumID==="f"||albumID==="r") {
|
if (albumID==="s"||albumID==="f"||albumID==="r") {
|
||||||
@ -73,11 +79,14 @@ view = {
|
|||||||
} else {
|
} else {
|
||||||
$("#button_info_album, #button_trash_album, #button_share_album").show();
|
$("#button_info_album, #button_trash_album, #button_share_album").show();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "photo":
|
case "photo":
|
||||||
lychee.header.addClass("view");
|
|
||||||
$("#tools_albums, #tools_album").hide();
|
$("#tools_albums, #tools_album").hide();
|
||||||
$("#tools_photo").show();
|
$("#tools_photo").show();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user