diff options
author | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-01-24 02:25:36 +0400 |
---|---|---|
committer | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-01-24 02:25:36 +0400 |
commit | 456394d3ec03e2e0d582ded9db1c92d037d13d36 (patch) | |
tree | 6a7b9027805a386e982115bbb0dd0a040ca5e095 /apps | |
parent | e1a499f65d84aeb11e598ea8d34f4ff5627fc4bd (diff) |
oc-89 handling no photos in collection alert
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gallery/js/album_cover.js | 6 |
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) { |