Bugzilla – Attachment 15841 Details for
Bug 9444
Use DataTables in system preferences editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9444 [Revised] Use DataTables in system preferences editor
Bug-9444-Revised-Use-DataTables-in-system-preferen.patch (text/plain), 3.62 KB, created by
Jonathan Druart
on 2013-03-04 09:16:35 UTC
(
hide
)
Description:
Bug 9444 [Revised] Use DataTables in system preferences editor
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-03-04 09:16:35 UTC
Size:
3.62 KB
patch
obsolete
>From 72e465861ed313aaa6ca3a7f681a1faabc2287f4 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 22 Jan 2013 12:17:55 -0500 >Subject: [PATCH] Bug 9444 [Revised] Use DataTables in system preferences > editor > >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> >--- > .../intranet-tmpl/prog/en/js/pages/preferences.js | 20 +++++++++++--------- > .../prog/en/modules/admin/preferences.tt | 5 ++++- > 2 files changed, 15 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js >index 4d793a1..96e9e99 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js >@@ -1,10 +1,3 @@ >-$(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 = { >@@ -40,6 +33,15 @@ KOHA.Preferences = { > }; > > $( 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' ); >@@ -96,11 +98,11 @@ $( document ).ready( function () { > $(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); >- $(this).next("table").show(); >+ $(this).next("div").show(); > } > ); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >index 5b20399..ebb9d8c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >@@ -1,7 +1,10 @@ > [% 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"> >-- >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 9444
:
14754
|
14770
|
15699
|
15743
|
15811
|
15817
| 15841