[Bug 42128] New: Remove event attribute from admin-icon-selection.inc
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Bug ID: 42128 Summary: Remove event attribute from admin-icon-selection.inc Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: System Administration Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com admin-icon-selection.inc includes an "onmousedown" event attribute which should be handled outside of markup. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 195674 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195674&action=edit Bug 42128: Remove event attribute from admin-icon-selection.inc This patch removes the "onmousedown" event attribute from admin-icon-selection.inc, an include used in itemtypes.tt and authorised_values.tt. I took this opportunity to create separate JS files for both of those templates and added the event handler to the JS. To test, apply the patch and go to Administration. - Go to Item types and add or edit an item type. - In the icon selection section, select one of the built-in icons. - Switch to the "Remove image" tab. - Click the text input. The corresponding radio button should be selected. - Go to Authorized values and perform the same test. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited| |Athens County Public list of Sponsors| |Libraries Sponsorship status|--- |Sponsored Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195674|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 195686 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195686&action=edit Bug 42128: Remove event attribute from admin-icon-selection.inc This patch removes the "onmousedown" event attribute from admin-icon-selection.inc, an include used in itemtypes.tt and authorised_values.tt. I took this opportunity to create separate JS files for both of those templates and added the event handler to the JS. To test, apply the patch and go to Administration. - Go to Item types and add or edit an item type. - In the icon selection section, select one of the built-in icons. - Switch to the "Remove image" tab. - Click the text input. The corresponding radio button should be selected. - Go to Authorized values and perform the same test. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Signed off, no noticeable change in behavour before and after the patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Shouldn't those 2 new .js files be under js/pages? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42438 Status|Signed Off |Patch doesn't apply --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Event attributes have been removed on bug 42438 (that is PQA now). We can rewrite this patch and move the JS code to a separate .js file later, if still needed. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42438 [Bug 42438] Remove event attributes from icon selection include file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Remove event attribute from |Move JS code from |admin-icon-selection.inc |admin-icon-selection.inc to | |a separate .js file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195686|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 200248 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200248&action=edit Bug 42128: Remove event attribute from admin-icon-selection.inc This patch removes the "onmousedown" event attribute from admin-icon-selection.inc, an include used in itemtypes.tt and authorised_values.tt. I took this opportunity to create separate JS files for both of those templates and added the event handler to the JS. To test, apply the patch and go to Administration. - Go to Item types and add or edit an item type. - In the icon selection section, select one of the built-in icons. - Switch to the "Remove image" tab. - Click the text input. The corresponding radio button should be selected. - Go to Authorized values and perform the same test. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- Not coming from this patch, but the following code is not nice: 75 [% IF image_location.match('^http') %] 76 <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" /> 77 <input id="remoteimage" type="text" name="remoteImage" size="48" maxlength="200" value="[% image_location | html %]" /> 78 <img src="[% image_location | html %]" alt="" /> 79 [% ELSE %] 80 <input type="radio" id="remote_image_check" name="image" value="remoteImage" /> 81 <input type="text" id="remoteimage" name="remoteImage" size="48" maxlength="200" value="" /> 82 [% END %] 83 [% END %] We hide the value if what is in the DB does not start with "http". If you save, you lose the value. We should instead prevent to save incorrect value, not dropping the data without even a warning. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200248|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 200727 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200727&action=edit Bug 42128: Remove event attribute from admin-icon-selection.inc This patch removes the "onmousedown" event attribute from admin-icon-selection.inc, an include used in itemtypes.tt and authorised_values.tt. I took this opportunity to create separate JS files for both of those templates and added the event handler to the JS. To test, apply the patch and go to Administration. - Go to Item types and add or edit an item type. - In the icon selection section, select one of the built-in icons. - Switch to the "Remove image" tab. - Click the text input. The corresponding radio button should be selected. - Go to Authorized values and perform the same test. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 --- Comment #9 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.11.00 |26.11.00,26.05.02 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42128 --- Comment #10 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to 26.05.x for the upcoming 26.05.02 release. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org