Bug 26234 - Default DataTables must know our own classes
Summary: Default DataTables must know our own classes
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-18 09:59 UTC by Jonathan Druart
Modified: 2020-11-30 21:52 UTC (History)
0 users

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


Attachments
Bug 26234: Teach our KohaTable constructor the specific th classes (34.61 KB, patch)
2020-08-18 10:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26234: Teach our KohaTable constructor the specific th classes (34.66 KB, patch)
2020-08-18 14:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26234: Teach our KohaTable constructor the specific th classes (34.72 KB, patch)
2020-08-18 22:09 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2020-08-18 09:59:01 UTC
We have different classes we can use to set specific behaviours on table columns: title-string, string-sort, anti-the and NoSort.
We should not need to pass them to the DataTable constructor, we could teach it that we always want to apply them.

It will avoid bug like bug 26233
Comment 1 Jonathan Druart 2020-08-18 10:02:52 UTC
Created attachment 108440 [details] [review]
Bug 26234: Teach our KohaTable constructor the specific th classes

We have different classes we can use to set specific behaviours on table columns: title-string, string-sort, anti-the and NoSort.
We should not need to pass them to the DataTable constructor, we could teach it that we always want to apply them.

It will avoid bug like bug 26233

The goal is to define them in a centralised place (columns_settings.inc) then
only use the class on the th

Test plan:
Different behaviour and tables must be tested to confirm it works correctly.
Focus must be put on table when aoColumnsDefs is passed from the template
and confirm that this will add more info to aoColumnsDefs and not remove
the existing ones.
Note that this only work when KohaTable is used.
Comment 2 Owen Leonard 2020-08-18 14:34:29 UTC
Created attachment 108520 [details] [review]
Bug 26234: Teach our KohaTable constructor the specific th classes

We have different classes we can use to set specific behaviours on
table columns: title-string, string-sort, anti-the and NoSort.
We should not need to pass them to the DataTable constructor, we could
teach it that we always want to apply them.

It will avoid bug like bug 26233

The goal is to define them in a centralised place
(columns_settings.inc) then only use the class on the th

Test plan:
Different behaviour and tables must be tested to confirm it works
correctly. Focus must be put on table when aoColumnsDefs is passed from
the template and confirm that this will add more info to aoColumnsDefs
and not remove the existing ones.

Note that this only work when KohaTable is used.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2020-08-18 22:09:34 UTC
Created attachment 108563 [details] [review]
Bug 26234: Teach our KohaTable constructor the specific th classes

We have different classes we can use to set specific behaviours on
table columns: title-string, string-sort, anti-the and NoSort.
We should not need to pass them to the DataTable constructor, we could
teach it that we always want to apply them.

It will avoid bug like bug 26233

The goal is to define them in a centralised place
(columns_settings.inc) then only use the class on the th

Test plan:
Different behaviour and tables must be tested to confirm it works
correctly. Focus must be put on table when aoColumnsDefs is passed from
the template and confirm that this will add more info to aoColumnsDefs
and not remove the existing ones.

Note that this only work when KohaTable is used.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2020-08-19 07:36:36 UTC
Pushed to master for 20.11, thanks to everybody involved!