Hide "Photos" divider if photos are deleted.

If we have deleted all photos from an album, we need to remove the
divider between albums and photos.
pull/591/head
Nils Asmussen 8 years ago
parent 58d3ad727d
commit 7126354d7a

@ -15,11 +15,11 @@ build.iconic = function(icon, classes = '') {
}
build.divider = function(title) {
build.divider = function(title, id = '') {
let html = ''
html += lychee.html`<div class='divider'><h1>$${ title }</h1></div>`
html += lychee.html`<div class='divider' id='$${ id }'><h1>$${ title }</h1></div>`
return html

@ -158,7 +158,7 @@ view.album = {
if (album.json.content && album.json.content!==false) {
photosData += build.divider('Photos')
photosData += build.divider('Photos', 'divider-photos')
// Build photos
$.each(album.json.content, function() {
@ -236,6 +236,7 @@ view.album = {
if (!visible.albums()) {
album.json.num--
view.album.num()
if (album.json.num == 0) $('#divider-photos').hide()
}
})

Loading…
Cancel
Save