From d06de76eab41465fc83431aa57018b094931f0f8 Mon Sep 17 00:00:00 2001 From: Aleisha Date: Sun, 17 Apr 2016 23:45:26 +0000 Subject: [PATCH] Bug 16281: Remove the use of 'onclick' from Reports module EDIT: Removing unnecessary functions To test: 1) Go to Reports -> Dictionary a) Attempt to delete a definition. Confirm the Ok and cancel buttons in confirm dialog work as expected 2) Go to Reports -> Build new a) On each step of building a report, confirm the back button works as expected b) Confirm add column and delete column on step 3 works as expected 3) Confirm deleting a report from the toolbar triggers confirm dialog and it works as expected 4) Create a report with an SQL error and run it. Confirm that the 'Return to previous page' link works as expected Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- .../prog/en/includes/reports-toolbar.inc | 8 +++++- .../prog/en/modules/reports/dictionary.tt | 9 +++++- .../modules/reports/guided_reports_start.tt | 28 +++++++++++++------ 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc index eb1d266d0d..fef11668ba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc @@ -27,7 +27,7 @@ [% IF ( CAN_user_reports_create_reports ) %] @@ -50,4 +50,10 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt index fbae1d3d3b..c9e875290b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt @@ -5,6 +5,13 @@ @@ -82,7 +89,7 @@ var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this dictionary defi
- +
[% END %] 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 0dd6c5c5ac..a139f61b2e 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 @@ -68,6 +68,18 @@ function load_group_subgroups () { $(document).ready(function(){ +$(".goback").on("click",function(){ + window.history.back(); +}); + +$("#addColumn").on("click",function(){ + addColumn(); +}); + +$("#delColumn").on("click",function(){ + delColumn(); +}); + [% IF (saved1) %] var rtable = $("#table_reports").dataTable($.extend(true, {}, dataTablesDefaults, { 'bAutoWidth': false, @@ -466,7 +478,7 @@ canned reports and writing custom SQL reports.

- +
@@ -514,8 +526,8 @@ canned reports and writing custom SQL reports.

[% END %] -

-
+

+
@@ -526,7 +538,7 @@ canned reports and writing custom SQL reports.

- +
@@ -599,7 +611,7 @@ canned reports and writing custom SQL reports.

[% END %]
- +
[% END %] @@ -631,7 +643,7 @@ canned reports and writing custom SQL reports.

- +
[% END %] @@ -738,7 +750,7 @@ canned reports and writing custom SQL reports.

- +
[% END %] @@ -1005,7 +1017,7 @@ Sub report: