Bugzilla – Attachment 177223 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: (follow-up) Replace dataTable constructor with kohaTable - Staff
Bug-38255-follow-up-Replace-dataTable-constructor-.patch (text/plain), 5.12 KB, created by
Jonathan Druart
on 2025-01-28 08:36:22 UTC
(
hide
)
Description:
Bug 38255: (follow-up) Replace dataTable constructor with kohaTable - Staff
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-01-28 08:36:22 UTC
Size:
5.12 KB
patch
obsolete
>From 0760cb0fe8f2f3a1cd1b2412c747855a55e46fd6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sat, 21 Dec 2024 13:19:40 +0100 >Subject: [PATCH] Bug 38255: (follow-up) Replace dataTable constructor with > kohaTable - Staff > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../ERM/EHoldingsLocalTitlePackagesList.vue | 89 +++++++++---------- > 1 file changed, 44 insertions(+), 45 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlePackagesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlePackagesList.vue >index c96fe78e3fa..b4e8258d726 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlePackagesList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlePackagesList.vue >@@ -34,54 +34,53 @@ export default { > let table_id = this.table_id > > $("#" + table_id).kohaTable({ >- data: resources, >- embed: ["package.name"], >- order: [[0, "asc"]], >- autoWidth: false, >- columns: [ >- { >- title: __("Name"), >- data: "package.name", >- searchable: true, >- orderable: true, >- render: function (data, type, row, meta) { >- // Rendering done in drawCallback >- return "" >- }, >- width: "100%", >+ data: resources, >+ embed: ["package.name"], >+ order: [[0, "asc"]], >+ autoWidth: false, >+ columns: [ >+ { >+ title: __("Name"), >+ data: "package.name", >+ searchable: true, >+ orderable: true, >+ render: function (data, type, row, meta) { >+ // Rendering done in drawCallback >+ return "" > }, >- ], >- drawCallback: function (settings) { >- var api = new $.fn.dataTable.Api(settings) >+ width: "100%", >+ }, >+ ], >+ drawCallback: function (settings) { >+ var api = new $.fn.dataTable.Api(settings) > >- $.each( >- $(this).find("tbody tr td:first-child"), >- function (index, e) { >- let tr = $(this).parent() >- let row = api.row(tr).data() >- if (!row) return // Happen if the table is empty >- let { href } = router.resolve({ >- name: "EHoldingsLocalResourcesShow", >- params: { resource_id: row.resource_id }, >- }) >- let n = createVNode( >- "a", >- { >- role: "button", >- href, >- onClick: e => { >- e.preventDefault() >- show_resource(row.resource_id) >- }, >+ $.each( >+ $(this).find("tbody tr td:first-child"), >+ function (index, e) { >+ let tr = $(this).parent() >+ let row = api.row(tr).data() >+ if (!row) return // Happen if the table is empty >+ let { href } = router.resolve({ >+ name: "EHoldingsLocalResourcesShow", >+ params: { resource_id: row.resource_id }, >+ }) >+ let n = createVNode( >+ "a", >+ { >+ role: "button", >+ href, >+ onClick: e => { >+ e.preventDefault() >+ show_resource(row.resource_id) > }, >- `${row.package.name}` >- ) >- render(n, e) >- } >- ) >- }, >- }) >- ) >+ }, >+ `${row.package.name}` >+ ) >+ render(n, e) >+ } >+ ) >+ }, >+ }) > }, > }, > mounted() { >-- >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