Bug 16281

Summary: Remove the use of "onclick" from Reports module
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: ReportsAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: hector.hecaxmmx, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 16281: Remove the use of 'onclick' from Reports module
Bug 16281: Remove the use of 'onclick' from Reports module
[SIGNED-OFF] Bug 16281: Remove the use of 'onclick' from Reports module
Bug 16281 [Follow-up] Remove the use of "onclick" from Reports module
[SIGNED-OFF]Bug 16281: [Follow-up] Remove the use of "onclick" from Reports module
[PASSED QA] Bug 16281: Remove the use of 'onclick' from Reports module
[PASSED QA] Bug 16281: [Follow-up] Remove the use of "onclick" from Reports module

Description Aleisha Amohia 2016-04-17 23:06:34 UTC
Onclick attributes in reports module should be rewritten so that JS functionality can be separate from the markup. (See Bug 16262)
Comment 1 Aleisha Amohia 2016-04-17 23:48:39 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-04-19 15:22:45 UTC
You don't need to add a new "confirmDel()" function. One is defined in staff-global.js.
Comment 3 Aleisha Amohia 2016-04-21 23:00:31 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2016-04-22 13:34:07 UTC Comment hidden (obsolete)
Comment 5 Owen Leonard 2016-04-22 13:34:11 UTC Comment hidden (obsolete)
Comment 6 Héctor Eduardo Castro Avalos 2016-04-22 14:36:17 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2016-04-24 23:26:27 UTC
Created attachment 50603 [details] [review]
[PASSED QA] 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 <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2016-04-24 23:26:57 UTC
Created attachment 50604 [details] [review]
[PASSED QA] Bug 16281: [Follow-up] Remove the use of "onclick" from Reports module

This minor follow-up adds a dummy href attribute to the "Return to the
previous page" link so that the link behaves like a link. A
"preventDefault()" is added to the goback() function to keep the "#"
link from triggering a page jump.

To test, apply the patch, create a report with an SQL error and run
it. Confirm that the 'Return to previous page' link works as expected.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Kyle M Hall (khall) 2016-04-29 10:59:35 UTC
Pushed to master! Should be in the May 2016 release! Merci Aleisha!