Bug 13218: (RM followup) only scroll on actually variable stuff
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / branch_transfer_limits.tt
index c9bd51c..375152c 100644 (file)
@@ -1,16 +1,15 @@
 [% 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>
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+[% INCLUDE 'datatables.inc' %]
+<script type="text/javascript" src="[% interface %]/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();});
-           $('#transferlimit_tabs > ul').tabs();
+        $("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes(); return false; });
+        $("#UncheckAll").click(function(){ $("#transferlimit_tabs").unCheckCheckboxes(); return false; });
+        $('#transferlimit_tabs').tabs();
 
                 $('#branchselect').change(function() {
                    $('#selectlibrary').submit();
                        $("#"+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 },
+            ],
+            "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' %]
@@ -69,7 +70,7 @@
     </form>
 
 <p class="help">Check the boxes for the libraries you accept to checkin items from.</p>
-<fieldset>For <strong>all</strong> [% limit_phrase %]s: <a id="CheckAll" href="#">Check all</a> | <a id="UncheckAll" href="#">Uncheck all</a></fieldset>
+<fieldset>For <strong>all</strong> [% IF ( limitType == 'ccode' ) %]collection codes[% ELSE %]item types[% END %]: <a id="CheckAll" href="#">Check all</a> | <a id="UncheckAll" href="#">Uncheck all</a></fieldset>
 
 
   <div id="transferlimit_tabs" class="toptabs">
@@ -84,9 +85,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>
@@ -97,7 +95,7 @@
 
                        <tbody>
                                        [% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
-                                               [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
+                        <tr>
                                                        <td><label style="min-width:400px;" for="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row">[% to_branch_loo.toBranch %] - [% to_branch_loo.toBranchname %]</label></td>
                                                        <td>
                                                        [% IF ( to_branch_loo.isChecked ) %]