From a258affc5f34324cc313a525ad3135df3f8097eb Mon Sep 17 00:00:00 2001 From: Nils Asmussen Date: Sun, 7 Aug 2016 14:47:45 +0200 Subject: [PATCH] Hide download button only w/o photos and subalbums. Previously, an album with subalbums, but without photos, was hiding the download button. --- src/scripts/header.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/header.js b/src/scripts/header.js index 93d2eba..6468d30 100644 --- a/src/scripts/header.js +++ b/src/scripts/header.js @@ -141,8 +141,8 @@ header.setMode = function(mode) { header.dom('.header__toolbar--album').addClass('header__toolbar--visible') // Hide download button when album empty - if (album.json.content===false) $('#button_archive').hide() - else $('#button_archive').show() + if (album.json.content===false && album.subjson.num==0) $('#button_archive').hide() + else $('#button_archive').show() // Hide download button when not logged in and album not downloadable if (lychee.publicMode===true && album.json.downloadable==='0') $('#button_archive').hide()