The patron sent notices page uses the old tablesorter plugin. It should use the DataTables plugin instead.
Created attachment 14796 [details] [review] Bug 9463 - Use DataTables on patron sent notices page Replace the tablesorter plugin with the DataTables plugin on the patron sent notices page. This patch adds default sorting by time (descending). To test, open the sent notices page for a patron who has multiple sent notices. Confirm that table sorting works correctly.
Created attachment 14810 [details] [review] Bug 9463 - Use DataTables on patron sent notices page Replace the tablesorter plugin with the DataTables plugin on the patron sent notices page. This patch adds default sorting by time (descending). To test, open the sent notices page for a patron who has multiple sent notices. Confirm that table sorting works correctly. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I found an issue (not introduced with your patch) : the time column is not displayed in the syspref format. I opened a new bug 9479
Created attachment 14886 [details] [review] Bug 9463 - Use DataTables on patron sent notices page Replace the tablesorter plugin with the DataTables plugin on the patron sent notices page. This patch adds default sorting by time (descending). To test, open the sent notices page for a patron who has multiple sent notices. Confirm that table sorting works correctly. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Patch no longer applies - please rebase and switch back to signed off if the conflict is easy to resolve.
Created attachment 15686 [details] [review] Bug 9463 - Use DataTables on patron sent notices page Replace the tablesorter plugin with the DataTables plugin on the patron sent notices page. This patch adds default sorting by time (descending). To test, open the sent notices page for a patron who has multiple sent notices. Confirm that table sorting works correctly. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 17081 [details] screenshot Hi Owen, a recent patch fixed date sorting on this page and I think this patch breaks it again (see screenshot). Sorting on master is correct, sorting with patch is not. Can you take a look please?
Created attachment 17100 [details] [review] Bug 9463 [Revised] Use DataTables on patron sent notices page Replace the tablesorter plugin with the DataTables plugin on the patron sent notices page. This patch adds default sorting by time (descending). This patch depends on the one for Bug 9887, which introduces a new DataTables plugin to allow sorting on data embedded in a <span>'s "title" attribute. This allows sorting to be done on an unformatted datetime. To test, open the sent notices page for a patron who has multiple sent notices. Confirm that table sorting works correctly with various date format settings.
Created attachment 17111 [details] [review] Bug 9463: FIX DT sort by date for the last column
Owen, I got a js error with your patch: TypeError: y[(("string" + "-") + m[Q][1])] is not a function I fix it with 3 simple changes, I use uk_date for the Time column and it seems to be well sorted.
Jonathan did you apply the patch for Bug 9887 first? I don't mind solving this sort with the uk_date routine, but I've found the title attribute sort to be really easy to implement, especially on pages where a lot of logic is going into displaying columns or not.
(In reply to comment #11) > Jonathan did you apply the patch for Bug 9887 first? I don't mind solving > this sort with the uk_date routine, but I've found the title attribute sort > to be really easy to implement, especially on pages where a lot of logic is > going into displaying columns or not. No, I forgot to apply the patch for bug 9887! And now it works. This means all dates in DT tables should be replaced using this method? We should standardized the way to sort dates and your patch add a new one. The goal is to delete the uk_date js functions and add a span around td values?
Would like to sign off, but its currently blocked by bug 9887 which is in failed qa
Created attachment 17226 [details] [review] Bug 9463 [Revised] Use DataTables on patron sent notices page Replace the tablesorter plugin with the DataTables plugin on the patron sent notices page. This patch adds default sorting by time (descending). This patch depends on the one for Bug 9887, which introduces a new DataTables plugin to allow sorting on data embedded in a <span>'s "title" attribute. This allows sorting to be done on an unformatted datetime. To test, open the sent notices page for a patron who has multiple sent notices. Confirm that table sorting works correctly with various date format settings. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Created attachment 17227 [details] [review] Bug 9463: FIX DT sort by date for the last column Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
On a patron with an empty notices table an alert pops up: DataTables warning (table id = 'noticestable'): Requested unknown parameter '1' from the data source for row 0
Created attachment 17287 [details] [review] Bug 9463 [Revised] Use DataTables on patron sent notices page Replace the tablesorter plugin with the DataTables plugin on the patron sent notices page. This patch adds default sorting by time (descending). This patch depends on the one for Bug 9887, which introduces a new DataTables plugin to allow sorting on data embedded in a <span>'s "title" attribute. This allows sorting to be done on an unformatted datetime. To test, open the sent notices page for a patron who has multiple sent notices. Confirm that table sorting works correctly with various date format settings. Revision corrects an error which occurs when there are no notices: Instead of displaying an empty table with a message the table is not displayed and a standard dialog message is displayed. In order to prevent page-specific CSS and JS from conflicting with the standard "message" class the page-specific classes have been changed from "message*" to "notice*" Test this change by viewing a page with existing notices and clicking the titles to show/hide the notice contents.
Created attachment 17397 [details] [review] Bug 9463 [Revised] Use DataTables on patron sent notices page Replace the tablesorter plugin with the DataTables plugin on the patron sent notices page. This patch adds default sorting by time (descending). This patch depends on the one for Bug 9887, which introduces a new DataTables plugin to allow sorting on data embedded in a <span>'s "title" attribute. This allows sorting to be done on an unformatted datetime. To test, open the sent notices page for a patron who has multiple sent notices. Confirm that table sorting works correctly with various date format settings. Revision corrects an error which occurs when there are no notices: Instead of displaying an empty table with a message the table is not displayed and a standard dialog message is displayed. In order to prevent page-specific CSS and JS from conflicting with the standard "message" class the page-specific classes have been changed from "message*" to "notice*" Test this change by viewing a page with existing notices and clicking the titles to show/hide the notice contents. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
QA Comment: This patch replaces tablesorter with DataTables on the patron sent notices page. All works great. Marked as Passed QA.
Created attachment 17440 [details] [review] Bug 9463 [Revised] Use DataTables on patron sent notices page Replace the tablesorter plugin with the DataTables plugin on the patron sent notices page. This patch adds default sorting by time (descending). This patch depends on the one for Bug 9887, which introduces a new DataTables plugin to allow sorting on data embedded in a <span>'s "title" attribute. This allows sorting to be done on an unformatted datetime. To test, open the sent notices page for a patron who has multiple sent notices. Confirm that table sorting works correctly with various date format settings. Revision corrects an error which occurs when there are no notices: Instead of displaying an empty table with a message the table is not displayed and a standard dialog message is displayed. In order to prevent page-specific CSS and JS from conflicting with the standard "message" class the page-specific classes have been changed from "message*" to "notice*" Test this change by viewing a page with existing notices and clicking the titles to show/hide the notice contents. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This patch has been pushed to master and 3.12.x.