X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=koha-tmpl%2Fintranet-tmpl%2Fprog%2Fen%2Fmodules%2Facqui%2Fparcel.tt;h=877d263d73b7bff42e6688cb0b72f9031a913b0a;hb=04b4afbd92ab952671e5ea6124e9e95da4a05874;hp=1b6543a69f33ee698449238486ff8f739a1722ae;hpb=3d55391eee5b22ee46764b3b1d73b6ef0ad46621;p=koha_fer 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 1b6543a69f..877d263d73 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -13,11 +13,13 @@ dt_overwrite_html_sorting_localeCompare(); - var rowsToCollapse = 5; $(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, 7, 8 ], "bSortable": false, "bSearchable": false }, + { "aTargets": [ 3, 8, 9 ], "bSortable": false, "bSearchable": false }, ], "aoColumns": [ { "sType": "num-html" }, @@ -29,12 +31,16 @@ null, null, null, + null, ], "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 ], "bSortable": false, "bSearchable": false }, + { "aTargets": [ 3, -1 ], "bSortable": false, "bSearchable": false }, ], "aoColumns": [ { "sType": "num-html" }, @@ -45,14 +51,16 @@ null, null, null, + null ], "sPaginationType": "four_button" } ) ); +/* + $("#pendingt").tablesorter({ + headers: { 2: { sorter: 'articles' },3: { sorter: false },8:{sorter:false}} + }); +*/ - rowCountPending = $("#pendingt tbody.filterclass tr").length; - rowCountReceived = $("#receivedt tbody.filterclass tr").length; - if (rowCountPending > rowsToCollapse) { pendingCollapse(); } - if (rowCountReceived > rowsToCollapse) { receivedCollapse(); } }); // Case-insensitive version of jquery's contains function @@ -65,38 +73,6 @@ containsExactly: "$(a).text() == m[3]" }); - - // Collapse pending items table - function pendingCollapse() { - $("#pendingcollapserow").remove(); - $("#pendingt tr").show(); - $("#pendingt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide(); - $("#pendingt").before("

" + _("Only the first ") + rowsToCollapse + _(" items are displayed.") + "" + _("Click here to show all ") + rowCountPending + _(" items") + "<\/a>.<\/p>"); - - } - - // Expend pending items table - function pendingExpand() { - $("#pendingcollapserow").remove(); - $("#pendingt tr").show(); - $("#pendingt tbody.filterclass tr.orderfound").remove(); - $("#pendingt").before("

" + rowCountPending + _(" items are displayed.") + "" + _("Click here to show only the first ") + rowsToCollapse + _(" items") + "<\/a>.<\/p>"); - } - - // Collapse already received items table - function receivedCollapse() { - $("#receivedcollapserow").remove(); - $("#receivedt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide(); - $("#receivedt").before("

" + _("Only the first ") + rowsToCollapse + _(" items are displayed.") + "" + _("Click here to show all ") + rowCountReceived + _(" items") + "<\/a>.<\/p>"); - } - - // Expand already received items table - function receivedExpand() { - $("#receivedcollapserow").remove(); - $("#receivedt tr").show(); - $("#receivedt").before("

" + _("All ") + rowCountReceived + _(" items are displayed.") + "" + _("Click here to show only the first ") + rowsToCollapse + _(" items") + "<\/a>.<\/p>"); - } - //]]>