diff options
author | marijus <mario@mariovavti.com> | 2014-09-10 17:10:39 +0200 |
---|---|---|
committer | marijus <mario@mariovavti.com> | 2014-09-10 17:10:39 +0200 |
commit | c1c2214b477223e87547f06f1dc1c0c9e7fe47d4 (patch) | |
tree | 72408b0d35e28040b3190223751145c286893c6e /view/js/main.js | |
parent | 9f5ad8e9de421d37b856fdbd6efc4dd164d192fc (diff) | |
download | volse-hubzilla-c1c2214b477223e87547f06f1dc1c0c9e7fe47d4.tar.gz volse-hubzilla-c1c2214b477223e87547f06f1dc1c0c9e7fe47d4.tar.bz2 volse-hubzilla-c1c2214b477223e87547f06f1dc1c0c9e7fe47d4.zip |
photo justification
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/view/js/main.js b/view/js/main.js index 8c4fcdc13..1599c3a2e 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -700,10 +700,28 @@ function updateConvItems(mode,data) { updatePageItems(update_mode,data); $("#page-spinner").spin(false); in_progress = false; + justifyPhotos(); }); } + 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; }); + } function notify_popup_loader(notifyType) { @@ -1050,7 +1068,6 @@ function previewTheme(elm) { } $(document).ready(function() { - jQuery.timeago.settings.strings = { prefixAgo : aStr['t01'], prefixFromNow : aStr['t02'], @@ -1074,6 +1091,8 @@ $(document).ready(function() { $(".autotime").timeago(); + justifyPhotos(); + }); function zFormError(elm,x) { @@ -1089,7 +1108,7 @@ $(document).ready(function() { -$(window).scroll(function () { +$(window).scroll(function () { if(typeof buildCmd == 'function') { // This is a content page with items and/or conversations $('#more').hide(); @@ -1099,8 +1118,8 @@ $(window).scroll(function () { $('#more').css("top","400"); $('#more').show(); } - - if($(window).scrollTop() + $(window).height() > $(document).height() - 100) { + + if($(window).scrollTop() + $(window).height() == $(document).height()) { if((pageHasMoreContent) && (! loadingPage)) { $('#more').hide(); $('#no-more').hide(); @@ -1120,7 +1139,7 @@ $(window).scroll(function () { $('#more').show(); } - if($(window).scrollTop() + $(window).height() > $(document).height() - 100) { + if($(window).scrollTop() + $(window).height() == $(document).height()) { if((pageHasMoreContent) && (! loadingPage)) { $('#more').hide(); $('#no-more').hide(); |