port like button to spin.js
This commit is contained in:
parent
caa02c28f2
commit
272642966b
14
js/main.js
14
js/main.js
@ -252,7 +252,7 @@
|
||||
function NavUpdate() {
|
||||
|
||||
if(liking)
|
||||
$('.like-rotator').hide();
|
||||
$('.like-rotator').spin(false);
|
||||
|
||||
if(! stopped) {
|
||||
|
||||
@ -423,7 +423,7 @@ function updateConvItems(mode,data) {
|
||||
});
|
||||
}
|
||||
|
||||
$('.like-rotator').hide();
|
||||
$('.like-rotator').spin(false);
|
||||
|
||||
if(commentBusy) {
|
||||
commentBusy = false;
|
||||
@ -475,7 +475,7 @@ function updateConvItems(mode,data) {
|
||||
|
||||
|
||||
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(livetime) {
|
||||
clearTimeout(livetime);
|
||||
@ -586,14 +586,14 @@ function updateConvItems(mode,data) {
|
||||
|
||||
function dolike(ident,verb) {
|
||||
unpause();
|
||||
$('#like-rotator-' + ident.toString()).show();
|
||||
$('#like-rotator-' + ident.toString()).spin('tiny');
|
||||
$.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate );
|
||||
liking = 1;
|
||||
}
|
||||
|
||||
function dosubthread(ident) {
|
||||
unpause();
|
||||
$('#like-rotator-' + ident.toString()).show();
|
||||
$('#like-rotator-' + ident.toString()).spin('tiny');
|
||||
$.get('subthread/' + ident.toString(), NavUpdate );
|
||||
liking = 1;
|
||||
}
|
||||
@ -601,7 +601,7 @@ function updateConvItems(mode,data) {
|
||||
|
||||
function dostar(ident) {
|
||||
ident = ident.toString();
|
||||
$('#like-rotator-' + ident).show();
|
||||
$('#like-rotator-' + ident).spin('tiny');
|
||||
$.get('starred/' + ident, function(data) {
|
||||
if(data.result == 1) {
|
||||
$('#starred-' + ident).addClass('starred');
|
||||
@ -615,7 +615,7 @@ function updateConvItems(mode,data) {
|
||||
$('#star-' + ident).removeClass('hidden');
|
||||
$('#unstar-' + ident).addClass('hidden');
|
||||
}
|
||||
$('#like-rotator-' + ident).hide();
|
||||
$('#like-rotator-' + ident).spin(false);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user