Replace the tablesorter plugin with the DataTables plugin in the
"new" system preferences editor.
To test, open the system preferences editor on any tab other than Local
Use. Confirm that table sorting works correctly within each section. In
this configuration there should be no pager and no results filtering.
Revision corrects template path to datatables assets.
Further revision fixes section-collapse JS
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. Collapsing restored. No errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
-$(document).ready(function() {
- $("table.preferences").tablesorter({
- sortList: [[0,0]],
- headers: { 1: { sorter:false}}
- });
-});
-
// We can assume 'KOHA' exists, as we depend on KOHA.AJAX
KOHA.Preferences = {
// We can assume 'KOHA' exists, as we depend on KOHA.AJAX
KOHA.Preferences = {
};
$( document ).ready( function () {
};
$( document ).ready( function () {
+
+ $("table.preferences").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "sDom": 't',
+ "aoColumnDefs": [
+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }
+ ],
+ "bPaginate": false
+ }));
+
function mark_modified() {
$( this.form ).find( '.save-all' ).removeAttr( 'disabled' );
$( this ).addClass( 'modified' );
function mark_modified() {
$( this.form ).find( '.save-all' ).removeAttr( 'disabled' );
$( this ).addClass( 'modified' );
$(collapsible).toggle(
function () {
$(this).addClass("collapsed").removeClass("expanded").attr("title",MSG_CLICK_TO_EXPAND);
$(collapsible).toggle(
function () {
$(this).addClass("collapsed").removeClass("expanded").attr("title",MSG_CLICK_TO_EXPAND);
- $(this).next("table").hide();
+ $(this).next("div").hide();
},
function () {
$(this).addClass("expanded").removeClass("collapsed").attr("title",MSG_CLICK_TO_COLLAPSE);
},
function () {
$(this).addClass("expanded").removeClass("collapsed").attr("title",MSG_CLICK_TO_COLLAPSE);
- $(this).next("table").show();
+ $(this).next("div").show();
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Administration › System preferences</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Administration › System preferences</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.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>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/preferences.css" />
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
<script type="text/javascript">
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/preferences.css" />
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
<script type="text/javascript">