From bd2139d16addf42b33f5f5cf90516022273bc8b6 Mon Sep 17 00:00:00 2001 From: marijus Date: Fri, 12 Sep 2014 21:04:43 +0200 Subject: do not load next page if justifiedGallery() is not ready yet --- view/js/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index e263fd116..56c60bd6e 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -705,6 +705,7 @@ function updateConvItems(mode,data) { } function justifyPhotos(bParam_page) { + justifiedGalleryActive = true; $('#photo-album-contents-' + bParam_page).justifiedGallery({ lastRow : 'nojustify', captions: true, @@ -718,7 +719,7 @@ function updateConvItems(mode,data) { 'lt640': '', 'lt1024': '' } - }); + }).on('jg.complete', function(e){ justifiedGalleryActive = false; }); } function notify_popup_loader(notifyType) { @@ -1136,7 +1137,7 @@ $(window).scroll(function () { } if($(window).scrollTop() + $(window).height() == $(document).height()) { - if((pageHasMoreContent) && (! loadingPage)) { + if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) { $('#more').hide(); $('#no-more').hide(); -- cgit v1.2.3 From 61ce524a33c3195794a24c4ce5820684369c58dd Mon Sep 17 00:00:00 2001 From: marijus Date: Fri, 12 Sep 2014 21:32:53 +0200 Subject: define justifiedGalleryActive in head.tpl to not break other pages autoload --- view/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index 56c60bd6e..13f1fea8f 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1135,7 +1135,7 @@ $(window).scroll(function () { $('#more').css("top","400"); $('#more').show(); } - + if($(window).scrollTop() + $(window).height() == $(document).height()) { if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) { $('#more').hide(); -- cgit v1.2.3 From 2728f5a104878ed3237f4d6a19bfbea67ffeecd0 Mon Sep 17 00:00:00 2001 From: marijus Date: Sun, 14 Sep 2014 11:57:01 +0200 Subject: tryout - fetch larger thumbnail if image gets streched over its size --- view/js/main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index 13f1fea8f..fae22eb59 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -712,12 +712,12 @@ function updateConvItems(mode,data) { margins: 3, rowHeight : 150, sizeRangeSuffixes : { - 'lt100': '', - 'lt240': '', - 'lt320': '', - 'lt500': '', - 'lt640': '', - 'lt1024': '' + 'lt100': '-2', + 'lt240': '-2', + 'lt320': '-2', + 'lt500': '-1', + 'lt640': '-1', + 'lt1024': '-0' } }).on('jg.complete', function(e){ justifiedGalleryActive = false; }); } -- cgit v1.2.3 From 72bce40a9fce3231629fd8cbd25a7c17a27c7595 Mon Sep 17 00:00:00 2001 From: marijus Date: Sun, 14 Sep 2014 22:37:03 +0200 Subject: tryout - some more adjustments --- view/js/main.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index fae22eb59..d0fcf0077 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -708,14 +708,12 @@ function updateConvItems(mode,data) { justifiedGalleryActive = true; $('#photo-album-contents-' + bParam_page).justifiedGallery({ lastRow : 'nojustify', - captions: true, margins: 3, - rowHeight : 150, sizeRangeSuffixes : { 'lt100': '-2', 'lt240': '-2', 'lt320': '-2', - 'lt500': '-1', + 'lt500': '-0', 'lt640': '-1', 'lt1024': '-0' } -- cgit v1.2.3 From 58aad83e5cb0edaf1ccc543147030e782c5e7ba9 Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 15 Sep 2014 09:56:30 +0200 Subject: this is probably better in most cases --- view/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index d0fcf0077..d6b405258 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -713,7 +713,7 @@ function updateConvItems(mode,data) { 'lt100': '-2', 'lt240': '-2', 'lt320': '-2', - 'lt500': '-0', + 'lt500': '-1', 'lt640': '-1', 'lt1024': '-0' } -- cgit v1.2.3