From 62d20409ea1204a3b1158de2571ba64d00e33382 Mon Sep 17 00:00:00 2001 From: Inga Kirschnick Date: Wed, 7 Jun 2023 11:29:00 +0200 Subject: [PATCH] Sleep Timer fix CorpusList --- app/static/js/ResourceLists/CorpusList.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/static/js/ResourceLists/CorpusList.js b/app/static/js/ResourceLists/CorpusList.js index c0e6f6d2..0a8905c5 100644 --- a/app/static/js/ResourceLists/CorpusList.js +++ b/app/static/js/ResourceLists/CorpusList.js @@ -246,17 +246,18 @@ class CorpusList extends ResourceList { this.selectedItemIds.forEach(selectedItemId => { let listItem = this.listjs.get('id', selectedItemId)[0].elm; let values = this.listjs.get('id', listItem.dataset.id)[0].values(); - if (!values['is-owner']) { - Requests.corpora.entity.followers.entity.delete(selectedItemId, currentUserId); - } else { + if (values['is-owner']) { Requests.corpora.entity.delete(selectedItemId); + } else { + Requests.corpora.entity.followers.entity.delete(selectedItemId, currentUserId); + setTimeout(() => { + window.location.reload(); + }, 1000); } }); this.selectedItemIds.clear(); this.renderingItemSelection(); - setTimeout(() => { - window.location.reload(); - }, 1000); + }); modal.open(); break;