do not load next page if justifiedGallery() is not ready yet
This commit is contained in:
parent
59c537b06d
commit
bd2139d16a
@ -635,7 +635,7 @@ function photos_content(&$a) {
|
|||||||
);
|
);
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
$a->set_pager_total(count($r));
|
$a->set_pager_total(count($r));
|
||||||
$a->set_pager_itemspage(60);
|
$a->set_pager_itemspage(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_GET['order'] === 'posted')
|
if($_GET['order'] === 'posted')
|
||||||
@ -1168,7 +1168,7 @@ function photos_content(&$a) {
|
|||||||
);
|
);
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
$a->set_pager_total(count($r));
|
$a->set_pager_total(count($r));
|
||||||
$a->set_pager_itemspage(60);
|
$a->set_pager_itemspage(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("SELECT `resource_id`, `id`, `filename`, type, `album`, max(`scale`) AS `scale` FROM `photo`
|
$r = q("SELECT `resource_id`, `id`, `filename`, type, `album`, max(`scale`) AS `scale` FROM `photo`
|
||||||
|
@ -705,6 +705,7 @@ function updateConvItems(mode,data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function justifyPhotos(bParam_page) {
|
function justifyPhotos(bParam_page) {
|
||||||
|
justifiedGalleryActive = true;
|
||||||
$('#photo-album-contents-' + bParam_page).justifiedGallery({
|
$('#photo-album-contents-' + bParam_page).justifiedGallery({
|
||||||
lastRow : 'nojustify',
|
lastRow : 'nojustify',
|
||||||
captions: true,
|
captions: true,
|
||||||
@ -718,7 +719,7 @@ function updateConvItems(mode,data) {
|
|||||||
'lt640': '',
|
'lt640': '',
|
||||||
'lt1024': ''
|
'lt1024': ''
|
||||||
}
|
}
|
||||||
});
|
}).on('jg.complete', function(e){ justifiedGalleryActive = false; });
|
||||||
}
|
}
|
||||||
|
|
||||||
function notify_popup_loader(notifyType) {
|
function notify_popup_loader(notifyType) {
|
||||||
@ -1136,7 +1137,7 @@ $(window).scroll(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($(window).scrollTop() + $(window).height() == $(document).height()) {
|
if($(window).scrollTop() + $(window).height() == $(document).height()) {
|
||||||
if((pageHasMoreContent) && (! loadingPage)) {
|
if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) {
|
||||||
$('#more').hide();
|
$('#more').hide();
|
||||||
$('#no-more').hide();
|
$('#no-more').hide();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user