item deletion: use js to delete items. so we don't have to reload the page

This commit is contained in:
rabuzarus 2016-05-11 16:04:11 +02:00
parent 1f994aa17a
commit b13eb01d3c
7 changed files with 74 additions and 8 deletions

View file

@ -178,3 +178,18 @@ function qCommentInsert(obj,id) {
}
function confirmDelete() { return confirm(aStr.delitem); }
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');
});
});
}
}