aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
authortuscanhobbit <tuscanhobbit@users.noreply.github.com>2014-09-22 22:44:10 +0200
committertuscanhobbit <tuscanhobbit@users.noreply.github.com>2014-09-22 22:44:10 +0200
commit6a9e8fcd20c0101d448061fdbf51034ab456d2c3 (patch)
tree08e4a6d051636b90a98a6889a0b677a7d7049982 /view/js/main.js
parented7f3001c1c1deec5076ae12114e5c42865b6251 (diff)
parent2070dbfdeace4a902208e9dfb50d950647142e99 (diff)
downloadvolse-hubzilla-6a9e8fcd20c0101d448061fdbf51034ab456d2c3.tar.gz
volse-hubzilla-6a9e8fcd20c0101d448061fdbf51034ab456d2c3.tar.bz2
volse-hubzilla-6a9e8fcd20c0101d448061fdbf51034ab456d2c3.zip
Merge from upstream
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js37
1 files changed, 20 insertions, 17 deletions
diff --git a/view/js/main.js b/view/js/main.js
index e263fd116..7bbd49c1b 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -704,21 +704,24 @@ function updateConvItems(mode,data) {
}
- function justifyPhotos(bParam_page) {
- $('#photo-album-contents-' + bParam_page).justifiedGallery({
- lastRow : 'nojustify',
- captions: true,
+ function justifyPhotos() {
+ justifiedGalleryActive = true;
+ $('#photo-album-contents').justifiedGallery({
margins: 3,
- rowHeight : 150,
- sizeRangeSuffixes : {
- 'lt100': '',
- 'lt240': '',
- 'lt320': '',
+ sizeRangeSuffixes: {
+ 'lt100': '-2',
+ 'lt240': '-2',
+ 'lt320': '-2',
'lt500': '',
- 'lt640': '',
- 'lt1024': ''
+ 'lt640': '-1',
+ 'lt1024': '-0'
}
- });
+ }).on('jg.complete', function(e){ justifiedGalleryActive = false; });
+ }
+
+ function justifyPhotosAjax() {
+ justifiedGalleryActive = true;
+ $('#photo-album-contents').justifiedGallery('norewind').on('jg.complete', function(e){ justifiedGalleryActive = false; });
}
function notify_popup_loader(notifyType) {
@@ -740,7 +743,7 @@ function updateConvItems(mode,data) {
if(data.notify.length==0){
- $("#nav-" + notifyType + "-menu").html(notifications_empty);
+ $("#nav-" + notifyType + "-menu").html(aStr[nothingnew]);
} else {
$("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark);
@@ -1115,7 +1118,7 @@ $(window).scroll(function () {
$('#more').show();
}
- if($(window).scrollTop() + $(window).height() == $(document).height()) {
+ if($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
if((pageHasMoreContent) && (! loadingPage)) {
$('#more').hide();
$('#no-more').hide();
@@ -1134,9 +1137,9 @@ $(window).scroll(function () {
$('#more').css("top","400");
$('#more').show();
}
-
- if($(window).scrollTop() + $(window).height() == $(document).height()) {
- if((pageHasMoreContent) && (! loadingPage)) {
+
+ if($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
+ if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) {
$('#more').hide();
$('#no-more').hide();