https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16268
--- Comment #3 from Aleisha Amohia <[email protected]> --- (In reply to Owen Leonard from comment #2) > This patch violates the newly approved and newly added to the wiki (as of > yesterday) coding guideline JS9: "Avoid the use of event attributes like > "onclick" to attach events." > > https://wiki.koha-community.org/wiki/Coding_Guidelines#JS9: > _Avoid_the_use_of_event_attributes_like_.22onclick.22_to_attach_events > > There is a simple function in staff-global.js which seems to be seldom used, > but it could be in this case: > > function confirmDelete(message) { > return (confirm(message) ? true : false); > } > > --- > > $(document).ready(function(){ > $(".delete_rule").on("click",function(){ > return confirmDelete(MSG_CONFIRM_DELETE); > }); > }); > > I have started the process of tracking down and cleaning up use of "onclick" > (See Bug 16262) but there are many templates to fix. Ah thanks for bringing this to my attention. I recently had a few patches pass QA where I was using the onclick attribute for confirm messages. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
