From 16acd1068ffeb46f296afd4f3ea528e056a8bf76 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 4 Nov 2014 11:11:29 -0500 Subject: [PATCH] Bug 13132 - Report deletion confirmation doesn't work with DataTables pagination Content-Type: text/plain; charset="utf-8" This patch fixes a problem with save report deletion confirmation which appears when the user tries to delete a report found on a DataTables page > 1. This patch alters the trigger to accommodate links which are not initially shown. A small addition has been made to automatically close the menu when the delete link is clicked. To test you must have, at the very least, greater than 10 saved reports. - If necessary change the number of entries shown so that there is a "next" page of results. - Navigate to a subsequent page, click the "Action" menu, and choose "Delete" for one of your saved reports. - A confirmation message should appear. -- Clicking "OK" should complete the deletion. -- Clicking "Cancel" should cancel the deletion. - Confirm that deletion confirmations work from the first page and from other tabs. --- .../en/modules/reports/guided_reports_start.tt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 6b630a4..73656ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -157,7 +157,8 @@ $(document).ready(function(){ }); [% END %] [% IF ( saved1 ) %] - $(".confirmdelete").click(function(){ + $("body").on("click",".confirmdelete",function(){ + $(".dropdown").removeClass("open"); $(this).parents('tr').attr("class","warn"); if(confirm(_("Are you sure you want to delete this saved report?"))){ return true; -- 1.7.9.5