This patch sets the bStateSave parameter for the "Pending orders" and
"Already received" Datatables in Acquisitions, which uses a cookie to
save the "pagination information, display length, filtering and sorting".
It also sets the iCookieDuration parameter to 1000 days (the default
value is 2 hours otherwise).
It also adds an "all" option to the dro-down menu using the aLengthMenu
parameter.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
$(document).ready(function(){
var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
$(document).ready(function(){
var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "bStateSave": true,
+ "iCookieDuration": 60*60*24*1000, // 1000 days
+ "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
"aoColumnDefs": [
{ "aTargets": [ 3, 8, 9 ], "bSortable": false, "bSearchable": false },
],
"aoColumnDefs": [
{ "aTargets": [ 3, 8, 9 ], "bSortable": false, "bSearchable": false },
],
"sPaginationType": "four_button"
} ) );
var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
"sPaginationType": "four_button"
} ) );
var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "bStateSave": true,
+ "iCookieDuration": 60*60*24*1000, // 1000 days
+ "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
"aoColumnDefs": [
{ "aTargets": [ 3, -1 ], "bSortable": false, "bSearchable": false },
],
"aoColumnDefs": [
{ "aTargets": [ 3, -1 ], "bSortable": false, "bSearchable": false },
],