From 70b109702ef20d0ebad027a98964ceae1fb216c3 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 12 Apr 2015 14:30:33 +0200 Subject: make dropItem more universal and move delete up in the dropdown menu --- view/js/main.js | 5 ++--- view/tpl/conv_item.tpl | 7 +++---- view/tpl/conv_list.tpl | 8 ++++---- 3 files changed, 9 insertions(+), 11 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 7479b17d3..d7777ea8c 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -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'); }); diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 7de0e05f9..facda251b 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -117,14 +117,13 @@ {{if $item.star}}
  • {{$item.star.toggle}}
  • {{/if}} + {{if $item.drop.dropping}} +
  • {{$item.drop.delete}}
  • + {{/if}} {{if $item.item_photo_menu}} {{$item.item_photo_menu}} {{/if}} - {{if $item.drop.dropping}} - -
  • {{$item.drop.delete}}
  • - {{/if}}
    diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl index 0d35fa685..c737c29ef 100755 --- a/view/tpl/conv_list.tpl +++ b/view/tpl/conv_list.tpl @@ -118,14 +118,14 @@ {{if $item.star}}
  • {{$item.star.toggle}}
  • {{/if}} + {{if $item.drop.dropping}} +
  • {{$item.drop.delete}}
  • + {{/if}} {{if $item.item_photo_menu}} {{$item.item_photo_menu}} {{/if}} - {{if $item.drop.dropping}} - -
  • {{$item.drop.delete}}
  • - {{/if}} +
    -- cgit v1.2.3