diff options
author | Olivier Paroz <github@oparoz.com> | 2015-07-08 01:38:52 +0300 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-07-10 18:33:29 +0300 |
commit | 1ff032a143551a8e3c21cd8512aa420c31c0b0dc (patch) | |
tree | 8d3cb0c87a0cc4ede2ac788e4f4fd2fb164d5498 /js/galleryview.js | |
parent | 30dc0b36702fb6b5458c48ae186d4f96e5360e67 (diff) |
Proper message for empty gallery vs empty folder
Diffstat (limited to 'js/galleryview.js')
-rw-r--r-- | js/galleryview.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/js/galleryview.js b/js/galleryview.js index 55cfff75..eb616fc0 100644 --- a/js/galleryview.js +++ b/js/galleryview.js @@ -32,13 +32,15 @@ */ init: function (albumPath) { if ($.isEmptyObject(Gallery.imageMap)) { - //Gallery.showEmpty(); - // FIXME Make the diff between a root and deep folder this.clear(); - Gallery.showEmptyFolder(); - Gallery.currentAlbum = albumPath; - this.breadcrumb = new Gallery.Breadcrumb(albumPath); - this.breadcrumb.setMaxWidth($(window).width() - Gallery.buttonsWidth); + if (albumPath === '') { + Gallery.showEmpty(); + } else { + Gallery.showEmptyFolder(); + Gallery.currentAlbum = albumPath; + this.breadcrumb = new Gallery.Breadcrumb(albumPath); + this.breadcrumb.setMaxWidth($(window).width() - Gallery.buttonsWidth); + } } else { // Only do it when the app is initialised if (this.requestId === -1) { |