From 12ede30edb9c88b6009b2d19b8472dd1a1177231 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 31 Aug 2020 12:33:19 +0000 Subject: [PATCH] Bug 26262: (follow-up) Fix course details page, default configuration Bug 25287 changed the default DataTable configuration in the OPAC so that tables are paginated by default. This is inconsistent with the way we currently use DataTables in the OPAC, and the change was probably unintentional. This patch returns the default pagination configuration to what it was before: Off. The patch also updates opac-course-details.tt with the same DOM configuration as opac-course-reserves.tt. To test, apply the patch and view the list of course reserves and the list of titles attached to a course. In both cases there should be no pagination controls, and the tables should show all results. --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/js/datatables.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt index 9813cfbea1..6657aa2b82 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt @@ -113,7 +113,7 @@ $(document).ready(function() { columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course-items-table', 'json' ) | $raw %]; KohaTable("#course-items-table", { - "dom": '<"top"flp>rt<"clear">', + "dom": '<"top"f>rt<"clear">', "sorting": [[ 1, "asc" ]], "autoWidth": false, }, columns_settings ); diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js index bc51357529..f3047ff2d0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js @@ -31,6 +31,7 @@ var dataTablesDefaults = { } }, "dom": 't', + "paginate": false, "buttons": [{ fade: 100, className: "dt_button_clear_filter", @@ -45,11 +46,9 @@ var dataTablesDefaults = { }, action: function ( e, dt, node ) { dt.search( "" ).draw("page"); - node.addClass("disabled"); + node.addClass("disabled"); } }], - "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, window.MSG_DT_ALL || "All" ]], - "iDisplayLength": 20, initComplete: function( settings) { var tableId = settings.nTable.id // When the DataTables search function is triggered, -- 2.11.0