diff options
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/view/js/main.js b/view/js/main.js index b9fb9f85e..625ac5b01 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -372,7 +372,7 @@ function NavUpdate() { if($('#live-network').length) { src = 'network'; liveUpdate(); } if($('#live-channel').length) { src = 'channel'; liveUpdate(); } - if($('#live-home').length) { src = 'home'; liveUpdate(); } + if($('#live-public').length) { src = 'public'; liveUpdate(); } if($('#live-display').length) { src = 'display'; liveUpdate(); } if($('#live-search').length) { src = 'search'; liveUpdate(); } @@ -620,13 +620,14 @@ function collapseHeight() { if(orgHeight > divmore_height + 10) { if(! $(this).hasClass('divmore')) { $(this).readmore({ + speed: 0, collapsedHeight: divmore_height, moreLink: '<a href="#" class="divgrow-showmore">' + aStr.divgrowmore + '</a>', lessLink: '<a href="#" class="divgrow-showmore">' + aStr.divgrowless + '</a>', beforeToggle: function(trigger, element, expanded) { if(expanded) { if((($(element).offset().top + divmore_height) - $(window).scrollTop()) < 65 ) { - $('html, body').animate( { scrollTop: $(window).scrollTop() - (orgHeight - divmore_height) }, {duration: 100 } ); + $('html, body').animate( { scrollTop: $(window).scrollTop() - (orgHeight - divmore_height) }, {duration: 0 } ); } } } @@ -742,7 +743,6 @@ function justifyPhotos() { $('#photo-album-contents').justifiedGallery({ margins: 3, border: 0, - ignoreElement: '#page-end', sizeRangeSuffixes: { 'lt100': '-2', 'lt240': '-2', @@ -817,6 +817,20 @@ function doprofilelike(ident, verb) { $.get('like/' + ident + '?verb=' + verb, function() { window.location.href=window.location.href; }); } + +function dropItem(url, object) { + var confirm = confirmDelete(); + if(confirm) { + $('body').css('cursor', 'wait'); + $(object).fadeTo('fast', 0.33, function () { + $.get(url).done(function() { + $(object).remove(); + $('body').css('cursor', 'auto'); + }); + }); + } +} + function dosubthread(ident) { unpause(); $('#like-rotator-' + ident.toString()).spin('tiny'); @@ -869,8 +883,8 @@ function getPosition(e) { return cursor; } -function lockview(event, id) { - $.get('lockview/' + id, function(data) { +function lockview(type, id) { + $.get('lockview/' + type + '/' + id, function(data) { $('#panel-' + id).html(data); }); } |