diff options
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/main.js | 37 | ||||
-rw-r--r-- | view/js/mod_connedit.js | 13 | ||||
-rw-r--r-- | view/js/mod_new_channel.js | 5 |
3 files changed, 35 insertions, 20 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(); diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index 6231dbd0c..fabf24e95 100644 --- a/view/js/mod_connedit.js +++ b/view/js/mod_connedit.js @@ -6,11 +6,18 @@ function abook_perms_msg() { } $(document).ready(function() { - if(typeof(after_following) !== 'undefined' && after_following) - connectFullShare(); + if(typeof(after_following) !== 'undefined' && after_following) { + if(typeof(connectDefaultShare) !== 'undefined') + connectDefaultShare(); + else + connectFullShare(); + } $('#id_pending').click(function() { - connectFullShare(); + if(typeof(connectDefaultShare) !== 'undefined') + connectDefaultShare(); + else + connectFullShare(); }); $('.abook-edit-me').click(function() { diff --git a/view/js/mod_new_channel.js b/view/js/mod_new_channel.js index a3c1dd05c..492267ff9 100644 --- a/view/js/mod_new_channel.js +++ b/view/js/mod_new_channel.js @@ -1,16 +1,21 @@ $(document).ready(function() { +// $("#privacy-role-select").sSelect(); $("#newchannel-name").blur(function() { + $("#name-spinner").spin('small'); var zreg_name = $("#newchannel-name").val(); $.get("new_channel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) { $("#newchannel-nickname").val(data); zFormError("#newchannel-name-feedback",data.error); + $("#name-spinner").spin(false); }); }); $("#newchannel-nickname").blur(function() { + $("#nick-spinner").spin('small'); var zreg_nick = $("#newchannel-nickname").val(); $.get("new_channel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) { $("#newchannel-nickname").val(data); zFormError("#newchannel-nickname-feedback",data.error); + $("#nick-spinner").spin(false); }); }); |