From 005029d7a5e258dbf010706e181fba2d006de76a Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Mon, 6 Jul 2015 15:25:34 +0200 Subject: First concept of empty folder when landing from the Files app --- js/galleryview.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'js/galleryview.js') diff --git a/js/galleryview.js b/js/galleryview.js index a2b2d5ad..502c22db 100644 --- a/js/galleryview.js +++ b/js/galleryview.js @@ -32,7 +32,12 @@ */ init: function (albumPath) { if (Gallery.images.length === 0) { - Gallery.showEmpty(); + //Gallery.showEmpty(); + // FIXME Make the diff between a root and deep folder + 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) { @@ -106,7 +111,7 @@ this.infoButtonSetup(); this.breadcrumb = new Gallery.Breadcrumb(albumPath); - this.breadcrumb.setMaxWidth($(window).width() - 320); + this.breadcrumb.setMaxWidth($(window).width() - Gallery.buttonsWidth); var currentSort = Gallery.config.albumSorting; this.sortControlsSetup(currentSort.type, currentSort.order); @@ -122,7 +127,7 @@ * @param {string} albumPath */ shareButtonSetup: function (albumPath) { - var shareButton = $('button.share'); + var shareButton = $('#share-button'); if (albumPath === '' || Gallery.token) { shareButton.hide(); } else { @@ -138,7 +143,7 @@ infoButton.find('span').hide(); var infoContentElement = $('.album-info-content'); infoContentElement.slideUp(); - infoContentElement.css('max-height', $(window).height() - 150); + infoContentElement.css('max-height', $(window).height() - Gallery.browserToolbarHeight); var albumInfo = Gallery.config.albumInfo; if (Gallery.config.albumError) { infoButton.hide(); -- cgit v1.2.3