Bug 13476: Fix DataTables for the search items form
This items form is broken since the upgrade to DataTables 1.10.2 (commit954c2874d0). 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> (cherry picked from commit6114c5fd6f) Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This commit is contained in:
parent
4225278c87
commit
a98aa005a8
|
|
@ -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': [
|
||||
|
|
|
|||
Loading…
Reference in New Issue