"wait" cursor when submitting comments bug #45

This commit is contained in:
Friendika 2011-04-18 19:08:50 -07:00
parent b168847b56
commit 2afd4c9d5a
1 changed files with 7 additions and 3 deletions

View File

@ -27,6 +27,7 @@
var liking = 0; var liking = 0;
var in_progress = false; var in_progress = false;
var langSelect = false; var langSelect = false;
var commentBusy = false;
$(document).ready(function() { $(document).ready(function() {
$.ajaxSetup({cache: false}); $.ajaxSetup({cache: false});
@ -109,7 +110,6 @@
}) ; }) ;
} }
timer = setTimeout(NavUpdate,30000); timer = setTimeout(NavUpdate,30000);
} }
function liveUpdate() { function liveUpdate() {
@ -153,8 +153,11 @@
prev = ident; prev = ident;
}); });
$('.like-rotator').hide(); $('.like-rotator').hide();
if(commentBusy) {
commentBusy = false;
$('body').css('cursor', 'auto');
}
}); });
} }
function imgbright(node) { function imgbright(node) {
@ -232,6 +235,8 @@
} }
function post_comment(id) { function post_comment(id) {
commentBusy = true;
$('body').css('cursor', 'wait');
$.post( $.post(
"item", "item",
$("#comment-edit-form-" + id).serialize(), $("#comment-edit-form-" + id).serialize(),
@ -248,7 +253,6 @@
if(data.reload) { if(data.reload) {
window.location.href=data.reload; window.location.href=data.reload;
} }
}, },
"json" "json"
); );