aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-29 07:49:19 +0000
committerMario <mario@mariovavti.com>2021-06-29 07:49:19 +0000
commit652d083766a4a0b11151fe1f196a49da533d6349 (patch)
treef867996d5eb89191c7ef7b5bcae30b25a449300b
parent5a474f94e05e16f48a5683e991112455c38fc6cf (diff)
downloadvolse-hubzilla-652d083766a4a0b11151fe1f196a49da533d6349.tar.gz
volse-hubzilla-652d083766a4a0b11151fe1f196a49da533d6349.tar.bz2
volse-hubzilla-652d083766a4a0b11151fe1f196a49da533d6349.zip
implement removing of notifications/preview-messages of deleted items
-rw-r--r--view/js/main.js13
-rw-r--r--view/tpl/conv_item.tpl4
-rw-r--r--view/tpl/conv_list.tpl10
3 files changed, 19 insertions, 8 deletions
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}}
- <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
+ <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}', '{{$item.mid}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
{{/if}}
{{if $item.dropdown_extras}}
<div class="dropdown-divider"></div>
- {{$item.dropdown_extras}}
+ {{$item.dropdown_extras}}
{{/if}}
{{if $item.edpost && $item.dreport}}
<div class="dropdown-divider"></div>
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 @@
</a>
<a class="dropdown-item" href="#" title="{{$item.conlabels.1}}" onclick="dolike({{$item.id}},'disagree'); return false;">
<i class="item-act-list fa fa-times{{if $item.my_responses.disagree}} ivoted{{/if}}" ></i> {{$item.conlabels.1}}
- </a>
+ </a>
<a class="dropdown-item" href="#" title="{{$item.conlabels.2}}" onclick="dolike({{$item.id}},'abstain'); return false;">
<i class="item-act-list fa fa-question{{if $item.my_responses.abstain}} ivoted{{/if}}" ></i> {{$item.conlabels.2}}
</a>
@@ -169,12 +169,16 @@
{{/foreach}}
{{/if}}
{{if $item.drop.dropping}}
- <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
+ <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}', '{{$item.mid}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
{{/if}}
- <div class="dropdown-divider"></div>
{{if $item.edpost && $item.dreport}}
+ <div class="dropdown-divider"></div>
<a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a>
{{/if}}
+ {{if $item.settings}}
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item conversation-settings-link" href="" data-toggle="modal" data-target="#conversation_settings">{{$item.settings}}</a>
+ {{/if}}
</div>
</div>
</div>