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>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
dd7daf493b
commit
ba1f33e6ae
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue