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 <liz@catalyst.net.nz> Confirm that there is now a confirmation on delete from the list -> action menu Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
parent
0e4b703d23
commit
dcce65c8fd
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue