From 32a62d7a50d041f3229fe9be40d9b1d5760310cd Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 27 Nov 2013 12:40:11 -0500 Subject: [PATCH] Bug 11314: restore ability to see only 5 entries on parcel.pl Bug 9130 removed the ability to limit the tables on parcel.pl to 5 rows, as well as the "sticky" feature. It is trivial to restore this functionality. These datatables are already using bStateSave, so are they are "sticky" already. The only part left is to enable the ability to limit the table to 5 rows at a time. Test Plan: 1) Apply this patch 2) Browse to parcel.pl 3) Note the default rows count is still 10 4) Note the option to limit the row count to 5 Signed-off-by: David Cook Works as described. Double-checked that the "sticky" feature is still in place thanks to bStateSave. I didn't notice a difference due to iDisplayLength being added, but the extra option of "5" to the list is there. Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton (cherry picked from commit 2bb4f4b42b3e3dfc7bc4233d16888d953625025b) Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 9d5fae98a9..cc974f816f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -17,7 +17,8 @@ var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, { "bStateSave": true, "iCookieDuration": 60*60*24*1000, // 1000 days - "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], + "iDisplayLength": 10, + "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, "All"]], "aoColumnDefs": [ { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false }, ], @@ -59,7 +60,8 @@ var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, { "bStateSave": true, "iCookieDuration": 60*60*24*1000, // 1000 days - "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], + "iDisplayLength": 10, + "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, "All"]], "aoColumnDefs": [ { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false }, ], -- 2.39.5