aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authormarijus <mario@mariovavti.com>2014-09-11 10:35:19 +0200
committermarijus <mario@mariovavti.com>2014-09-11 10:35:19 +0200
commit8835f646aeb6276987f11cc4799c3810802c3f1f (patch)
tree8be0763dc52f1590fecd103203deb9660cc9c21f /view/js
parent8bf4b5e7768c13d89e8080aeb7baef38b09b5ca8 (diff)
downloadvolse-hubzilla-8835f646aeb6276987f11cc4799c3810802c3f1f.tar.gz
volse-hubzilla-8835f646aeb6276987f11cc4799c3810802c3f1f.tar.bz2
volse-hubzilla-8835f646aeb6276987f11cc4799c3810802c3f1f.zip
Revert "Revert "Merge pull request #583 from git-marijus/master""
This reverts commit 08638f3ec88e86def618ff89bdedb9ae9696d218.
Diffstat (limited to 'view/js')
-rw-r--r--view/js/main.js31
1 files changed, 26 insertions, 5 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 8c4fcdc13..ae90bb272 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -700,10 +700,30 @@ function updateConvItems(mode,data) {
updatePageItems(update_mode,data);
$("#page-spinner").spin(false);
in_progress = false;
+ justifyPhotos();
});
}
+ function justifyPhotos() {
+ if($('#photo-album-contents').length > 0) {
+ 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 +1070,6 @@ function previewTheme(elm) {
}
$(document).ready(function() {
-
jQuery.timeago.settings.strings = {
prefixAgo : aStr['t01'],
prefixFromNow : aStr['t02'],
@@ -1074,6 +1093,8 @@ $(document).ready(function() {
$(".autotime").timeago();
+ justifyPhotos();
+
});
function zFormError(elm,x) {
@@ -1089,7 +1110,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 +1120,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 +1141,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();