Bug 21506 - DataTables four button pagination uses the wrong icon for First and Last buttons
Summary: DataTables four button pagination uses the wrong icon for First and Last buttons
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P3 normal
Assignee: Andreas Roussos
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 21550
  Show dependency treegraph
 
Reported: 2018-10-06 07:12 UTC by Andreas Roussos
Modified: 2019-10-14 19:58 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
wrong icon for First and Last buttons (54.81 KB, image/png)
2018-10-06 07:12 UTC, Andreas Roussos
Details
Bug 21506: DataTables four button pagination uses the wrong icon for First and Last buttons (3.19 KB, patch)
2018-10-06 07:20 UTC, Andreas Roussos
Details | Diff | Splinter Review
Bug 21506: DataTables four button pagination uses the wrong icon for First and Last buttons (3.33 KB, patch)
2018-10-06 10:27 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 21506: DataTables four button pagination uses the wrong icon for First and Last buttons (3.40 KB, patch)
2018-10-08 14:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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