Bug 9462 - Use DataTables on patron detail page
Summary: Use DataTables on patron detail page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-23 17:12 UTC by Owen Leonard
Modified: 2014-05-26 21:04 UTC (History)
2 users (show)

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


Attachments
Bug 9462 - Use DataTables on patron detail page (3.51 KB, patch)
2013-01-23 17:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Patron detail > holds table issue (88.07 KB, image/png)
2013-01-25 10:00 UTC, Jonathan Druart
Details
Bug 9462 [Revised] Use DataTables on patron detail page (4.22 KB, patch)
2013-01-29 15:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 9462 [Revised] Use DataTables on patron detail page (4.24 KB, patch)
2013-02-08 17:21 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9462 [Revised] Use DataTables on patron detail page (4.30 KB, patch)
2013-02-11 09:07 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 17:12:17 UTC
The patron detail page uses the old tablesorter plugin. It should use the DataTables plugin instead.
Comment 1 Owen Leonard 2013-01-23 17:19:29 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2013-01-24 08:58:25 UTC
Hi Owen,

The holdst is really small and does not extend to the width of the container (div id="holdst_wrapper"). I don't know why, I did not find the difference with the issuest table.
Comment 3 Owen Leonard 2013-01-24 11:44:36 UTC
(In reply to comment #2)
> The holdst is really small and does not extend to the width of the container

I noticed this on the branch transfers page as well. If you have a sorted table in a hidden tab the table doesn't expand to the width one would expect. On the branch transfers page I ended up setting an explicit min-width on the table. When I tested this patch the problem wasn't as noticeable, but that was probably due to the data I had in the table.

Setting an explicit width here too could be a solution. I would like to see a screenshot if that is possible.
Comment 4 Jonathan Druart 2013-01-25 10:00:55 UTC
Created attachment 14843 [details]
Patron detail > holds table issue

(In reply to comment #3)
> Setting an explicit width here too could be a solution. I would like to see
> a screenshot if that is possible.

Yes of course.
If I set a width=100% for the table element, the table appears with a good width.
Comment 5 Owen Leonard 2013-01-29 15:34:28 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2013-02-08 17:21:34 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2013-02-11 09:07:06 UTC
QA comment:

The table is correctly displayed now.
There is a sort issue on the barcode column if it contains something else than a barcode (e.g. "Item is waiting -barcode-"), not blocker.

Marked as Passed QA.
Comment 8 Jonathan Druart 2013-02-11 09:07:58 UTC
Created attachment 15223 [details] [review]
Bug 9462 [Revised] Use DataTables on patron detail page

Replace the tablesorter plugin with the DataTables plugin on the
patron detail page.

To test, open a patron detail page for a patron who has checkouts,
holds, and relatives' checkouts. Confirm that table sorting works
correctly for each of those three tables.

Revision adds some JavaScript designed to handle table-sizing for tables
which are hidden initally in tabs. DataTables has an approved method for
handling these cases:
http://www.datatables.net/examples/api/tabs_and_scrolling.html

This should prevent the table of existing holds from looking squeezed.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 9 Jared Camins-Esakov 2013-02-12 14:05:26 UTC
This patch has been pushed to master.