Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBartek Przybylski <bart.p.pl@gmail.com>2012-01-24 02:25:36 +0400
committerBartek Przybylski <bart.p.pl@gmail.com>2012-01-24 02:25:36 +0400
commit456394d3ec03e2e0d582ded9db1c92d037d13d36 (patch)
tree6a7b9027805a386e982115bbb0dd0a040ca5e095 /apps
parente1a499f65d84aeb11e598ea8d34f4ff5627fc4bd (diff)
oc-89 handling no photos in collection alert
Diffstat (limited to 'apps')
-rw-r--r--apps/gallery/js/album_cover.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/gallery/js/album_cover.js b/apps/gallery/js/album_cover.js
index 44503de28e0..513dd47d351 100644
--- a/apps/gallery/js/album_cover.js
+++ b/apps/gallery/js/album_cover.js
@@ -44,7 +44,11 @@ function scanForAlbums() {
if (r.status == 'success') {
totalAlbums = r.paths.length;
- $('#notification').text(t('gallery',"Creating thumbnails")+' ... ' + Math.floor((albumCounter/totalAlbums)*100) + "%");
+ if (totalAlbums == 0) {
+ $('#notification').text(t('gallery', "No photos found")).fadeIn().slideDown().delay(3000).fadeOut().slideUp();
+ return;
+ }
+ $('#notification').text(t('gallery',"Creating thumbnails")+' ... ' + Math.floor((albumCounter/totalAlbums)*100) + "%");
for(var a in r.paths) {
$.getJSON('ajax/galleryOp.php?operation=partial_create&path='+r.paths[a], function(r) {