Bug 38984

Summary: DataTables's columnDefs cleanup
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: TemplatesAssignee: Jonathan Druart <jonathan.druart>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: baptiste.wojtkowski
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 26553    
Bug Blocks: 39015    
Attachments: Bug 38984: Remove NoSort def
Bug 38984: Replace nosort with NoSort
Bug 38984: Remove anti-the
Bug 38984: Add NoSort when can replace targets
Bug 38984: Allow sort on all fields - club-enrollments
Bug 38984: Also make 'Actions' translatable
Bug 38984: Specific - tools/batch_extend_due_dates.tt
Bug 38984: Add NoSort when can replace targets
Bug 38984: Allow sort on all fields - club-enrollments
Bug 38984: Also make 'Actions' translatable
Bug 38984: Specific - tools/batch_extend_due_dates.tt
Bug 38984: Also make 'Actions' translatable
Bug 38984: Specific - tools/batch_extend_due_dates.tt
Bug 38984: Remove NoSort def
Bug 38984: Replace nosort with NoSort
Bug 38984: Remove anti-the
Bug 38984: Add NoSort when can replace targets
Bug 38984: Allow sort on all fields - club-enrollments
Bug 38984: Also make 'Actions' translatable
Bug 38984: Specific - tools/batch_extend_due_dates.tt
Bug 38984: (follow-up) Fix syntax error in invoice-files table
Bug 38984: (follow-up) Fix nosort class on first column
Bug 38984: (follow-up) Replace obsolete "paginate" option with "paging"
Bug 38984: Remove NoSort def
Bug 38984: Replace nosort with NoSort
Bug 38984: Remove anti-the
Bug 38984: Add NoSort when can replace targets
Bug 38984: Allow sort on all fields - club-enrollments
Bug 38984: Also make 'Actions' translatable
Bug 38984: Specific - tools/batch_extend_due_dates.tt
Bug 38984: (follow-up) Fix syntax error in invoice-files table
Bug 38984: (follow-up) Fix nosort class on first column
Bug 38984: (follow-up) Replace obsolete "paginate" option with "paging"
Bug 38984: Remove NoSort def
Bug 38984: Replace nosort with NoSort
Bug 38984: Remove anti-the
Bug 38984: Add NoSort when can replace targets
Bug 38984: Allow sort on all fields - club-enrollments
Bug 38984: Also make 'Actions' translatable
Bug 38984: Specific - tools/batch_extend_due_dates.tt
Bug 38984: (follow-up) Fix syntax error in invoice-files table
Bug 38984: (follow-up) Fix nosort class on first column
Bug 38984: (follow-up) Replace obsolete "paginate" option with "paging"

Description Jonathan Druart 2025-01-28 10:57:49 UTC
We don't need to have a columnDefs for NoSort or anti-the, they are already defined in the global datatables.js
Comment 1 Jonathan Druart 2025-01-28 11:01:07 UTC
Created attachment 177253 [details] [review]
Bug 38984: Remove NoSort def

No need to pass it to the constructor as it's defined already in
datatables.js
Comment 2 Jonathan Druart 2025-01-28 11:01:10 UTC
Created attachment 177254 [details] [review]
Bug 38984: Replace nosort with NoSort

We don't need nosort and NoSort, use NoSort everywhere
Comment 3 Jonathan Druart 2025-01-28 11:01:12 UTC
Created attachment 177255 [details] [review]
Bug 38984: Remove anti-the

Same as previouly for anti-the
Comment 4 Jonathan Druart 2025-01-28 11:01:15 UTC
Created attachment 177256 [details] [review]
Bug 38984: Add NoSort when can replace targets

In those occurrences we can simply use NoSort. It fixes some bugs, where
the display of the column depends on some pref's values
Comment 5 Jonathan Druart 2025-01-28 11:01:17 UTC
Created attachment 177257 [details] [review]
Bug 38984: Allow sort on all fields - club-enrollments

it does not make sense to remove sorting only for the last 2 fields
Comment 6 Jonathan Druart 2025-01-28 11:01:20 UTC
Created attachment 177258 [details] [review]
Bug 38984: Also make 'Actions' translatable
Comment 7 Jonathan Druart 2025-01-28 11:01:22 UTC
Created attachment 177259 [details] [review]
Bug 38984: Specific - tools/batch_extend_due_dates.tt

