Setting 5sec delay on delete/update comment

This commit is contained in:
James 2023-06-26 19:39:22 +00:00 committed by GitHub
parent 102ae505b2
commit 8c123472e8

View file

@ -467,6 +467,7 @@ var pd = {
} }
}, },
delete: function (item) { delete: function (item) {
setTimeout(() => {
if (pd.performActions) { if (pd.performActions) {
$.ajax({ $.ajax({
url: '/api/del', url: '/api/del',
@ -494,8 +495,9 @@ var pd = {
pd.task.after = pd.task.items[0].data.name; pd.task.after = pd.task.items[0].data.name;
pd.actions.children.handleSingle(); pd.actions.children.handleSingle();
} }
}, },5000)},
edit: function (item) { edit: function (item) {
setTimeout(() => {
if (pd.performActions) { if (pd.performActions) {
$.ajax({ $.ajax({
url: '/api/editusertext', url: '/api/editusertext',
@ -522,7 +524,7 @@ var pd = {
pd.task.items[0].pdEdited = true; pd.task.items[0].pdEdited = true;
pd.actions.children.handleSingle(); pd.actions.children.handleSingle();
} }
}, },5000)},
}, },
ui: { ui: {
updateDisplay: function () { updateDisplay: function () {