From d825adf4230ac20d39829150e2e7b03942d9f9c6 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 10 Sep 2014 17:40:50 +0200 Subject: without this check we kill the directory autoload --- view/js/main.js | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/view/js/main.js b/view/js/main.js index 1599c3a2e..ae90bb272 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -706,21 +706,23 @@ function updateConvItems(mode,data) { } function justifyPhotos() { - loadingPage = true; - $('#photo-album-contents').justifiedGallery({ - lastRow : 'nojustify', - captions: true, - margins: 3, - rowHeight : 150, - sizeRangeSuffixes : { - 'lt100': '', - 'lt240': '', - 'lt320': '', - 'lt500': '', - 'lt640': '', - 'lt1024': '' - } - }).on('jg.complete', function(e){ loadingPage = false; }); + if($('#photo-album-contents').length > 0) { + loadingPage = true; + $('#photo-album-contents').justifiedGallery({ + lastRow : 'nojustify', + captions: true, + margins: 3, + rowHeight : 150, + sizeRangeSuffixes : { + 'lt100': '', + 'lt240': '', + 'lt320': '', + 'lt500': '', + 'lt640': '', + 'lt1024': '' + } + }).on('jg.complete', function(e){ loadingPage = false; }); + } } function notify_popup_loader(notifyType) { -- cgit v1.2.3