From 3caee72aee3d5008f954e3ccf1dc2b61fedf23d8 Mon Sep 17 00:00:00 2001 From: marijus Date: Thu, 11 Sep 2014 10:41:11 +0200 Subject: another day another concept - hope this works better --- view/css/mod_photos.css | 4 ++++ view/js/main.js | 36 +++++++++++++++--------------------- view/tpl/photos_recent.tpl | 6 ++++-- view/tpl/photosajax.tpl | 3 +++ 4 files changed, 26 insertions(+), 23 deletions(-) (limited to 'view') diff --git a/view/css/mod_photos.css b/view/css/mod_photos.css index fa3b5b35a..b81145cd5 100644 --- a/view/css/mod_photos.css +++ b/view/css/mod_photos.css @@ -182,3 +182,7 @@ margin-left: 200px; } +div[id^='photo-album-contents-'] { + margin-bottom: 3px; +} + diff --git a/view/js/main.js b/view/js/main.js index ae90bb272..e263fd116 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -700,29 +700,25 @@ 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 justifyPhotos(bParam_page) { + $('#photo-album-contents-' + bParam_page).justifiedGallery({ + lastRow : 'nojustify', + captions: true, + margins: 3, + rowHeight : 150, + sizeRangeSuffixes : { + 'lt100': '', + 'lt240': '', + 'lt320': '', + 'lt500': '', + 'lt640': '', + 'lt1024': '' + } + }); } function notify_popup_loader(notifyType) { @@ -1093,8 +1089,6 @@ $(document).ready(function() { $(".autotime").timeago(); - justifyPhotos(); - }); function zFormError(elm,x) { diff --git a/view/tpl/photos_recent.tpl b/view/tpl/photos_recent.tpl index 8eaa208b1..0f86a635d 100755 --- a/view/tpl/photos_recent.tpl +++ b/view/tpl/photos_recent.tpl @@ -3,12 +3,14 @@ {{$upload.0}} {{/if}} -
+
{{foreach $photos as $photo}} {{include file="photo_top.tpl"}} {{/foreach}} -
+
+ +
diff --git a/view/tpl/photosajax.tpl b/view/tpl/photosajax.tpl index a88682e8b..a9a9605d0 100755 --- a/view/tpl/photosajax.tpl +++ b/view/tpl/photosajax.tpl @@ -1,4 +1,7 @@ +
{{foreach $photos as $photo}} {{include file="photo_top.tpl"}} {{/foreach}} +
+ -- cgit v1.2.3