Bugzilla – Attachment 178533 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: Split Export and restore "clear filters" - OPAC
Bug-26553-Split-Export-and-restore-clear-filters--.patch (text/plain), 4.27 KB, created by
Martin Renvoize (ashimema)
on 2025-02-21 16:31:33 UTC
(
hide
)
Description:
Bug 26553: Split Export and restore "clear filters" - OPAC
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-02-21 16:31:33 UTC
Size:
4.27 KB
patch
obsolete
>From 22b18cc2bc4f13a97125000a13980fa6e2dcae95 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 28 Jan 2025 14:14:20 +0100 >Subject: [PATCH] Bug 26553: Split Export and restore "clear filters" - OPAC > >"Clear filters" is not in main but should be (I don't really understand >why it is not displayed). > >The Export options were not grouped within an "Export" button in main, >this patch restores that. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../opac-tmpl/bootstrap/js/datatables.js | 89 ++++++++----------- > 1 file changed, 39 insertions(+), 50 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >index e4847cb3770..631c9833bd1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >@@ -40,29 +40,6 @@ var dataTablesDefaults = { > dom: "t", > buttons: ["clearFilter", "copy", "csv", "print"], > paging: false, >- buttons: [ >- { >- fade: 100, >- className: "dt_button_clear_filter", >- titleAttr: __("Clear filter"), >- enabled: false, >- text: >- '<i class="fa fa-lg fa-times"></i> <span class="dt-button-text">' + >- __("Clear filter") + >- "</span>", >- available: function (dt) { >- // The "clear filter" button is made available if this test returns true >- if (dt.settings()[0].aanFeatures.f) { >- // aanFeatures.f is null if there is no search form >- return true; >- } >- }, >- action: function (e, dt, node) { >- dt.search("").draw("page"); >- node.addClass("disabled"); >- }, >- }, >- ], > initComplete: function (settings) { > var tableId = settings.nTable.id; > state = settings.oLoadedState; >@@ -183,21 +160,46 @@ function _dt_buttons(params) { > }, > ]; > >- let buttons = []; >- buttons.push({ >- fade: 100, >- className: "dt_button_clear_filter", >- titleAttr: __("Clear filter"), >- enabled: false, >- text: >- '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + >- __("Clear filter") + >- "</span>", >- action: function (e, dt, node, config) { >- dt.search("").draw("page"); >- node.addClass("disabled"); >+ let buttons = [ >+ { >+ fade: 100, >+ className: "dt_button_clear_filter", >+ titleAttr: _("Clear filter"), >+ enabled: false, >+ text: >+ '<i class="fa fa-lg fa-times" aria-hidden="true"></i> <span class="dt-button-text">' + >+ _("Clear filter") + >+ "</span>", >+ action: function (e, dt, node, config) { >+ dt.search("").draw("page"); >+ node.addClass("disabled"); >+ }, > }, >- }); >+ { >+ extend: "csvHtml5", >+ text: _("CSV"), >+ exportOptions: { >+ columns: exportColumns, >+ format: export_format, >+ }, >+ }, >+ { >+ extend: "copyHtml5", >+ text: _("Copy"), >+ exportOptions: { >+ columns: exportColumns, >+ format: export_format, >+ }, >+ }, >+ { >+ extend: "print", >+ text: _("Print"), >+ exportOptions: { >+ columns: exportColumns, >+ format: export_format, >+ }, >+ }, >+ ]; > > // Retrieving bKohaColumnsUseNames from the options passed to the constructor, not DT's settings > // But ideally should be retrieved using table.data() >@@ -234,19 +236,6 @@ function _dt_buttons(params) { > }); > } > >- buttons.push({ >- extend: "collection", >- autoClose: true, >- fade: 100, >- className: "export_controls", >- titleAttr: __("Export or print"), >- text: >- '<i class="fa fa-lg fa-download"></i> <span class="dt-button-text">' + >- __("Export") + >- "</span>", >- buttons: export_buttons, >- }); >- > return buttons; > } > >-- >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