From af293fd8867729a9670d19231ca4377093a00438 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Sun, 9 Jul 2017 21:57:06 +0000 Subject: [PATCH] Bug 18869: [FOLLOW-UP] Make page reload after club or template delete If deleting the last club or template in a table, the row is deleted from the webpage by ajax so the nice blue bubble message does not show. This patch forces the page to reload so the blue bubble message shows instead of the empty table. To test: Confirm that the blue message shows when tables are empty. Add a template and a club, then delete a club. Confirm the page reloads and the message shows. Test with template Sponsored-by: Catalyst IT Signed-off-by: Mark Tompsett Signed-off-by: Jonathan Druart --- .../prog/en/modules/clubs/clubs.tt | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt index a65cd0cd56..2185156ed9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt @@ -36,7 +36,7 @@ data: { id: id }, success: function( data ) { if ( data.success ) { - tTable.fnDeleteRow(a.closest("tr")[0]); + location.reload(); } else { alert(_("Unable to delete template!")); } @@ -54,7 +54,7 @@ data: { id: id }, success: function( data ) { if ( data.success ) { - cTable.fnDeleteRow(a.closest("tr")[0]); + location.reload(); } else { alert(_("Unable to delete club!")); } @@ -232,22 +232,21 @@ Actions