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 <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2021-11-03 16:30:50 +00:00 committed by Jonathan Druart
parent db4cec8498
commit 030db7cc8d
6 changed files with 6 additions and 6 deletions

View File

@ -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'
},

View File

@ -345,7 +345,7 @@ Libraries &rsaquo; Administration &rsaquo; Koha
$(document).ready(function() {
var libraries_url = '/api/v1/libraries';
var libraries = $("#libraries").api({
var libraries = $("#libraries").kohaTable({
"ajax": {
"url": libraries_url
},

View File

@ -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
},

View File

@ -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
},

View File

@ -425,7 +425,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
},

View File

@ -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
},