Bug 24169 - Advanced editor: icons/buttons for sorting the search results are missing
Summary: Advanced editor: icons/buttons for sorting the search results are missing
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 23013
Blocks:
  Show dependency treegraph
 
Reported: 2019-12-04 13:54 UTC by Cori Lynn Arnold
Modified: 2020-01-09 21:44 UTC (History)
4 users (show)

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


Attachments
Bug 24169: Advanced editor: icons/buttons for sorting the search results are missing (1.27 KB, patch)
2019-12-17 15:57 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24169: Advanced editor: icons/buttons for sorting the search results are missing (1.32 KB, patch)
2019-12-17 16:08 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 24169: Advanced editor: icons/buttons for sorting the search results are missing (1.40 KB, patch)
2019-12-19 06:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24169: Add a comment to clarify the use of the dataTable class (1.05 KB, patch)
2019-12-19 06:41 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Cori Lynn Arnold 2019-12-04 13:54:15 UTC
After 19.11 the sorting icons for the search results disappeared. The search still works if you click on the header of the column, but the icons are gone.

19.05:
https://paste.pics/8694b71e22504d77439b877166ca5e77

19.11:
https://paste.pics/301f28373f9fc57756e401855fcb063b
Comment 1 Jonathan Druart 2019-12-04 14:31:13 UTC
Caused by bug 23013.

cateditor-ui.inc is using .sorting_asc and .sorting_desc that were define in datatables.css
Now the CSS definitions are more precise (table.dataTable thead .sorting_asc) and are no longer applied to the th.
Comment 2 Owen Leonard 2019-12-17 15:57:19 UTC
Created attachment 96385 [details] [review]
Bug 24169: Advanced editor: icons/buttons for sorting the search results are missing

This patch "manually" adds the "dataTable" class to the table of search
results in the advanced cataloging editor. This allows the correct
styles to get picked up from existing CSS.

To test, go to Cataloging and open the advanced editor. Perform a search
using the sidebar search form. In the table of results, confirm that
table sorting indicators look correct and that sorting works correctly.
Comment 3 ByWater Sandboxes 2019-12-17 16:08:34 UTC
Created attachment 96386 [details] [review]
Bug 24169: Advanced editor: icons/buttons for sorting the search results are missing

This patch "manually" adds the "dataTable" class to the table of search
results in the advanced cataloging editor. This allows the correct
styles to get picked up from existing CSS.

To test, go to Cataloging and open the advanced editor. Perform a search
using the sidebar search form. In the table of results, confirm that
table sorting indicators look correct and that sorting works correctly.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Comment 4 Cori Lynn Arnold 2019-12-17 16:09:13 UTC
Works great!
Comment 5 Jonathan Druart 2019-12-18 08:37:55 UTC
Owen, does not it sound more correct to copy the CSS definitions?
Comment 6 Owen Leonard 2019-12-19 00:49:13 UTC
(In reply to Jonathan Druart from comment #5)
> Owen, does not it sound more correct to copy the CSS definitions?

It would be more correct, but I think the satisfaction of being technically correct would be outweighed by the effort. I think a pragmatic fix is better.
Comment 7 Jonathan Druart 2019-12-19 06:41:37 UTC
Created attachment 96469 [details] [review]
Bug 24169: Advanced editor: icons/buttons for sorting the search results are missing

This patch "manually" adds the "dataTable" class to the table of search
results in the advanced cataloging editor. This allows the correct
styles to get picked up from existing CSS.

To test, go to Cataloging and open the advanced editor. Perform a search
using the sidebar search form. In the table of results, confirm that
table sorting indicators look correct and that sorting works correctly.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2019-12-19 06:41:41 UTC
Created attachment 96470 [details] [review]
Bug 24169: Add a comment to clarify the use of the dataTable class

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2019-12-19 06:44:37 UTC
(In reply to Owen Leonard from comment #6)
> (In reply to Jonathan Druart from comment #5)
> > Owen, does not it sound more correct to copy the CSS definitions?
> 
> It would be more correct, but I think the satisfaction of being technically
> correct would be outweighed by the effort. I think a pragmatic fix is better.

It seemed easy to copy the 5 lines, and I was going to propose an alternative patch. But then I realised that we may also want the other .dataTable definitions as well. I guess that why you thought the effort was consequent, I did not think about that at first.
Comment 10 Martin Renvoize 2019-12-20 12:09:53 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 11 Joy Nelson 2020-01-03 22:33:20 UTC
Pushed to 19.11.x branch for 19.11.02
Comment 12 Lucas Gass 2020-01-09 21:44:32 UTC
missing dependencies for 19.05.x, no backport