oc-89 handling no photos in collection alert

This commit is contained in:
Bartek Przybylski 2012-01-23 23:25:36 +01:00
parent e1a499f65d
commit 456394d3ec

View file

@ -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) {