Bugzilla – Attachment 84442 Details for
Bug 22195
Change default DataTables configuration to consolidate buttons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22195: Change default DataTables configuration to consolidate buttons
Bug-22195-Change-default-DataTables-configuration-.patch (text/plain), 2.68 KB, created by
José-Mario Monteiro-Santos
on 2019-01-25 22:12:11 UTC
(
hide
)
Description:
Bug 22195: Change default DataTables configuration to consolidate buttons
Filename:
MIME Type:
Creator:
José-Mario Monteiro-Santos
Created:
2019-01-25 22:12:11 UTC
Size:
2.68 KB
patch
obsolete
>From ec25c5e02a7c2bc4649abda21eab9ed1f6090803 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 23 Jan 2019 16:40:44 +0000 >Subject: [PATCH] Bug 22195: Change default DataTables configuration to > consolidate buttons > >This patch changes the default DataTables configuration provided by the >columns settings include file. It consolidates DataTables buttons into >to menus: One for column configuration and one for export options. > >This change would not affect tables which aren't set up for column >configuration. > >To test, apply the patch and view a page with columns configuration. > > Example: Tools -> Notices & slips > - Confirm that the buttons appear as expected. > - Confirm that each button menu performs its task correctly (column > visiblity, export, print). > - Test other pages with columns configuration. For instance: > Acquisitions order search, Currencies administration, Holds queue > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com> >--- > .../prog/en/includes/columns_settings.inc | 29 +++++++++++++++------- > 1 file changed, 20 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >index 7aa51cd..f88f516 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >@@ -27,15 +27,7 @@ function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { > exportColumns = dt_parameters["exportColumns"]; > } > >- dt_parameters[ "buttons" ] = [ >- { >- extend: 'colvis', >- columns: included_ids, >- text: _("Column visibility"), >- exportOptions: { >- columns: exportColumns >- }, >- }, >+ var export_buttons = [ > { > extend: 'excelHtml5', > text: _("Excel"), >@@ -63,7 +55,26 @@ function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { > exportOptions: { > columns: exportColumns > }, >+ } >+ ]; >+ >+ dt_parameters[ "buttons" ] = [ >+ { >+ extend: 'colvis', >+ fade: 100, >+ columns: included_ids, >+ text: '<i class="fa fa-lg fa-gear"></i>', >+ exportOptions: { >+ columns: exportColumns >+ }, > }, >+ { >+ extend: 'collection', >+ fade: 100, >+ text: '<i class="fa fa-lg fa-download"></i>', >+ buttons: export_buttons >+ } >+ > ]; > > var table = $(selector); >-- >2.7.4
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 22195
:
84336
|
84337
|
84391
|
84442
|
84443
|
84450
|
84629