Bug 22195 - Change default DataTables configuration to consolidate buttons
Summary: Change default DataTables configuration to consolidate buttons
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-23 16:39 UTC by Owen Leonard
Modified: 2019-02-11 13:49 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Screen capture showing the new button style (185.33 KB, image/gif)
2019-01-23 16:39 UTC, Owen Leonard
Details
Bug 22195: Change default DataTables configuration to consolidate buttons (2.55 KB, patch)
2019-01-23 16:57 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22195: Change default DataTables configuration to consolidate buttons (2.61 KB, patch)
2019-01-24 19:57 UTC, David Nind
Details | Diff | Splinter Review
Bug 22195: Change default DataTables configuration to consolidate buttons (2.68 KB, patch)
2019-01-25 22:12 UTC, José-Mario Monteiro-Santos
Details | Diff | Splinter Review
Bug 22195: Change default DataTables configuration to consolidate buttons (2.75 KB, patch)
2019-01-26 12:28 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22195: (follow-up) Add tooltip to buttons (1.88 KB, patch)
2019-01-26 19:23 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22195: (follow-up) Add text labels to buttons if window is wide enough (2.53 KB, patch)
2019-02-01 14:23 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2019-01-23 16:39:44 UTC
Created attachment 84336 [details]
Screen capture showing the new button style

DataTables gives us the option of more carefully controlling the arrangement and appearance of buttons like "Column visibility." I propose to change the default DataTables configuration so that tables with columns settings have two buttons: One to trigger a menu of columns show show/hide, and one to trigger a menu of export options. See attached screenshot.
Comment 1 Owen Leonard 2019-01-23 16:57:56 UTC Comment hidden (obsolete)
Comment 2 David Nind 2019-01-24 19:57:38 UTC Comment hidden (obsolete)
Comment 3 José-Mario Monteiro-Santos 2019-01-25 22:12:11 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2019-01-26 12:28:00 UTC
I like that it takes up less space, but I am a little worried about it being less self-explanatory. Could we get a tooltip showing when you leave the cursor on the icon?
Comment 5 Katrin Fischer 2019-01-26 12:28:41 UTC
Created attachment 84443 [details] [review]
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>
Comment 6 Owen Leonard 2019-01-26 19:23:56 UTC
Created attachment 84450 [details] [review]
Bug 22195: (follow-up) Add tooltip to buttons

This patch adds title attributes and Bootstrap tooltips to the columns
configuration and export/print butttons.

To test, apply the patch and visit a page with columns configuration
buttons. Confirm that when you hover over each of the DataTable control
buttons a tooltip is shown.
Comment 7 Owen Leonard 2019-02-01 14:23:35 UTC
Created attachment 84629 [details] [review]
Bug 22195: (follow-up) Add text labels to buttons if window is wide enough

This patch adds responsive handling of text labels to the columns
configuration and export buttons.

To test, apply the patch and clear your browser cache if necessary.

 - View a page with column configuration, e.g. Administration -> Patron
   categories.
 - At wider browser widths the buttons should have text labels.
 - At narrower browser widths the labels should be hidden.
Comment 8 Nick Clemens 2019-02-04 17:46:41 UTC
Awesome work all!

Pushed to master for 19.05
Comment 9 Martin Renvoize 2019-02-11 13:49:41 UTC
Cosmetic enhancement, will not be backported.