From 7cfc14fef755f5d5327f936c042be1b68aef5eaa Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 22 Sep 2022 12:50:11 +0000 Subject: emit a notice if an item was deleted - issue #1691 --- include/js_strings.php | 1 + view/js/main.js | 2 ++ view/tpl/js_strings.tpl | 1 + 3 files changed, 4 insertions(+) diff --git a/include/js_strings.php b/include/js_strings.php index ed73b0420..090d28ce3 100644 --- a/include/js_strings.php +++ b/include/js_strings.php @@ -3,6 +3,7 @@ function js_strings() { return replace_macros(get_markup_template('js_strings.tpl'), array( '$delitem' => t('Delete this item?'), + '$itemdel' => t('Item deleted'), '$comment' => t('Comment'), '$showmore' => sprintf( t('%s show all'), ''), '$showfewer' => sprintf( t('%s show less'), ''), diff --git a/view/js/main.js b/view/js/main.js index b4b440a27..d3eca2681 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1284,6 +1284,8 @@ function dropItem(url, object, b64mid) { $(object + ', #pinned-wrapper-' + id).remove(); $('body').css('cursor', 'auto'); + $.jGrowl(aStr.itemdel, { sticky: false, theme: 'notice', life: 3000 }); + if (typeof b64mid !== typeof undefined) { $('[data-b64mid=\'' + b64mid + '\']').fadeOut(function() { this.remove(); diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl index 8f05165f1..46536a89a 100644 --- a/view/tpl/js_strings.tpl +++ b/view/tpl/js_strings.tpl @@ -3,6 +3,7 @@ var aStr = { 'delitem' : "{{$delitem}}", + 'itemdel' : "{{$itemdel}}", 'comment' : "{{$comment}}", 'showmore' : "{{$showmore}}", 'showfewer' : "{{$showfewer}}", -- cgit v1.2.3