From a73dbb307347735db3bc076aaa5f92b3e90361fa Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 8 Apr 2015 14:10:38 +0200 Subject: delete conv items on the fly in background --- view/js/main.js | 15 +++++++++++++++ view/tpl/conv_item.tpl | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 552dd959e..7479b17d3 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -818,6 +818,21 @@ function doprofilelike(ident, verb) { $.get('like/' + ident + '?verb=' + verb, function() { window.location.href=window.location.href; }); } + +function dropItem(ident) { + var object = '#thread-wrapper-' + ident; + var confirm = confirmDelete(); + if(confirm) { + $('body').css('cursor', 'wait'); + $(object).fadeTo('fast', 0.33, function () { + $.get('item/drop/' + ident).done(function() { + $(object).remove(); + $('body').css('cursor', 'auto'); + }); + }); + } +} + function dosubthread(ident) { unpause(); $('#like-rotator-' + ident.toString()).spin('tiny'); diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index a575df554..7de0e05f9 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -123,7 +123,7 @@ {{/if}} {{if $item.drop.dropping}} -
  • {{$item.drop.delete}}
  • +
  • {{$item.drop.delete}}
  • {{/if}} -- cgit v1.2.3