Bug 16281 - Remove the use of "onclick" from Reports module
Summary: Remove the use of "onclick" from Reports module
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-17 23:06 UTC by Aleisha Amohia
Modified: 2016-12-05 21:27 UTC (History)
2 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16281: Remove the use of 'onclick' from Reports module (7.71 KB, patch)
2016-04-17 23:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 16281: Remove the use of 'onclick' from Reports module (7.60 KB, patch)
2016-04-21 23:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16281: Remove the use of 'onclick' from Reports module (7.74 KB, patch)
2016-04-22 13:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16281 [Follow-up] Remove the use of "onclick" from Reports module (1.61 KB, patch)
2016-04-22 13:34 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 16281: [Follow-up] Remove the use of "onclick" from Reports module (1.66 KB, patch)
2016-04-22 14:36 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
[PASSED QA] Bug 16281: Remove the use of 'onclick' from Reports module (7.75 KB, patch)
2016-04-24 23:26 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 16281: [Follow-up] Remove the use of "onclick" from Reports module (1.72 KB, patch)
2016-04-24 23:26 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 2016-04-29 10:59:35 UTC
Pushed to master! Should be in the May 2016 release! Merci Aleisha!