Bugzilla – Attachment 15879 Details for
Bug 9429
Use DataTables on Authorized Values page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9429 [Revised] Use DataTables on Authorized Values page
Bug-9429-Revised-Use-DataTables-on-Authorized-Valu.patch (text/plain), 3.35 KB, created by
Jonathan Druart
on 2013-03-05 08:41:22 UTC
(
hide
)
Description:
Bug 9429 [Revised] Use DataTables on Authorized Values page
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-03-05 08:41:22 UTC
Size:
3.35 KB
patch
obsolete
>From 988fbb9315ff87e63d242c035746a443068b4e17 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 18 Jan 2013 14:28:36 -0500 >Subject: [PATCH] Bug 9429 [Revised] Use DataTables on Authorized Values page > >Replace the tablesorter plugin with the DataTables plugin on the >Authorized Values page. > >To test, open the Authorized Values page (Administration -> Authorized >values). Confirm that table sorting works correctly. > >Revision corrects template path to datatables assets. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Comment: Work as described. No errors. >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >Amended patch: Add the aLengthMenu key for DataTables >--- > .../prog/en/modules/admin/authorised_values.tt | 36 +++++++++++--------- > 1 file changed, 20 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >index 8b6aeb2..790f0b5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >@@ -5,27 +5,32 @@ > [% IF ( delete_confirm ) %] › Confirm deletion[% END %] > [% IF ( else ) %]Authorized values[% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] >-<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> >-<script type="text/javascript" id="js">$(document).ready(function() { >- // call the tablesorter plugin >- $("#table_authorized_values").tablesorter({ >- sortList: [[1,0]], >- headers: { 4: { sorter: false}, 5: { sorter: false}} >- }).tablesorterPager({container: $("#pagertable_authorized_values"),positionFixed: false,size: 50}); >+ >+<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() { >+ $("#table_authorized_values").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "aaSorting": [[ 1, "asc" ]], >+ "iDisplayLength": 20, >+ "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], >+ "sPaginationType": "four_button" >+ })); > > if ( $("#branches option:selected").length < 1 ) { > $("#branches option:first").attr("selected", "selected"); > } >-}); </script> >- >-<script type="text/JavaScript" language="JavaScript"> >-//<![CDATA[ >- $(document).ready(function() { >- $('#icons').tabs(); >- }); >+ $('#icons').tabs(); >+}); > //]]> > </script> >+ > [% IF ( else ) %] > <script type="text/javascript"> > //<![CDATA[ >@@ -234,7 +239,6 @@ $(document).ready(function() { > <h3>Authorized values for category [% category %]:</h3> > > [% IF ( loop ) %]<div id="pagertable_authorized_values"> >-[% INCLUDE 'table-pager.inc' perpage='50' %] > </div>[% END %] > > [% IF ( loop ) %]<table id="table_authorized_values" class="tablesorter"> >-- >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 9429
:
14709
|
14748
|
14881
|
15692
|
15738
| 15879