Bugzilla – Attachment 177879 Details for
Bug 38255
Do not use dataTable constructor directly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38255: Exceptions
Bug-38255-Exceptions.patch (text/plain), 3.88 KB, created by
Jonathan Druart
on 2025-02-12 13:44:49 UTC
(
hide
)
Description:
Bug 38255: Exceptions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-02-12 13:44:49 UTC
Size:
3.88 KB
patch
obsolete
>From 830470a48231a0bfc0256419ee1636315efd31dd Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 4 Dec 2024 11:59:55 +0100 >Subject: [PATCH] Bug 38255: Exceptions > >Those tables are using a svc script, not the REST API. It is not compatible >with kohaTable's default 'ajax' options. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 1 + > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 3 +++ > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 3 ++- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 1 + > 4 files changed, 7 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 0001ca5d2ab..ad49f10be24 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -678,6 +678,7 @@ > }); > } > }, >+ bKohaAjaxSVC: true, > 'columns':[ > { "data": 'dt_public' }, > { "data": 'dt_shelfname' }, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 88af9c08d8e..c317d3cf5b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -653,6 +653,7 @@ function LoadIssuesTable() { > borrowernumber > ), > }, >+ bKohaAjaxSVC: true, > rowGroup: { > dataSrc: "issued_today", > startRender: function (rows, group) { >@@ -1325,6 +1326,7 @@ $(document).ready(function () { > .join("&") > ), > }, >+ bKohaAjaxSVC: true, > }, > table_settings_relatives_issues_table > ); >@@ -1581,6 +1583,7 @@ $(document).ready(function () { > } > }, > }, >+ bKohaAjaxSVC: true, > search: { search: "is_unresolved" }, > footerCallback: function (row, data, start, end, display) { > var api = this.api(); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 95c460aa2e5..6b8370b1fe7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -1252,7 +1252,7 @@ function _dt_save_restore_state(table_settings, external_filter_nodes = {}) { > }; > } > >- if (options.ajax) { >+ if (options.ajax && !options.bKohaAjaxSVC) { > options.ajax = Object.assign( > {}, > options.ajax, >@@ -1311,6 +1311,7 @@ function _dt_save_restore_state(table_settings, external_filter_nodes = {}) { > } > > $(this).data("bKohaColumnsUseNames", settings.bKohaColumnsUseNames); >+ $(this).data("bKohaAjaxSVC", settings.bKohaAjaxSVC); // Must not be used for new tables! > var table = $(this).dataTable(settings); > > var table_dt = table.DataTable(); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index 06b373be1fd..fda88ec7dd4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -484,6 +484,7 @@ $(document).ready(function () { > d.borrowernumber = borrowernumber; > }, > }, >+ bKohaAjaxSVC: true, > }, > table_settings_holds_table > ); >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38255
:
175181
|
175182
|
175183
|
175184
|
175185
|
175352
|
175598
|
175599
|
175872
|
175873
|
176062
|
176063
|
176064
|
176065
|
176066
|
176067
|
176068
|
176069
|
176070
|
176071
|
176146
|
176348
|
176349
|
176350
|
176351
|
176352
|
176353
|
176354
|
176355
|
176356
|
176357
|
176358
|
176550
|
176551
|
176552
|
176553
|
176554
|
176555
|
176556
|
176557
|
176558
|
176559
|
176560
|
177076
|
177077
|
177078
|
177079
|
177080
|
177081
|
177082
|
177083
|
177084
|
177085
|
177086
|
177214
|
177215
|
177216
|
177217
|
177218
|
177219
|
177220
|
177221
|
177222
|
177223
|
177224
|
177262
|
177875
|
177876
|
177877
|
177878
| 177879 |
177880
|
177881
|
177882
|
177883
|
177884
|
177885
|
177886