From 2d27356979679aa18e9c3c397b1322ef6a36c94a Mon Sep 17 00:00:00 2001 From: TomMago Date: Thu, 3 Sep 2020 17:30:05 +0200 Subject: [PATCH] Fixed deltion bug by waiting for the deletion request to finish --- bl-kernel/admin/views/dashboard.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bl-kernel/admin/views/dashboard.php b/bl-kernel/admin/views/dashboard.php index 0d2b36e1..7caed44f 100644 --- a/bl-kernel/admin/views/dashboard.php +++ b/bl-kernel/admin/views/dashboard.php @@ -74,11 +74,8 @@ html += '
'; html += 'p('view') ?>'; html += 'p('edit') ?>'; - html += 'p('Delete') ?>'; - html += '
'; - } return html; @@ -172,13 +169,12 @@ function setKey() { $(document).ready(function() { - // Button for delete a page in the table $(".select2-dropdown").css("z-index","1040"); // Event from button accept from the modal $(".deletePageModalAcceptButton").on("click", function() { - $( "body" ).append(""); + $( "body" ).append(""); var form = jQuery('
', { 'action': HTML_PATH_ADMIN_ROOT+'edit-content/'+key, @@ -199,10 +195,14 @@ $(document).ready(function() { })))); form.hide().appendTo("body").submit(); - + $("#jsdeletePageModal").modal('hide'); - $('.select2-search__field').trigger("input"); + // Wait for request to finish before updating search results + $('#formSendingIframe').on( 'load', function() { + $('.select2-search__field').trigger("input"); + } ); + }); });