Bugzilla – Attachment 17226 Details for
Bug 9463
Use DataTables on patron sent notices page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9463 [Revised] Use DataTables on patron sent notices page
Bug-9463-Revised-Use-DataTables-on-patron-sent-not.patch (text/plain), 2.79 KB, created by
Chris Cormack
on 2013-04-07 03:10:28 UTC
(
hide
)
Description:
Bug 9463 [Revised] Use DataTables on patron sent notices page
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-04-07 03:10:28 UTC
Size:
2.79 KB
patch
obsolete
>From 577e758d620a41d829587bee2ec458da0ee4ebbd Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 23 Jan 2013 12:25:39 -0500 >Subject: [PATCH] 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. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > .../prog/en/modules/members/notices.tt | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >index 1d7ec31..0959c90 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >@@ -2,15 +2,20 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Sent notices for [% INCLUDE 'patron-title.inc' %]</title> > [% INCLUDE 'doc-head-close.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[ > $(document).ready(function() { >- $("#noticestable").tablesorter({ >- [% IF ( dateformat == 'metric' ) %] >- dateFormat: 'uk' >- [% END %] >- }); >+ $("#noticestable").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aaSorting": [[ 3, "desc" ]], >+ "aoColumns": [ null,null,null,{ "sType": "title-string" } ], >+ "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], >+ "iDisplayLength": 20, >+ "sPaginationType": "four_button" >+ })); > > $(".message").hide(); > $(".message-title").click(function(e){ >@@ -73,7 +78,7 @@ > [% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted > [% ELSE %][% QUEUED_MESSAGE.status %][% END %] > </td> >- <td>[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]</td> >+ <td><span title="[% QUEUED_MESSAGE.time_queued %]">[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]</span></td> > </tr> > [% END %] > </tbody> >-- >1.7.10.4
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 9463
:
14796
|
14810
|
14886
|
15686
|
17081
|
17100
|
17111
|
17226
|
17227
|
17287
|
17397
|
17440