Bug 9466

Summary: Use DataTables on saved reports page
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, nengard
Version: Main   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/reports/guided_reports.pl?phase=Use saved
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 9466 - Use DataTables on saved reports page
Bug 9466 [Revised] Use DataTables on saved reports page
Bug 9466 [Revised] Use DataTables on saved reports page
Bug 9466 [Revised] Use DataTables on saved reports page
[SIGNED-OFF] Bug 9466 [Revised] Use DataTables on saved reports page
Bug 9466 [Revised] Use DataTables on saved reports page
Bug 9466 [Revised] Use DataTables on saved reports page

Description Owen Leonard 2013-01-23 19:09:20 UTC
The saved reports page uses the old tablesorter plugin. It should use the DataTables plugin instead.
Comment 1 Owen Leonard 2013-01-23 19:15:35 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2013-01-24 13:25:39 UTC
Hi Owen,

I found a bug in all the datatable patchs :-/
The iDisplayLength value equal 20 but this value is not in the aLengthMenu, so the selected value is 10.
The default values of datatable is 10, 25, 50 and 100.
We have 2 solutions:
1/ we defined the aLengthMenu with 10, 20, 50, 100, All
2/ the iDisplayLength has to be equal to 25
Comment 3 Owen Leonard 2013-01-25 14:06:23 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2013-01-28 08:02:00 UTC Comment hidden (obsolete)
Comment 5 Owen Leonard 2013-02-07 17:40:58 UTC
*** Bug 9568 has been marked as a duplicate of this bug. ***
Comment 6 Owen Leonard 2013-02-26 16:50:55 UTC Comment hidden (obsolete)
Comment 7 Nicole C. Engard 2013-03-03 21:32:50 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2013-03-05 10:23:17 UTC
QA comment:

On the reports/guided_reports.pl page, I got a js error: ReferenceError: dt_add_type_uk_date is not defined (js/datatables.js is only loaded if saved1 is defined).

Marked as Failed QA
Comment 9 Owen Leonard 2013-03-14 18:03:19 UTC Comment hidden (obsolete)
Comment 10 Owen Leonard 2013-03-14 18:03:51 UTC
Please update the status if you think it's incorrect to keep this "signed off."
Comment 11 Jonathan Druart 2013-03-15 08:34:45 UTC
QA comment:

This patch replaces tablesorter with DataTables on the saved reports page.
No js error with the last patch.

Marked as Passed QA.
Comment 12 Jonathan Druart 2013-03-15 08:35:31 UTC
Created attachment 16158 [details] [review]
Bug 9466 [Revised] Use DataTables on saved reports page

Replace the tablesorter plugin with the DataTables plugin on the
saved reports page.

To test, open the saved reports page (Reports > Use saved).
Confirm that table sorting works correctly.

Revision makes default result count (20) match options for number of
pagination entries (10,20,50,100,all).

Further revision corrects template path to datatables assets.
Further revision fixes JavaScript error as reported by QA

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 13 Jared Camins-Esakov 2013-03-15 23:23:43 UTC
This patch has been pushed to master.