Bugzilla – Attachment 15960 Details for
Bug 9459
Use DataTables on hold ratios report page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9459 [Revised] Use DataTables on hold ratios report page
SIGNED-OFF-Bug-9459-Revised-Use-DataTables-on-hold.patch (text/plain), 2.92 KB, created by
Bernardo Gonzalez Kriegel
on 2013-03-07 23:32:00 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9459 [Revised] Use DataTables on hold ratios report page
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-03-07 23:32:00 UTC
Size:
2.92 KB
patch
obsolete
>From 0284e92569a000f10b994331229f8c741d20ecdd Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 23 Jan 2013 10:57:09 -0500 >Subject: [PATCH] [SIGNED-OFF] 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. >--- > .../prog/en/modules/circ/reserveratios.tt | 24 ++++++++++---------- > 1 file changed, 12 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >index 33deaa9..8a52193 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >@@ -2,15 +2,12 @@ > <title>Koha › Circulation › Hold ratios</title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+[% INCLUDE 'datatables-strings.inc' %] >+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> > <script type="text/javascript"> > //<![CDATA[ >-$.tablesorter.addParser({ >- id: 'articles', >- is: function(s) {return false; }, >- format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, >- type: 'text' >-}); > $(document).ready(function() { > $("th a").hide(); > $(".ratiolimit").click(function () { >@@ -20,11 +17,14 @@ $.tablesorter.addParser({ > function () { $(this).toggleClass("ulined") }, > function () { $(this).toggleClass("ulined") } > ); >- $.tablesorter.defaults.widgets = ['zebra']; >- $("#holdst:has(tbody tr)").tablesorter({ // only add sort if the table has a body and rows >- sortList: [[0,1]], >- headers: { 1: { sorter: 'articles' }} >- }); >+ $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ 8 ], "sType": "natural" } >+ ], >+ "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], >+ "iDisplayLength": 20, >+ "sPaginationType": "four_button" >+ })); > }); > //]]> > </script> >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9459
:
14788
|
15084
|
15102
|
15181
|
15224
|
15704
|
15960
|
17169