From 6c7c93675e6a44bce79725bcd56928f23951dfe1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 5 Sep 2022 13:59:57 +0100 Subject: [PATCH] Bug 31435: (follow-up) Make kohaTable calls consistent MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Our calls to instantiate a kohaTable from JS were inconsistent in how they pass table_settings where no table_settings exist. This patch replaces empty arrays and empty hashrefs with a consistent 'null' being passed to ake it clear we don't have any settings to pass yet. Signed-off-by: Katrin Fischer Signed-off-by: Joonas Kylmälä Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index eb3ea035ae..93d61a7907 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -640,7 +640,7 @@ "searchable": false } ] - }, {}, 1, {"basket.vendor_id": [% booksellerid | html %]}); + }, null, 1, {"basket.vendor_id": [% booksellerid | html %]}); $(".previewData").on("click", function(e){ e.preventDefault(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt index ae78a07dad..68fbe0f01a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt @@ -383,7 +383,7 @@ $(row).addClass('debug'); } }, - }); + }, null, 0); $('#smtp_servers').on( "click", '.delete_server', function () { var smtp_server_id = $(this).data('smtp-server-id'); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt index f19fe43682..0b84adbec2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -460,7 +460,7 @@ "orderable": false } ] - }, [], 1); + }, null, 1); [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt index 01878722a3..b8ad34f6c5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt @@ -213,7 +213,7 @@ "orderable": false }, ] - }); + }, null, 0); $('#quotes').on( "click", '.delete_quote', function () { var quote_id = decodeURIComponent($(this).data('quote-id')); -- 2.39.5