Circulation uses the old tablesorter plugin when the UseTablesortForCirc preference is enabled. It should use DataTables instead.
Created attachment 16800 [details] [review] Bug 9887 - Use DataTables on circulation page The circulation page, when the UseTablesortForCirc preference is enabled, uses the old tablesorter plugin. It should use DataTables instead. This patch removes references to the tablesorter plugin and makes these changes to enable use of DataTables: - Pass two new unformatted date variables to the template from circulation.pl so that sorting can be performed on this data. - Add DataTables configurations for the table of checkouts and the table of relatives' checkouts. - Add a new plugin to the main DataTables configuration script to allow sorting on data embedded in a <span>'s 'title' attribute. - Add <span>s to each table with a title attribute containing the unformatted date data which DataTables needs to perform correct sorting. This eliminates the need for a special sorting algorithm to accomodate various date and datetime formatting options. - Set a template variable for checking whether circ exports are enabled. This reduces repetition. DataTables configuration changes based on how many columns are present. To test, load the circulation page for patrons who match various conditions: - Having only checkouts from today - Having checkouts from today and previous days - Having checkouts only from previous days - Having relatives who have checkouts (from today, from previous days, from both) Test these situations with UseTablesortForCirc enabled and disabled. Test these situations with circ exports enabled or disabled (with ExportRemoveFields filled or empty, for instance). Sorting should work correctly on all columns with the dateformat preference set to any option. All other circulation functions should work normally.
Created attachment 17099 [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.
This patch drops a reference to the 'checkouts-table-footer.inc' file when there are checkouts from previous days. This means that the table footer doesn't appear, which breaks the Return/Renew buttons as well as hiding the fine/price totals, the renewal due date textbox, and forgive fines on return checkbox. -- I didn't readily have all the test conditions available, but the DataTable looks like it works for today's checkouts and today's and previous days checkouts. I'm not sure about just previous days or relatives who have checkouts. -- I also noticed that the right border on the right most cells seem to not appear for today checkouts, although that's already present and not caused by this patch.
Created attachment 17170 [details] [review] Bug 9887 [Revised] Use DataTables on circulation page The circulation page, when the UseTablesortForCirc preference is enabled, uses the old tablesorter plugin. It should use DataTables instead. This patch removes references to the tablesorter plugin and makes these changes to enable use of DataTables: - Pass two new unformatted date variables to the template from circulation.pl so that sorting can be performed on this data. - Add DataTables configurations for the table of checkouts and the table of relatives' checkouts. - Add a new plugin to the main DataTables configuration script to allow sorting on data embedded in a <span>'s 'title' attribute. - Add <span>s to each table with a title attribute containing the unformatted date data which DataTables needs to perform correct sorting. This eliminates the need for a special sorting algorithm to accomodate various date and datetime formatting options. - Set a template variable for checking whether circ exports are enabled. This reduces repetition. DataTables configuration changes based on how many columns are present. To test, load the circulation page for patrons who match various conditions: - Having only checkouts from today - Having checkouts from today and previous days - Having checkouts only from previous days - Having relatives who have checkouts (from today, from previous days, from both) Test these situations with UseTablesortForCirc enabled and disabled. Test these situations with circ exports enabled or disabled (with ExportRemoveFields filled or empty, for instance). Sorting should work correctly on all columns with the dateformat preference set to any option. All other circulation functions should work normally. Revision adds missing include for table footer when there are previous checkouts and removes from empty table header cells which were messing up auto-detection of numeric data. The global CSS for table borders has been tightened up to improve handling of alternating row colors in DataTables-sorted tables.
Created attachment 17225 [details] [review] Bug 9887 [Revised] Use DataTables on circulation page The circulation page, when the UseTablesortForCirc preference is enabled, uses the old tablesorter plugin. It should use DataTables instead. This patch removes references to the tablesorter plugin and makes these changes to enable use of DataTables: - Pass two new unformatted date variables to the template from circulation.pl so that sorting can be performed on this data. - Add DataTables configurations for the table of checkouts and the table of relatives' checkouts. - Add a new plugin to the main DataTables configuration script to allow sorting on data embedded in a <span>'s 'title' attribute. - Add <span>s to each table with a title attribute containing the unformatted date data which DataTables needs to perform correct sorting. This eliminates the need for a special sorting algorithm to accomodate various date and datetime formatting options. - Set a template variable for checking whether circ exports are enabled. This reduces repetition. DataTables configuration changes based on how many columns are present. To test, load the circulation page for patrons who match various conditions: - Having only checkouts from today - Having checkouts from today and previous days - Having checkouts only from previous days - Having relatives who have checkouts (from today, from previous days, from both) Test these situations with UseTablesortForCirc enabled and disabled. Test these situations with circ exports enabled or disabled (with ExportRemoveFields filled or empty, for instance). Sorting should work correctly on all columns with the dateformat preference set to any option. All other circulation functions should work normally. Revision adds missing include for table footer when there are previous checkouts and removes from empty table header cells which were messing up auto-detection of numeric data. The global CSS for table borders has been tightened up to improve handling of alternating row colors in DataTables-sorted tables. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Created attachment 17269 [details] wrong date sorting Hi Owen, finding problems with this one too - I am sorry. The date sorting is not right (see screenshot). I tried refreshing and it works correctly with mm-dd-yyyy, but not with dd-mm-yyyy.
Created attachment 17303 [details] [review] [PASSED QA] Bug 9887 [Revised] Use DataTables on circulation page The circulation page, when the UseTablesortForCirc preference is enabled, uses the old tablesorter plugin. It should use DataTables instead. This patch removes references to the tablesorter plugin and makes these changes to enable use of DataTables: - Pass two new unformatted date variables to the template from circulation.pl so that sorting can be performed on this data. - Add DataTables configurations for the table of checkouts and the table of relatives' checkouts. - Add a new plugin to the main DataTables configuration script to allow sorting on data embedded in a <span>'s 'title' attribute. - Add <span>s to each table with a title attribute containing the unformatted date data which DataTables needs to perform correct sorting. This eliminates the need for a special sorting algorithm to accomodate various date and datetime formatting options. - Set a template variable for checking whether circ exports are enabled. This reduces repetition. DataTables configuration changes based on how many columns are present. To test, load the circulation page for patrons who match various conditions: - Having only checkouts from today - Having checkouts from today and previous days - Having checkouts only from previous days - Having relatives who have checkouts (from today, from previous days, from both) Test these situations with UseTablesortForCirc enabled and disabled. Test these situations with circ exports enabled or disabled (with ExportRemoveFields filled or empty, for instance). Sorting should work correctly on all columns with the dateformat preference set to any option. All other circulation functions should work normally. Revision adds missing include for table footer when there are previous checkouts and removes from empty table header cells which were messing up auto-detection of numeric data. The global CSS for table borders has been tightened up to improve handling of alternating row colors in DataTables-sorted tables. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass. Note: Don't forget it's the checkout tab and to turn on the preference to allow sorting there. Also, while checkouts sorts dates correctly, sorting on the details tabs was not always correct in my tests.
I was on the wrong tab, date sorting is off on the details tab.
This patch has been pushed to master and 3.12.x.