make justify gallery work with more than one albums per page (eg album widget)

This commit is contained in:
Mario Vavti
2015-12-07 12:13:51 +01:00
parent 53627c89a7
commit 69c9f4588c
6 changed files with 12 additions and 9 deletions

View File

@@ -758,9 +758,9 @@ function pageUpdate() {
});
}
function justifyPhotos() {
function justifyPhotos(id) {
justifiedGalleryActive = true;
$('#photo-album-contents').justifiedGallery({
$('#' + id).justifiedGallery({
selector: '> a, > div:not(.spinner, #page-end)',
margins: 3,
border: 0,
@@ -775,9 +775,9 @@ function justifyPhotos() {
}).on('jg.complete', function(e){ justifiedGalleryActive = false; });
}
function justifyPhotosAjax() {
function justifyPhotosAjax(id) {
justifiedGalleryActive = true;
$('#photo-album-contents').justifiedGallery('norewind').on('jg.complete', function(e){ justifiedGalleryActive = false; });
$('#' + id).justifiedGallery('norewind').on('jg.complete', function(e){ justifiedGalleryActive = false; });
}
function notify_popup_loader(notifyType) {