From e6f59515ecc1d104585ab28650e80c5d18530cde Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 3 Nov 2021 16:30:50 +0000 Subject: [PATCH] Bug 29408: Update all existing uses of .api to .kohaTable This patch goes through the codebase and updates existing revelant calls to .api referencing the Koha REST dataTables wrapper to use the name name 'kohaTable'. Test plan. 1) Ensure the tables on the following pages all continue to work as expected a) acqui/parcel b) admin/branches c) admin/cities d) admin/smtp_servers e) pos/register f) tools/quotes Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.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 +- 6 files changed, 6 insertions(+), 6 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 b92a4291cc..09b7238793 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -377,7 +377,7 @@ })); } - var pending_orders_table = $("#pending_orders").api({ + var pending_orders_table = $("#pending_orders").kohaTable({ "ajax": { "url": '/api/v1/acquisitions/orders?only_active=1' }, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index 3808639209..8521752c7d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -332,7 +332,7 @@ Libraries › Administration › Koha $(document).ready(function() { var libraries_url = '/api/v1/libraries'; - var libraries = $("#libraries").api({ + var libraries = $("#libraries").kohaTable({ "ajax": { "url": libraries_url }, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt index cd0da5df0a..2138aac124 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt @@ -227,7 +227,7 @@ cities_table_url += 'q='+ encodeURIComponent(JSON.stringify(city_name_filter)); [% END %] - var cities_table = $("#table_cities").api({ + var cities_table = $("#table_cities").kohaTable({ "ajax": { "url": cities_table_url }, 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 b1e5ab5ba7..cb0eef2ca7 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 @@ -298,7 +298,7 @@ $(document).ready(function() { var smtp_servers_url = '/api/v1/config/smtp_servers'; - window.smtp_servers = $("#smtp_servers").api({ + window.smtp_servers = $("#smtp_servers").kohaTable({ "ajax": { "url": smtp_servers_url }, 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 e9f79e17a9..eb507b3435 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -419,7 +419,7 @@ var cashups_table_url = "/api/v1/cash_registers/[% register.id | html %]/cashups?"; - var cashups_table = $("#table_cashups").api({ + var cashups_table = $("#table_cashups").kohaTable({ "ajax": { "url": cashups_table_url }, 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 a521067135..f5907c032b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt @@ -156,7 +156,7 @@ $(document).ready(function() { var quotes_url = '/api/v1/quotes'; - var quotes = $("#quotes").api({ + var quotes = $("#quotes").kohaTable({ "ajax": { "url": quotes_url }, -- 2.39.5