Bugzilla – Attachment 178528 Details for
Bug 26553
Remove KohaTable (columns_settings.inc) and use kohaTable (datatables.js)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26553: Bring default columnDefs back
Bug-26553-Bring-default-columnDefs-back.patch (text/plain), 2.64 KB, created by
Martin Renvoize (ashimema)
on 2025-02-21 16:31:00 UTC
(
hide
)
Description:
Bug 26553: Bring default columnDefs back
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-02-21 16:31:00 UTC
Size:
2.64 KB
patch
obsolete
>From 169fc5e853c77d52508f2b4e90f16784c64e1685 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 28 Jan 2025 10:33:19 +0100 >Subject: [PATCH] Bug 26553: Bring default columnDefs back > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 12 ++++++++++++ > koha-tmpl/opac-tmpl/bootstrap/js/datatables.js | 12 +++++++++--- > 2 files changed, 21 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index f094bae8d3d..f399ce4ae9d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -1380,6 +1380,18 @@ function update_search_description( > } > } > >+ var default_column_defs = [ >+ { targets: ["string-sort"], type: "string" }, >+ { targets: ["anti-the"], type: "anti-the" }, >+ { targets: ["NoSort"], orderable: false, searchable: false }, >+ ]; >+ if (settings["columnDefs"] === undefined) { >+ settings["columnDefs"] = default_column_defs; >+ } else { >+ settings["columnDefs"] = >+ settings["columnDefs"].concat(default_column_defs); >+ } >+ > $(this).data("bKohaColumnsUseNames", settings.bKohaColumnsUseNames); > $(this).data("bKohaAjaxSVC", settings.bKohaAjaxSVC); // Must not be used for new tables! > var table = $(this).dataTable(settings); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >index 5abae7494d6..53dc44f25fc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >@@ -347,10 +347,16 @@ function _dt_visibility(table_settings, table_dt) { > } > > var default_column_defs = [ >- { aTargets: ["string-sort"], sType: "string" }, >- { aTargets: ["anti-the"], sType: "anti-the" }, >- { aTargets: ["NoSort"], bSortable: false, bSearchable: false }, >+ { targets: ["string-sort"], type: "string" }, >+ { targets: ["anti-the"], type: "anti-the" }, >+ { targets: ["NoSort"], orderable: false, searchable: false }, > ]; >+ if (settings["columnDefs"] === undefined) { >+ settings["columnDefs"] = default_column_defs; >+ } else { >+ settings["columnDefs"] = >+ settings["columnDefs"].concat(default_column_defs); >+ } > > $(this).data("bKohaColumnsUseNames", settings.bKohaColumnsUseNames); > var table = $(this).dataTable(settings); >-- >2.48.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 26553
:
175186
|
175187
|
175188
|
175189
|
175190
|
175191
|
175874
|
175875
|
175876
|
175877
|
175878
|
175879
|
176359
|
176360
|
176361
|
176362
|
176363
|
176364
|
176588
|
176589
|
176590
|
176591
|
177087
|
177088
|
177089
|
177090
|
177091
|
177092
|
177152
|
177153
|
177154
|
177155
|
177156
|
177157
|
177158
|
177234
|
177235
|
177236
|
177237
|
177238
|
177239
|
177240
|
177241
|
177242
|
177243
|
177246
|
177247
|
177264
|
177265
|
177271
|
177888
|
177889
|
177890
|
177891
|
177892
|
177893
|
177894
|
177895
|
177896
|
177897
|
177898
|
177899
|
177900
|
178508
|
178509
|
178510
|
178511
|
178512
|
178513
|
178514
|
178515
|
178516
|
178517
|
178518
|
178519
|
178520
|
178521
|
178522
|
178523
|
178524
|
178525
|
178526
|
178527
| 178528 |
178529
|
178530
|
178531
|
178532
|
178533