From 42904a9ced3e8d64f7e098f1e773bdb1509ff8ab Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 23 Oct 2024 16:49:27 +0200 Subject: [PATCH] Bug 38243: Remove DT's header_filter custom param It seems to be a leftover from bug 32401, the code does not make sense: 569 if(options.header_filter) { 570 options.query_parameters = query_parameters; 571 } else { 572 dataSet.q = query_parameters; 573 delete options.query_parameters; 574 } Then options.query_parameters is never used. Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- .../prog/en/modules/acqui/orderreceive.tt | 1 - koha-tmpl/intranet-tmpl/prog/js/datatables.js | 10 ++-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index 9daac07657f..3842519e91e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -1026,7 +1026,6 @@ "ajax": { "url": pending_orders_url + "?q=" + encodeURI(JSON.stringify(base_query)) }, - "header_filter": true, "embed": [ "invoice", "basket" diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index 0a2db6c1239..1b5ee091781 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -625,15 +625,9 @@ function _dt_default_ajax (params){ if(query_parameters.length) { query_parameters = JSON.stringify(query_parameters.length === 1?query_parameters[0]:{"-and": query_parameters}); - if(options.header_filter) { - options.query_parameters = query_parameters; - } else { - dataSet.q = query_parameters; - delete options.query_parameters; - } - } else { - delete options.query_parameters; + dataSet.q = query_parameters; } + delete options.query_parameters; dataSet._match = options.criteria; -- 2.47.0