Bug 38984 - DataTables's columnDefs cleanup
Summary: DataTables's columnDefs cleanup
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 26553
Blocks: 39015
  Show dependency treegraph
 
Reported: 2025-01-28 10:57 UTC by Jonathan Druart
Modified: 2025-02-07 17:21 UTC (History)
0 users

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


Attachments
Bug 38984: Remove NoSort def (22.80 KB, patch)
2025-01-28 11:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Replace nosort with NoSort (11.56 KB, patch)
2025-01-28 11:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Remove anti-the (25.05 KB, patch)
2025-01-28 11:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Add NoSort when can replace targets (49.55 KB, patch)
2025-01-28 11:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Allow sort on all fields - club-enrollments (1.06 KB, patch)
2025-01-28 11:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Also make 'Actions' translatable (1.95 KB, patch)
2025-01-28 11:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Specific - tools/batch_extend_due_dates.tt (2.13 KB, patch)
2025-01-28 11:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Add NoSort when can replace targets (49.55 KB, patch)
2025-01-28 15:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Allow sort on all fields - club-enrollments (1.06 KB, patch)
2025-01-28 15:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Also make 'Actions' translatable (1.95 KB, patch)
2025-01-28 15:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Specific - tools/batch_extend_due_dates.tt (2.13 KB, patch)
2025-01-28 15:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Also make 'Actions' translatable (3.02 KB, patch)
2025-02-06 20:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Specific - tools/batch_extend_due_dates.tt (2.13 KB, patch)
2025-02-06 20:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38984: Remove NoSort def (22.79 KB, patch)
2025-02-07 16:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38984: Replace nosort with NoSort (11.60 KB, patch)
2025-02-07 16:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38984: Remove anti-the (24.45 KB, patch)
2025-02-07 16:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38984: Add NoSort when can replace targets (49.52 KB, patch)
2025-02-07 16:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38984: Allow sort on all fields - club-enrollments (1.11 KB, patch)
2025-02-07 16:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38984: Also make 'Actions' translatable (3.07 KB, patch)
2025-02-07 16:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38984: Specific - tools/batch_extend_due_dates.tt (2.18 KB, patch)
2025-02-07 16:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38984: (follow-up) Fix syntax error in invoice-files table (981 bytes, patch)
2025-02-07 16:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38984: (follow-up) Fix nosort class on first column (2.25 KB, patch)
2025-02-07 16:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38984: (follow-up) Replace obsolete "paginate" option with "paging" (25.40 KB, patch)
2025-02-07 17:21 UTC, Owen Leonard
Details | Diff | Splinter Review

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