[Bug 14265] New: Replace instances of Javascript trim() with $.trim()
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 Bug ID: 14265 Summary: Replace instances of Javascript trim() with $.trim() Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org At the moment, we use both jQuery's $.trim() and the regular Javascript trim() in our templates. You can find trim() in: - koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt - koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt You can find $.trim() in: - koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt The jQuery $.trim() appears perfectly cross-platform, but the Javascript trim() isn't supported in IE8 or earlier. It was only introduced in IE9. Since we already use jQuery everywhere, I don't see why we can't use $.trim() instead of trim(). At the moment, people using IE8 in the staff client (and I'm sure there are many of them) can't save patron categories. Javascript errors will prevent the submission of the page. -- I know we occasionally debate supporting older versions of IE, but this is a pretty easy win. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Replace instances of |Use $.trim instead of |Javascript trim() with |trim() in |$.trim() |admin/categorie.tt -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 39468 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39468&action=edit Bug 14265 - Use $.trim instead of trim() in admin/categorie.tt This patch replaces trim() with $.trim() in admin/categorie.tt, as $.trim() is more cross-platform (ie it is supported in "< IE9"). _TEST PLAN_ Before applying patch: 0) Use IE 8 or use Document Mode 8 in a newer IE using F12 Developer Tools 1) Go to Administration > Patron categories 2) Click "Edit" next to a category 3) Click "Save" at the bottom 4) Note the form doesn't submit (you can also notice the error in the console log) Apply the patch: 5) Hold down shift + refresh the page 6) Click "Save" at the bottom" 7) Note that the form does submit and there are no errors reported -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14266 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39468|0 |1 is obsolete| | --- Comment #2 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 39486 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39486&action=edit Bug 14265 - Use $.trim instead of trim() in admin/categorie.tt This patch replaces trim() with $.trim() in admin/categorie.tt, as $.trim() is more cross-platform (ie it is supported in "< IE9"). _TEST PLAN_ Before applying patch: 0) Use IE 8 or use Document Mode 8 in a newer IE using F12 Developer Tools 1) Go to Administration > Patron categories 2) Click "Edit" next to a category 3) Click "Save" at the bottom 4) Note the form doesn't submit (you can also notice the error in the console log) Apply the patch: 5) Hold down shift + refresh the page 6) Click "Save" at the bottom" 7) Note that the form does submit and there are no errors reported Signed-off-by: Indranil Das Gupta <indradg@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |indradg@gmail.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39486|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 39593 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39593&action=edit Bug 14265 - Use $.trim instead of trim() in admin/categorie.tt This patch replaces trim() with $.trim() in admin/categorie.tt, as $.trim() is more cross-platform (ie it is supported in "< IE9"). _TEST PLAN_ Before applying patch: 0) Use IE 8 or use Document Mode 8 in a newer IE using F12 Developer Tools 1) Go to Administration > Patron categories 2) Click "Edit" next to a category 3) Click "Save" at the bottom 4) Note the form doesn't submit (you can also notice the error in the console log) Apply the patch: 5) Hold down shift + refresh the page 6) Click "Save" at the bottom" 7) Note that the form does submit and there are no errors reported Signed-off-by: Indranil Das Gupta <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> No regression found using iceweasel. I did not know the staff interface was IE compatible. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks David! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Status|Pushed to Master |Pushed to Stable --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.20.x will be in 3.20.1 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14265 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #6 from Liz Rea <wizzyrea@gmail.com> --- Patch pushed to 3.18.x will be in 3.18.08 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org