diff options
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/main.js | 32 |
1 files 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) { |