Koha templates are inconsistent when it comes to quoting DataTables options: (https://gitlab.com/koha-community/Koha/-/blob/main/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt#L221) 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.
Created attachment 183067 [details] [review] 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
Created attachment 183068 [details] Descriptions of updated pages
Created attachment 183473 [details] [review] 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