Bug 21506

Summary: DataTables four button pagination uses the wrong icon for First and Last buttons
Product: Koha Reporter: Andreas Roussos <arouss1980>
Component: TemplatesAssignee: Andreas Roussos <arouss1980>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P3 CC: fridolin.somers, martin.renvoize, nick, severine.queune
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8549
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 21550    
Attachments: wrong icon for First and Last buttons
Bug 21506: DataTables four button pagination uses the wrong icon for First and Last buttons
Bug 21506: DataTables four button pagination uses the wrong icon for First and Last buttons
Bug 21506: DataTables four button pagination uses the wrong icon for First and Last buttons

Description Andreas Roussos 2018-10-06 07:12:53 UTC
Created attachment 80154 [details]
wrong icon for First and Last buttons

As per the attached screenshot, when four button pagination is used
the DataTables buttons for 'First' and 'Last' use the wrong icon.
The buttons themselves work fine, it's just that two of the icons
are repeated: the same icon is used for 'First'/'Previous' and the
same icon is used for 'Next'/'Last'. The icons for 'First' and
'Last' should include a vertical bar, like this: |<< >>|.

In addition to the pages shown in the screenshot, other templates
appear to be affected as well (`git grep four_button` for a list).

AFAICT this was inadvertedly caused by commit 5434882 from Bug 8549
which introduced a change in the class names of the four buttons.

Another (minor) issue is that all four buttons' icons are clipped/
truncated at the bottom due to insufficient padding.
Comment 1 Andreas Roussos 2018-10-06 07:20:41 UTC Comment hidden (obsolete)
Comment 2 Séverine Queune 2018-10-06 10:27:14 UTC Comment hidden (obsolete)
Comment 3 Séverine Queune 2018-10-06 10:29:21 UTC
Nice catch !
Works fine for the 4 pages on the attached screenshot.
Comment 4 Martin Renvoize (ashimema) 2018-10-08 14:10:22 UTC
Created attachment 80222 [details] [review]
Bug 21506: DataTables four button pagination uses the wrong icon for First and Last buttons

Pages with DataTables' four button pagination use the wrong
icon for 'First' and 'Last'. Also, the icons for all four
buttons are truncated at the bottom.

This patch fixes that.

Test plan:
1) Go to a page that uses four button pagination (e.g. Home >
   Administration > MARC frameworks) and notice how the
   pagination icons for First/Previous and Next/Last are the
   same. Also notice all four icons are clipped at the bottom.
2) Apply the patch.
3) Refresh the page; the First and Last buttons' icons now
   include a vertical bar, and there is no clipping visible.
4) For completeness, check other affected pages as well.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize (ashimema) 2018-10-08 14:11:23 UTC
Works as expected, code is reasonable and I've not spotted anywhere it's not applying (shared library code).

Passing QA
Comment 6 Nick Clemens (kidclamp) 2018-10-09 16:19:46 UTC
Awesome work all!

Pushed to master for 18.11
Comment 7 Martin Renvoize (ashimema) 2018-10-15 11:56:44 UTC
Pushed to 18.05.x for 18.05.05
Comment 8 Fridolin Somers 2018-11-08 16:10:28 UTC
Pushed to 17.11.x for 17.11.12