Skip to content

Commit

Permalink
Update the empty page to reflect the fact that the user can now uploa…
Browse files Browse the repository at this point in the history
…d directly
  • Loading branch information
oparoz committed Feb 13, 2016
1 parent 1f84050 commit 28c5fab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
19 changes: 2 additions & 17 deletions js/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,31 +260,16 @@
$('form.searchbox').hide();
},

/**
* Shows an empty gallery message
*/
showEmpty: function () {
var emptyContentElement = $('#emptycontent');
var message = '<div class="icon-gallery"></div>';
message += '<h2>' + t('gallery',
'No pictures found') + '</h2>';
message += '<p>' + t('gallery',
'Upload pictures in the files app to display them here') + '</p>';
emptyContentElement.html(message);
emptyContentElement.removeClass('hidden');
$('#controls').addClass('hidden');
},

/**
* Shows an empty gallery message
*/
showEmptyFolder: function () {
var emptyContentElement = $('#emptycontent');
var message = '<div class="icon-gallery"></div>';
message += '<h2>' + t('gallery',
'Nothing in here') + '</h2>';
'No media files found') + '</h2>';
message += '<p>' + t('gallery',
'No media files found in this folder') + '</p>';
'Upload new files via drag and drop or by using the [+] button above') + '</p>';
emptyContentElement.html(message);
emptyContentElement.removeClass('hidden');
},
Expand Down
16 changes: 6 additions & 10 deletions js/galleryview.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,12 @@
}
if ($.isEmptyObject(Gallery.imageMap)) {
this.clear();
if (albumPath === '') {
Gallery.showEmpty();
} else {
Gallery.showEmptyFolder();
this.hideButtons();
Gallery.currentAlbum = albumPath;
var availableWidth = $(window).width() - Gallery.buttonsWidth;
this.breadcrumb.init(albumPath, availableWidth);
Gallery.config.albumDesign = null;
}
Gallery.showEmptyFolder();
this.hideButtons();
Gallery.currentAlbum = albumPath;
var availableWidth = $(window).width() - Gallery.buttonsWidth;
this.breadcrumb.init(albumPath, availableWidth);
Gallery.config.albumDesign = null;
} else {
this.viewAlbum(albumPath);
}
Expand Down

0 comments on commit 28c5fab

Please sign in to comment.