Bugzilla – Attachment 15833 Details for
Bug 9466
Use DataTables on saved reports page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9466 [Revised] Use DataTables on saved reports page
SIGNED-OFF-Bug-9466-Revised-Use-DataTables-on-save.patch (text/plain), 3.35 KB, created by
Nicole C. Engard
on 2013-03-03 21:32:50 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9466 [Revised] Use DataTables on saved reports page
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2013-03-03 21:32:50 UTC
Size:
3.35 KB
patch
obsolete
>From 54d490f1830dece2aea6fa4033ea586b917ab757 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 23 Jan 2013 14:09:13 -0500 >Subject: [PATCH] [SIGNED-OFF] 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. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > .../en/modules/reports/guided_reports_start.tt | 40 +++++++++---------- > 1 files changed, 19 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 7f109d9..fbb7886 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -19,10 +19,17 @@ > <style type="text/css"> > #sql { width: 90%; height: 9em;} > </style> >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script> >+[% IF ( saved1 ) %] >+<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> >+[% END %] > > <script type="text/javascript"> >+[% IF (dateformat == 'metric') %] >+dt_add_type_uk_date(); >+[% END %] > //<![CDATA[ > var group_subgroups = {}; > var no_subgroup_label = _( "(None)" ); >@@ -59,22 +66,17 @@ $(document).ready(function(){ > return false; > } > }); >+ // call the datatables plugin >+ $("#table_reports").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1, -2, -3, -4 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "aaSorting": [[ 1, "asc" ]], >+ "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], >+ "iDisplayLength": 20, >+ "sPaginationType": "four_button" >+ })); > [% END %] >- // call the tablesorter plugin >- $("#table_reports").tablesorter({ >- widgets : ['zebra'], >- sortList: [[1,0]], >- headers: { >- 10: { sorter: false}, >- 11: { sorter: false}, >- 12: { sorter: false}, >- 13: { sorter: false} >- } >- }).tablesorterPager({ >- container: $("#pagertable_reports"), >- positionFixed: false, >- size: 20 >- }); > // redefine the datepicker's default because reports require ISO > // http://jqueryui.com/demos/datepicker/#option-dateFormat > $( ".datepicker" ).datepicker( "option", "dateFormat", "yy-mm-dd" ); >@@ -147,10 +149,6 @@ canned reports and writing custom SQL reports.</p> > [% IF ( saved1 ) %] > [% IF ( savedreports ) %]<h1>Saved reports</h1> > >-<div id="pagertable_reports"> >-[% INCLUDE 'table-pager.inc' perpage='20' %] >-</div> >- > <table id="table_reports" class="tablesorter"> > <thead> > <tr> >-- >1.7.2.3
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 9466
:
14799
|
14856
|
14878
|
15705
|
15833
|
16135
|
16158