From 130e06266cf924808f3dd334ecb4ddd5eae08830 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 Signed-off-by: Katrin Fischer --- .../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 9daac07657..3842519e91 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 257eb8b1c7..6532379b25 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -626,15 +626,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.39.5