From dcce65c8fd6f6d4963a3dd0e8b73a79548a2aa8b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 7 Jan 2016 12:50:35 +0000 Subject: [PATCH] Bug 15299: Ask for confirmation when deleting a report from second page Some link are hidden when loading the page, by DataTables, we need to use the delegate jQuery method to attach a handler to the click event for all delete links (the ones existing when loading the page, and the ones displayed in the future). Test plan: Have more than 20 reports defined Go on the report list view, then change the number of elements displayed, click "action>delete". You should get a warn. Signed-off-by: Liz Rea Confirm that there is now a confirmation on delete from the list -> action menu Signed-off-by: Kyle M Hall Signed-off-by: Brendan A Gallagher --- .../prog/en/modules/reports/guided_reports_start.tt | 2 +- 1 file changed, 1 insertion(+), 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 6125814699..1655d92685 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,7 @@ $(document).ready(function(){ }); [% END %] - $(".confirmdelete").click(function(){ + $("#table_reports").delegate(".confirmdelete", 'click', function(){ $(this).parents('tr').attr("class","warn"); if(confirm(_("Are you sure you want to delete this saved report?"))){ return true; -- 2.39.5