[Koha-patches] [PATCH] Bug 6842 library transfer limits edits not stored

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Thu Dec 22 17:12:13 CET 2011


This was owed to the bug 6689 Table sorter.
It would embed a form in an other form, which is not licit in xhtml.
This solution relies on the dataTables patches (bug 6836)
and fixes the edit problem with keeping the pagination.
---
 .../en/modules/admin/branch_transfer_limits.tt     |   13 ++++---------
 1 files changed, 4 insertions(+), 9 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 5e4e58f..7c10e9d 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,8 +1,9 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo; 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>
+<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[
@@ -50,10 +51,7 @@
 			$("#"+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, { } ) );
 	});
 //]]>
 </script>
@@ -102,9 +100,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" class="pager">
-	[% INCLUDE 'table-pager.inc' perpage='20' %]
-	</div>
 		<table id="[% codes_loo.code %]table" class="sorted">
 			<thead>
 				<tr>
-- 
1.7.7.3



More information about the Koha-patches mailing list