Bug 9459 - Use DataTables on hold ratios report page
Summary: Use DataTables on hold ratios report page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Jonathan Druart
URL: /cgi-bin/koha/circ/reserveratios.pl
Keywords:
Depends on:
Blocks: 9984
  Show dependency treegraph
 
Reported: 2013-01-23 15:56 UTC by Owen Leonard
Modified: 2014-05-26 21:04 UTC (History)
3 users (show)

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


Attachments
Bug 9459 - Use DataTables on hold ratios report page (2.46 KB, patch)
2013-01-23 16:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 9459 - Use DataTables on hold ratios report page (2.47 KB, patch)
2013-02-06 04:54 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 9459 [Revised] Use DataTables on hold ratios report page (2.79 KB, patch)
2013-02-06 14:49 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 9459 [Revised] Use DataTables on hold ratios report page (2.80 KB, patch)
2013-02-08 17:24 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 9459 [Revised] Use DataTables on hold ratios report page (2.94 KB, patch)
2013-02-11 09:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9459 [Revised] Use DataTables on hold ratios report page (2.83 KB, patch)
2013-02-26 16:47 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9459 [Revised] Use DataTables on hold ratios report page (2.92 KB, patch)
2013-03-07 23:32 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 9459 [Revised] Use DataTables on hold ratios report page (2.97 KB, patch)
2013-04-03 13:38 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2013-01-23 15:56:37 UTC
The hold ratios report uses the old tablesorter plugin. It should use the DataTables plugin instead.
Comment 1 Owen Leonard 2013-01-23 16:05:52 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2013-02-06 04:54:23 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-02-06 14:12:31 UTC
QA comment:

At least the "Items" column is not correctly sorted (alpha sort: 1, 10, 3).
Certainly caused by the <p> tag.

+ the aLengthMenu should contain 20 instead of 25.

Marked as Failed QA.
Comment 4 Owen Leonard 2013-02-06 14:49:07 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall (khall) 2013-02-08 17:24:34 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2013-02-11 09:18:35 UTC
QA comment:

I spoke about the second column.
I will modified my SO patch.

Owen, show yourself if you disagree.

Marked as Passed QA.
Comment 7 Jonathan Druart 2013-02-11 09:18:59 UTC Comment hidden (obsolete)
Comment 8 Jared Camins-Esakov 2013-02-12 14:22:29 UTC
I get a javascript error from this patch: Uncaught TypeError: Property 'natural-asc' of object #<Object> is not a function
As a result of the Javascript error (I think), I get the following problematic display: http://screencast.com/t/k4l8TAppdWC
Comment 9 Jonathan Druart 2013-02-12 14:33:35 UTC
Jared,
Yes, this patch depends on Bug 9431.
Comment 10 Jared Camins-Esakov 2013-02-12 15:05:12 UTC
I will return the status to Passed QA, and revisit this once bug 9431 has been QAed.
Comment 11 Owen Leonard 2013-02-26 16:47:40 UTC Comment hidden (obsolete)
Comment 12 Bernardo Gonzalez Kriegel 2013-03-07 23:32:00 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2013-03-08 10:29:34 UTC
Hello Owen,

Don't you think we can delete the a links in headers?
Is it really relevant to keep sorting (without js) only on 1 table? (I suppose it is for the case where javascript is disabled).
Comment 14 Jonathan Druart 2013-04-03 09:56:43 UTC
ping Owen
Comment 15 Owen Leonard 2013-04-03 13:08:39 UTC
Sorry I missed your comment Jonathan. Since we require JS in the staff client I don't see any reason why we need to keep the server-side sort. A separate bug could certainly be created for that. Or is there a reason to let that hold up this patch?
Comment 16 Jonathan Druart 2013-04-03 13:20:29 UTC
(In reply to comment #15)
> Sorry I missed your comment Jonathan. Since we require JS in the staff
> client I don't see any reason why we need to keep the server-side sort. A
> separate bug could certainly be created for that. Or is there a reason to
> let that hold up this patch?

No one :)
I created a new bug for that (bug 9984).
Comment 17 Jonathan Druart 2013-04-03 13:37:59 UTC
replace tablesorter with DT on the hold ratios table.

Marked as Passed QA.
Comment 18 Jonathan Druart 2013-04-03 13:38:05 UTC
Created attachment 17169 [details] [review]
Bug 9459 [Revised] Use DataTables on hold ratios report page

Replace the tablesorter plugin with the DataTables plugin on the
hold ratios report page.

To test, open the hold ratios report (Circulation -> Hold ratios).
Confirm that table sorting works correctly.

Revision adds correct pagination options and natural sort for 'items
needed' column.

Patch now depends on Bug 9431
(http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9431) which
introduces the natural sort plugin.

Further revision corrects template path to datatables assets.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: On top of Bug 9431. Sorting works. No errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 19 Jared Camins-Esakov 2013-04-07 17:31:09 UTC
This patch has been pushed to master and 3.12.x.