[Bug 39715] New: Do not quote DataTables options
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Bug ID: 39715 Summary: Do not quote DataTables options Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org Koha templates are inconsistent when it comes to quoting DataTables options: (https://gitlab.com/koha-community/Koha/-/blob/main/koha-tmpl/intranet-tmpl/p...) var cities_table = $("#table_cities").kohaTable({ "ajax": { "url": cities_table_url }, "order": [[ 1, "asc" ]], "columnDefs": [ { "targets": [0,1,2,3,4], "render": function (data, type, row, meta) { if ( type == 'display' ) { if ( data != null ) { return data.escapeHtml(); } else { return ""; } } return data; } } ], Options in this example like "ajax", "order", and "columnDefs" are quoted in this example but other templates will have unquoted options. I think we should standardize on having no quotes around the options. The quotes are unnecessary, and inconsistent with up-to-date DataTables documentation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 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=39715 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium 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=39715 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 183067 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183067&action=edit Bug 39715: Do not quote DataTables options This patch updates templates so that the options passed to DataTables (via kohaTable) are not quoted. The quotes are not necessary, and are not consistent with official DataTables documentation. This establishes a standard for us to follow in the future. The patch also corrects some option names which required upates, particularly "sorting" -> "order". To test, apply the patch and test updated DataTables. 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=39715 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 183068 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183068&action=edit Descriptions of updated pages -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183067|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 183473 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183473&action=edit Bug 39715: Do not quote DataTables options This patch updates templates so that the options passed to DataTables (via kohaTable) are not quoted. The quotes are not necessary, and are not consistent with official DataTables documentation. This establishes a standard for us to follow in the future. The patch also corrects some option names which required upates, particularly "sorting" -> "order". To test, apply the patch and test updated DataTables. 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=39715 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183473|0 |1 is obsolete| | --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 186267 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186267&action=edit Bug 39715: Do not quote DataTables options This patch updates templates so that the options passed to DataTables (via kohaTable) are not quoted. The quotes are not necessary, and are not consistent with official DataTables documentation. This establishes a standard for us to follow in the future. The patch also corrects some option names which required upates, particularly "sorting" -> "order". To test, apply the patch and test updated DataTables. 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=39715 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186267|0 |1 is obsolete| | --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 188502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188502&action=edit Bug 39715: Do not quote DataTables options This patch updates templates so that the options passed to DataTables (via kohaTable) are not quoted. The quotes are not necessary, and are not consistent with official DataTables documentation. This establishes a standard for us to follow in the future. The patch also corrects some option names which required upates, particularly "sorting" -> "order". To test, apply the patch and test updated DataTables. 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=39715 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 189993 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189993&action=edit Bug 39715: Do not quote DataTables options This patch updates templates so that the options passed to DataTables (via kohaTable) are not quoted. The quotes are not necessary, and are not consistent with official DataTables documentation. This establishes a standard for us to follow in the future. The patch also corrects some option names which required upates, particularly "sorting" -> "order". To test, apply the patch and test updated DataTables. Sponsored-by: Athens County Public Libraries Rebased-by: Jonathan Druart paginate => paging 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=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #188502|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=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41324 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41324 [Bug 41324] Tidy kohaTable block -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189993|0 |1 is obsolete| | --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 190886 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190886&action=edit Bug 39715: Do not quote DataTables options This patch updates templates so that the options passed to DataTables (via kohaTable) are not quoted. The quotes are not necessary, and are not consistent with official DataTables documentation. This establishes a standard for us to follow in the future. The patch also corrects some option names which required upates, particularly "sorting" -> "order". To test, apply the patch and test updated DataTables. Sponsored-by: Athens County Public Libraries Rebased-by: Jonathan Druart paginate => paging 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=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com Status|Signed Off |Failed QA --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt - "data": [ + data: [ This breaks the JSON response of the svc/virtualshelves/search script (Something went wrong when loading the table.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 --- Comment #9 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 191028 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191028&action=edit Bug 39715: (follow-up) Undo change to shelves_results.tt This must have been an overzealous find and replace. A similar template, itemsearch_json.tt, was not similarly affected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191028|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=39715 --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 191046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191046&action=edit Bug 39715: (follow-up) Undo change to shelves_results.tt This must have been an overzealous find and replace. A similar template, itemsearch_json.tt, was not similarly affected. 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=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41563 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41563 [Bug 41563] Tidy kohaTable block - acqui -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41564 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41564 [Bug 41564] Tidy kohaTable block - admin -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41565 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41565 [Bug 41565] Tidy kohaTable block - bookings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41566 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41566 [Bug 41566] Tidy kohaTable block - catalogue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41567 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41567 [Bug 41567] Tidy kohaTable block - cataloguing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41568 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41568 [Bug 41568] Tidy kohaTable block - circ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41569 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41569 [Bug 41569] Tidy kohaTable block - clubs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41573 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41573 [Bug 41573] Tidy kohaTable block - patron_lists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41575 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41575 [Bug 41575] Tidy kohaTable block - pos -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41579 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41579 [Bug 41579] Tidy kohaTable block - suggestions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41580 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41580 [Bug 41580] Tidy kohaTable block - tools -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41581 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41581 [Bug 41581] Tidy kohaTable block - virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41582 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41582 [Bug 41582] Tidy kohaTable block - opac -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=39715 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190886|0 |1 is obsolete| | --- Comment #11 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 191840 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191840&action=edit Bug 39715: Do not quote DataTables options This patch updates templates so that the options passed to DataTables (via kohaTable) are not quoted. The quotes are not necessary, and are not consistent with official DataTables documentation. This establishes a standard for us to follow in the future. The patch also corrects some option names which required upates, particularly "sorting" -> "order". To test, apply the patch and test updated DataTables. Sponsored-by: Athens County Public Libraries Rebased-by: Jonathan Druart paginate => paging Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191046|0 |1 is obsolete| | --- Comment #12 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 191841 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191841&action=edit Bug 39715: (follow-up) Undo change to shelves_results.tt This must have been an overzealous find and replace. A similar template, itemsearch_json.tt, was not similarly affected. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |lucas@bywatersolutions.com |y.org | CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch updates release notes| |templates so that the | |options passed to | |DataTables, via KohaTable, | |are not quoted. The quotes | |are not necessary, and are | |not consistent with | |official DataTables | |documentation. This | |establishes a standard for | |us to follow in the future. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 --- Comment #13 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 --- Comment #14 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39715 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |Laura.escamilla@bywatersolu | |tions.com --- Comment #15 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Not backporting to 25.05 as this is an enhancement. Happy to revisit if needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org