make dropItem more universal and move delete up in the dropdown menu

This commit is contained in:
Mario Vavti
2015-04-12 14:30:33 +02:00
parent 962fdf08c0
commit 70b109702e
4 changed files with 10 additions and 12 deletions

View File

@@ -819,13 +819,12 @@ function doprofilelike(ident, verb) {
}
function dropItem(ident) {
var object = '#thread-wrapper-' + ident;
function dropItem(url, object) {
var confirm = confirmDelete();
if(confirm) {
$('body').css('cursor', 'wait');
$(object).fadeTo('fast', 0.33, function () {
$.get('item/drop/' + ident).done(function() {
$.get(url).done(function() {
$(object).remove();
$('body').css('cursor', 'auto');
});