Bug 13476: Fix DataTables for the search items form

This items form is broken since the upgrade to DataTables 1.10.2 (commit
954c2874d0).
The fnServerParams does not work anymore.

Test plan:
Go on catalogue/itemsearch.pl, launch a search and verify the data are
correctly displayed in the table.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The paging seems still a bit buggy, but this makes the
feature usable again!

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Jonathan Druart 2014-12-19 10:28:47 +01:00 committed by Tomas Cohen Arazi
parent 22b8d559f9
commit 6114c5fd6f

View file

@ -215,11 +215,20 @@
'bServerSide': true,
'bProcessing': true,
'sAjaxSource': '/cgi-bin/koha/catalogue/itemsearch.pl',
'fnServerParams': function(aoData) {
'fnServerData': function(sSource, aoData, fnCallback) {
aoData.push( { 'name': 'format', 'value': 'json' } );
for (i in params) {
aoData.push(params[i]);
}
$.ajax({
'dataType': 'json',
'type': 'POST',
'url': sSource,
'data': aoData,
'success': function(json){
fnCallback(json);
}
});
},
'sDom': '<"top pager"ilp>t<"bottom pager"ip>r',
'aoColumns': [