From 652d083766a4a0b11151fe1f196a49da533d6349 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 29 Jun 2021 07:49:19 +0000 Subject: implement removing of notifications/preview-messages of deleted items --- view/js/main.js | 13 ++++++++++--- view/tpl/conv_item.tpl | 4 ++-- view/tpl/conv_list.tpl | 10 +++++++--- 3 files changed, 19 insertions(+), 8 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 9ab66833c..9ef81b72c 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1274,7 +1274,7 @@ function dopin(id) { }); } -function dropItem(url, object) { +function dropItem(url, object, b64mid) { var confirm = confirmDelete(); if(confirm) { var id = url.split('/')[2]; @@ -1286,11 +1286,18 @@ function dropItem(url, object) { $('body').css('cursor', 'auto'); }); - if($('#wall-item-pinned-' + id).length) + if($('#wall-item-pinned-' + id).length) { $.post('pin/pin', { 'id' : id }); + } + + if (typeof b64mid !== typeof undefined) { + $('[data-b64mid=\'' + b64mid + '\']').fadeOut(function() { + this.remove(); + }); + } return true; - } + } else { return false; } diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 361392796..2134f86e7 100644 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -189,11 +189,11 @@ {{/foreach}} {{/if}} {{if $item.drop.dropping}} - {{$item.drop.delete}} + {{$item.drop.delete}} {{/if}} {{if $item.dropdown_extras}} - {{$item.dropdown_extras}} + {{$item.dropdown_extras}} {{/if}} {{if $item.edpost && $item.dreport}} diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl index ee5dc9742..af6cc0557 100644 --- a/view/tpl/conv_list.tpl +++ b/view/tpl/conv_list.tpl @@ -124,7 +124,7 @@ {{$item.conlabels.1}} - + {{$item.conlabels.2}} @@ -169,12 +169,16 @@ {{/foreach}} {{/if}} {{if $item.drop.dropping}} - {{$item.drop.delete}} + {{$item.drop.delete}} {{/if}} - {{if $item.edpost && $item.dreport}} + {{$item.dreport}} {{/if}} + {{if $item.settings}} + + {{$item.settings}} + {{/if}} -- cgit v1.2.3