Bugzilla – Attachment 15880 Details for
Bug 9430
Use DataTables on library transfer limits page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9430 [Revised] Use DataTables on library transfer limits page
Bug-9430-Revised-Use-DataTables-on-library-transfe.patch (text/plain), 4.19 KB, created by
Jonathan Druart
on 2013-03-05 09:00:43 UTC
(
hide
)
Description:
Bug 9430 [Revised] Use DataTables on library transfer limits page
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-03-05 09:00:43 UTC
Size:
4.19 KB
patch
obsolete
>From f60847923384c1fea4e1e66afe84fa696830bc6d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 18 Jan 2013 14:55:59 -0500 >Subject: [PATCH] Bug 9430 [Revised] Use DataTables on library transfer limits > page > >Replace the tablesorter plugin with the DataTables plugin on the >library transfer limits page. > >Also made minor changes to "check/uncheck all" function to prevent page >from jumping on click, and removed unused function. > >To test, open the library transfer limits page (Administration -> >Library transfer limits). Confirm that table sorting works correctly for >all tables. > >Test that the "check all/uncheck all" links still work 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 + delete an unused >div block (used for pager) >--- > .../en/modules/admin/branch_transfer_limits.tt | 28 +++++++++++--------- > 1 file changed, 15 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt >index 1c2a7ac..04e4aed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt >@@ -1,15 +1,16 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Administration › Library checkin and transfer policy</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> >+<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" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function(){ >- $("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes();}); >- $("#UncheckAll").click(function(){ $("#transferlimit_tabs").unCheckCheckboxes();}); >- $("#SwapAll").click(function(){ $("#transferlimit_tabs").toggleCheckboxes();}); >+ $("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes(); return false; }); >+ $("#UncheckAll").click(function(){ $("#transferlimit_tabs").unCheckCheckboxes(); return false; }); > $('#transferlimit_tabs').tabs(); > > $('#branchselect').change(function() { >@@ -32,14 +33,18 @@ > $("#"+tid).unCheckCheckboxes(); > return false; > }); >- $(".sorted").tablesorter({ >- sortList: [[0,0]], >- headers: { 1: { sorter: false}} >- }).tablesorterPager({container: $(".pager"),positionFixed: false,size: 10}); >+ $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "iDisplayLength": 20, >+ "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], >+ "sPaginationType": "four_button" >+ })); > }); > //]]> > </script> >-<style type="text/css">td { text-align: center; }</style> >+<style type="text/css">td { text-align: center; } .sorted { min-width: 50%; }</style> > </head> > <body id="admin_branch_transfer_limits" class="admin"> > [% INCLUDE 'header.inc' %] >@@ -84,9 +89,6 @@ > <h4>Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]</h4> > <p><a id="CheckAll[% codes_loo.code %]table" class="checkall" href="#">Check all</a> | <a id="UncheckAll[% codes_loo.code %]table" class="uncheckall" href="#">Uncheck all</a></p> > >- <div id="pager[% codes_loo.code %]table"> >- [% INCLUDE 'table-pager.inc' perpage='20' %] >- </div> > <table id="[% codes_loo.code %]table" class="sorted"> > <thead> > <tr> >-- >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 9430
:
14713
|
14749
|
14882
|
15693
|
15739
| 15880