port like button to spin.js

This commit is contained in:
git-marijus 2013-07-13 21:37:39 +02:00
parent caa02c28f2
commit 272642966b

View File

@ -252,7 +252,7 @@
function NavUpdate() { function NavUpdate() {
if(liking) if(liking)
$('.like-rotator').hide(); $('.like-rotator').spin(false);
if(! stopped) { if(! stopped) {
@ -423,7 +423,7 @@ function updateConvItems(mode,data) {
}); });
} }
$('.like-rotator').hide(); $('.like-rotator').spin(false);
if(commentBusy) { if(commentBusy) {
commentBusy = false; commentBusy = false;
@ -475,7 +475,7 @@ function updateConvItems(mode,data) {
function liveUpdate() { function liveUpdate() {
if((src == null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; } if((src == null) || (stopped) || (! profile_uid)) { $('.like-rotator').spin(false); return; }
if(($('.comment-edit-text-full').length) || (in_progress)) { if(($('.comment-edit-text-full').length) || (in_progress)) {
if(livetime) { if(livetime) {
clearTimeout(livetime); clearTimeout(livetime);
@ -586,14 +586,14 @@ function updateConvItems(mode,data) {
function dolike(ident,verb) { function dolike(ident,verb) {
unpause(); unpause();
$('#like-rotator-' + ident.toString()).show(); $('#like-rotator-' + ident.toString()).spin('tiny');
$.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate ); $.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate );
liking = 1; liking = 1;
} }
function dosubthread(ident) { function dosubthread(ident) {
unpause(); unpause();
$('#like-rotator-' + ident.toString()).show(); $('#like-rotator-' + ident.toString()).spin('tiny');
$.get('subthread/' + ident.toString(), NavUpdate ); $.get('subthread/' + ident.toString(), NavUpdate );
liking = 1; liking = 1;
} }
@ -601,7 +601,7 @@ function updateConvItems(mode,data) {
function dostar(ident) { function dostar(ident) {
ident = ident.toString(); ident = ident.toString();
$('#like-rotator-' + ident).show(); $('#like-rotator-' + ident).spin('tiny');
$.get('starred/' + ident, function(data) { $.get('starred/' + ident, function(data) {
if(data.result == 1) { if(data.result == 1) {
$('#starred-' + ident).addClass('starred'); $('#starred-' + ident).addClass('starred');
@ -615,7 +615,7 @@ function updateConvItems(mode,data) {
$('#star-' + ident).removeClass('hidden'); $('#star-' + ident).removeClass('hidden');
$('#unstar-' + ident).addClass('hidden'); $('#unstar-' + ident).addClass('hidden');
} }
$('#like-rotator-' + ident).hide(); $('#like-rotator-' + ident).spin(false);
}); });
} }