Bugzilla – Attachment 112588 Details for
Bug 8179
Receiving multiple order lines at once
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8179: Set render functions in every column
Bug-8179-Set-render-functions-in-every-column.patch (text/plain), 5.54 KB, created by
Agustín Moyano
on 2020-10-27 18:03:30 UTC
(
hide
)
Description:
Bug 8179: Set render functions in every column
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2020-10-27 18:03:30 UTC
Size:
5.54 KB
patch
obsolete
>From a182d664f730e1346a262f1278fa7d7c987f408c Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Tue, 27 Oct 2020 14:58:41 -0300 >Subject: [PATCH] Bug 8179: Set render functions in every column > >Because when AcqReceiveMultipleOrderLines is set to allow, we add an >extra column at the beginning, general columnDefs of datatables config >pointed to the wrong column. So, instead of using general columnDef, >this patch sets the render function to each column. >--- > .../prog/en/modules/acqui/parcel.tt | 82 ++++++++++++------- > 1 file changed, 54 insertions(+), 28 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 6f4bf57fdb..1595d89ff3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -430,28 +430,6 @@ > "items" > ], > 'dom': 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', >- "columnDefs": [ { >- "targets": [3,4,5,9], >- "render": function (data, type, row, meta) { >- if ( data != null ) { >- return data.escapeHtml(); >- } >- else { >- return ""; >- } >- } >- }, >- { >- "targets": [8,10], >- "render": function (data, type, row, meta) { >- if ( data != null ) { >- return data.escapeHtml().format_price(); >- } >- else { >- return ""; >- } >- } >- } ], > "columns": [ > { "data": "basket.name", > "orderable": true, >@@ -493,19 +471,43 @@ > "data": "biblio.author", > "visible": false, > "searchable": true, >- "orderable": false >+ "orderable": false, >+ "render": function (data, type, row, meta) { >+ if ( data != null ) { >+ return data.escapeHtml(); >+ } >+ else { >+ return ""; >+ } >+ } > }, > { > "data": "biblio.title", > "visible": false, > "searchable": true, >- "orderable": false >+ "orderable": false, >+ "render": function (data, type, row, meta) { >+ if ( data != null ) { >+ return data.escapeHtml(); >+ } >+ else { >+ return ""; >+ } >+ } > }, > { > "data": "biblio.isbn", > "visible": false, > "searchable": true, >- "orderable": false >+ "orderable": false, >+ "render": function (data, type, row, meta) { >+ if ( data != null ) { >+ return data.escapeHtml(); >+ } >+ else { >+ return ""; >+ } >+ } > }, > { > "data": function(row, type, val, meta) { >@@ -590,14 +592,38 @@ > "orderable": false > }, > { >- "data": "replacement_price" >+ "data": "replacement_price", >+ "render": function (data, type, row, meta) { >+ if ( data != null ) { >+ return data.escapeHtml().format_price(); >+ } >+ else { >+ return ""; >+ } >+ } > }, > { > "data": "quantity", >- "orderable": true >+ "orderable": true, >+ "render": function (data, type, row, meta) { >+ if ( data != null ) { >+ return data.escapeHtml(); >+ } >+ else { >+ return ""; >+ } >+ } > }, > { >- "data": "ecost" >+ "data": "ecost", >+ "render": function (data, type, row, meta) { >+ if ( data != null ) { >+ return data.escapeHtml().format_price(); >+ } >+ else { >+ return ""; >+ } >+ } > }, > { > "data": function ( row, type, val, meta ) { >-- >2.25.0
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 8179
:
9881
|
111437
|
111438
|
111439
|
111440
|
112554
|
112555
|
112556
|
112558
|
112588
|
112643
|
112644
|
112645
|
112646
|
112744
|
112745
|
112746
|
112747
|
114688
|
114689
|
114690
|
114691
|
116582
|
116583
|
116584
|
116585
|
116588
|
116589
|
116590
|
116591
|
116681
|
116682
|
116683
|
116684
|
116942
|
116943
|
116944
|
116945
|
119178
|
119179
|
119180
|
119181
|
120620
|
120621
|
120622
|
120623
|
148215
|
148216
|
148217
|
148218
|
148233
|
148284
|
148285
|
148286
|
148287
|
148288
|
148521
|
148522
|
148523
|
148524
|
148525
|
148526
|
148685
|
148981
|
148982
|
148983
|
148984
|
148985
|
148986
|
151026
|
151086
|
151087
|
151088
|
151089
|
151092
|
151093
|
151137
|
151138
|
151139
|
151140
|
151141
|
151142
|
151143
|
151144
|
151145
|
151163
|
151250
|
151367
|
151431