Bug 3134: highlight all selected reports when confirming deletion of multiple reports
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 21 Aug 2013 08:23:11 +0000 (10:23 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 21 Aug 2013 14:25:54 +0000 (14:25 +0000)
This patch adds the same behavior when deleting 1 or more reports.
When checkboxes are checked and the "delete selected" button is pressed,
checked lines are hightlighted in red.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

index 60bbe28..c16013e 100644 (file)
@@ -129,7 +129,13 @@ $(document).ready(function(){
             alert(_("You must select one or more reports to delete"));
             return false;
         }
-        return confirm(_("Are you sure you want to delete the selected reports?"));
+        $(checkedItems).parents('tr').addClass("warn");
+        if( confirm(_("Are you sure you want to delete the selected reports?")) ) {
+            return true;
+        } else {
+            $(checkedItems).parents('tr').removeClass("warn");
+            return false;
+        }
     });
 [% END %]