Bugzilla – Attachment 167863 Details for
Bug 36925
ERM eUsage reports : data table filter does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36925: Reinstate export button
Bug-36925-Reinstate-export-button.patch (text/plain), 3.85 KB, created by
David Nind
on 2024-06-18 18:42:22 UTC
(
hide
)
Description:
Bug 36925: Reinstate export button
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-06-18 18:42:22 UTC
Size:
3.85 KB
patch
obsolete
>From b04efa8a288224b3b8afa750fb4bbdf765fe61ad Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Tue, 18 Jun 2024 14:18:23 +0000 >Subject: [PATCH] Bug 36925: Reinstate export button > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 27 ++++++++++--------- > .../ERM/UsageStatisticsReportsViewer.vue | 4 +-- > .../prog/js/vue/components/KohaTable.vue | 1 + > 3 files changed, 18 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 39040059ac..48fe6f971b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -665,6 +665,7 @@ function _dt_buttons(params){ > let included_ids = params.included_ids || []; > let settings = params.settings || {}; > let table_settings = params.table_settings; >+ let hasFilters = params.hasFilters; > > var exportColumns = ":visible:not(.noExport)"; > if( settings.hasOwnProperty("exportColumns") ){ >@@ -721,19 +722,21 @@ 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"); >+ if(hasFilters){ >+ 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"); >+ } > } >- } >- ); >+ ); >+ } > > if( included_ids.length > 0 ){ > buttons.push( >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportsViewer.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportsViewer.vue >index d8123120d6..fac12757bb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportsViewer.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportsViewer.vue >@@ -96,13 +96,13 @@ export default { > ), > options: { > embed: this.embed, >- dom: '<"top pager"<"table_entries"ilp>>tr<"bottom pager"ip>', >+ dom: '<"top pager"<"table_entries"ilpB>>tr<"bottom pager"ip>', > }, > url: () => this.tableURL(this.year, this.params), > table_settings: this.report_type.includes("monthly") > ? this.monthly_usage_table_settings > : this.yearly_usage_table_settings, >- add_filters: true, >+ add_filters: false, > }, > yearly_filter: null, > params: this.params, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue >index b988a2c7df..23f442bb37 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue >@@ -29,6 +29,7 @@ export default { > let buttons = _dt_buttons({ > included_ids, > table_settings: this.table_settings, >+ hasFilters: this.add_filters, > }) > return { > data: [], >-- >2.39.2
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 36925
:
167544
|
167545
|
167592
|
167856
|
167857
|
167858
|
167862
| 167863