Lines 553-562
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
Link Here
|
553 |
if(options.embed) { |
553 |
if(options.embed) { |
554 |
xhr.setRequestHeader('x-koha-embed', Array.isArray(options.embed)?options.embed.join(','):options.embed); |
554 |
xhr.setRequestHeader('x-koha-embed', Array.isArray(options.embed)?options.embed.join(','):options.embed); |
555 |
} |
555 |
} |
556 |
if(options.header_filter && options.query_parameters) { |
|
|
557 |
xhr.setRequestHeader('x-koha-query', options.query_parameters); |
558 |
delete options.query_parameters; |
559 |
} |
560 |
}, |
556 |
}, |
561 |
'dataFilter': function(data, type) { |
557 |
'dataFilter': function(data, type) { |
562 |
var json = {data: JSON.parse(data)}; |
558 |
var json = {data: JSON.parse(data)}; |
Lines 666-677
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
Link Here
|
666 |
|
662 |
|
667 |
if(query_parameters.length) { |
663 |
if(query_parameters.length) { |
668 |
query_parameters = JSON.stringify(query_parameters.length === 1?query_parameters[0]:{"-and": query_parameters}); |
664 |
query_parameters = JSON.stringify(query_parameters.length === 1?query_parameters[0]:{"-and": query_parameters}); |
669 |
if(options.header_filter) { |
665 |
dataSet.q = query_parameters; |
670 |
options.query_parameters = query_parameters; |
666 |
delete options.query_parameters; |
671 |
} else { |
|
|
672 |
dataSet.q = query_parameters; |
673 |
delete options.query_parameters; |
674 |
} |
675 |
} else { |
667 |
} else { |
676 |
delete options.query_parameters; |
668 |
delete options.query_parameters; |
677 |
} |
669 |
} |