Why no sort on item type? Why no sort on #checkouts_result?
Comment 8 Jonathan Druart 2025-01-28 11:02:27 UTC
Also tempted to rename NoSort with no-sort and NoExport with no-export, to match string-sort, anti-the, etc.
Comment 9 Jonathan Druart 2025-01-28 11:03:29 UTC
(In reply to Jonathan Druart from comment #8)
> Also tempted to rename NoSort with no-sort and NoExport with no-export, to
> match string-sort, anti-the, etc.

And it's "noExport"...
Comment 10 Jonathan Druart 2025-01-28 15:19:32 UTC
Created attachment 177278 [details] [review]
Bug 38984: Add NoSort when can replace targets

In those occurrences we can simply use NoSort. It fixes some bugs, where
the display of the column depends on some pref's values
Comment 11 Jonathan Druart 2025-01-28 15:19:34 UTC
Created attachment 177279 [details] [review]
Bug 38984: Allow sort on all fields - club-enrollments

it does not make sense to remove sorting only for the last 2 fields
Comment 12 Jonathan Druart 2025-01-28 15:19:37 UTC
Created attachment 177280 [details] [review]
Bug 38984: Also make 'Actions' translatable
Comment 13 Jonathan Druart 2025-01-28 15:19:39 UTC
Created attachment 177281 [details] [review]
Bug 38984: Specific - tools/batch_extend_due_dates.tt

Why no sort on item type? Why no sort on #checkouts_result?
Comment 14 Jonathan Druart 2025-02-06 20:15:41 UTC
Created attachment 177597 [details] [review]
Bug 38984: Also make 'Actions' translatable

Current status: Patch doesn't apply
Comment 15 Jonathan Druart 2025-02-06 20:15:44 UTC
Created attachment 177598 [details] [review]
Bug 38984: Specific - tools/batch_extend_due_dates.tt

Why no sort on item type? Why no sort on #checkouts_result?
Comment 16 Owen Leonard 2025-02-07 16:52:10 UTC
Created attachment 177641 [details] [review]
Bug 38984: Remove NoSort def

No need to pass it to the constructor as it's defined already in
datatables.js

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 17 Owen Leonard 2025-02-07 16:52:13 UTC
Created attachment 177642 [details] [review]
Bug 38984: Replace nosort with NoSort

We don't need nosort and NoSort, use NoSort everywhere

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 18 Owen Leonard 2025-02-07 16:52:15 UTC
Created attachment 177643 [details] [review]
Bug 38984: Remove anti-the

Same as previouly for anti-the

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 19 Owen Leonard 2025-02-07 16:52:17 UTC
Created attachment 177644 [details] [review]
Bug 38984: Add NoSort when can replace targets

In those occurrences we can simply use NoSort. It fixes some bugs, where
the display of the column depends on some pref's values

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 20 Owen Leonard 2025-02-07 16:52:19 UTC
Created attachment 177645 [details] [review]
Bug 38984: Allow sort on all fields - club-enrollments

it does not make sense to remove sorting only for the last 2 fields

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 21 Owen Leonard 2025-02-07 16:52:21 UTC
Created attachment 177646 [details] [review]
Bug 38984: Also make 'Actions' translatable

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 22 Owen Leonard 2025-02-07 16:52:23 UTC
Created attachment 177647 [details] [review]
Bug 38984: Specific - tools/batch_extend_due_dates.tt

Why no sort on item type? Why no sort on #checkouts_result?

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 23 Owen Leonard 2025-02-07 16:52:24 UTC
Created attachment 177648 [details] [review]
Bug 38984: (follow-up) Fix syntax error in invoice-files table
Comment 24 Owen Leonard 2025-02-07 16:52:26 UTC
Created attachment 177649 [details] [review]
Bug 38984: (follow-up) Fix nosort class on first column

Changing "nosort" to "NoSort". Also adding an "order" option to the
table configuration so that the table isn't sorted by default on the
first column (overriding the NoSort option).
Comment 25 Owen Leonard 2025-02-07 17:21:51 UTC
Created attachment 177651 [details] [review]
Bug 38984: (follow-up) Replace obsolete "paginate" option with "paging"
Comment 26 Jonathan Druart 2025-02-12 16:01:57 UTC
Created attachment 177933 [details] [review]
Bug 38984: Remove NoSort def

No need to pass it to the constructor as it's defined already in
datatables.js
Comment 27 Jonathan Druart 2025-02-12 16:02:00 UTC
Created attachment 177934 [details] [review]
Bug 38984: Replace nosort with NoSort

We don't need nosort and NoSort, use NoSort everywhere
Comment 28 Jonathan Druart 2025-02-12 16:02:03 UTC
Created attachment 177935 [details] [review]
Bug 38984: Remove anti-the

Same as previouly for anti-the
Comment 29 Jonathan Druart 2025-02-12 16:02:06 UTC
Created attachment 177936 [details] [review]
Bug 38984: Add NoSort when can replace targets

In those occurrences we can simply use NoSort. It fixes some bugs, where
the display of the column depends on some pref's values
Comment 30 Jonathan Druart 2025-02-12 16:02:09 UTC
Created attachment 177937 [details] [review]
Bug 38984: Allow sort on all fields - club-enrollments

it does not make sense to remove sorting only for the last 2 fields
Comment 31 Jonathan Druart 2025-02-12 16:02:11 UTC
Created attachment 177938 [details] [review]
Bug 38984: Also make 'Actions' translatable
Comment 32 Jonathan Druart 2025-02-12 16:02:14 UTC
Created attachment 177939 [details] [review]
Bug 38984: Specific - tools/batch_extend_due_dates.tt

Why no sort on item type? Why no sort on #checkouts_result?
Comment 33 Jonathan Druart 2025-02-12 16:02:16 UTC
Created attachment 177940 [details] [review]
Bug 38984: (follow-up) Fix syntax error in invoice-files table
Comment 34 Jonathan Druart 2025-02-12 16:02:18 UTC
Created attachment 177941 [details] [review]
Bug 38984: (follow-up) Fix nosort class on first column

Changing "nosort" to "NoSort". Also adding an "order" option to the
table configuration so that the table isn't sorted by default on the
first column (overriding the NoSort option).
Comment 35 Jonathan Druart 2025-02-12 16:02:22 UTC
Created attachment 177942 [details] [review]
Bug 38984: (follow-up) Replace obsolete "paginate" option with "paging"
Comment 36 Owen Leonard 2025-03-07 11:35:45 UTC
Created attachment 179057 [details] [review]
Bug 38984: Remove NoSort def

No need to pass it to the constructor as it's defined already in
datatables.js
Comment 37 Owen Leonard 2025-03-07 11:35:47 UTC
Created attachment 179058 [details] [review]
Bug 38984: Replace nosort with NoSort

We don't need nosort and NoSort, use NoSort everywhere
Comment 38 Owen Leonard 2025-03-07 11:35:49 UTC
Created attachment 179059 [details] [review]
Bug 38984: Remove anti-the

Same as previouly for anti-the
Comment 39 Owen Leonard 2025-03-07 11:35:51 UTC
Created attachment 179060 [details] [review]
Bug 38984: Add NoSort when can replace targets

In those occurrences we can simply use NoSort. It fixes some bugs, where
the display of the column depends on some pref's values
Comment 40 Owen Leonard 2025-03-07 11:35:53 UTC
Created attachment 179061 [details] [review]
Bug 38984: Allow sort on all fields - club-enrollments

it does not make sense to remove sorting only for the last 2 fields
Comment 41 Owen Leonard 2025-03-07 11:35:56 UTC
Created attachment 179062 [details] [review]
Bug 38984: Also make 'Actions' translatable
Comment 42 Owen Leonard 2025-03-07 11:35:58 UTC
Created attachment 179063 [details] [review]
Bug 38984: Specific - tools/batch_extend_due_dates.tt

Why no sort on item type? Why no sort on #checkouts_result?
Comment 43 Owen Leonard 2025-03-07 11:36:01 UTC
Created attachment 179064 [details] [review]
Bug 38984: (follow-up) Fix syntax error in invoice-files table
Comment 44 Owen Leonard 2025-03-07 11:36:03 UTC
Created attachment 179065 [details] [review]
Bug 38984: (follow-up) Fix nosort class on first column

Changing "nosort" to "NoSort". Also adding an "order" option to the
table configuration so that the table isn't sorted by default on the
first column (overriding the NoSort option).
Comment 45 Owen Leonard 2025-03-07 11:36:06 UTC
Created attachment 179066 [details] [review]
Bug 38984: (follow-up) Replace obsolete "paginate" option with "paging"