Bugzilla – Attachment 15745 Details for
Bug 9446
Use DataTables on Z39.50 servers administration page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9446 [Revised] Use DataTables on Z39.50 servers administration page
SIGNED-OFF-Bug-9446-Revised-Use-DataTables-on-Z395.patch (text/plain), 4.04 KB, created by
Bernardo Gonzalez Kriegel
on 2013-02-27 23:44:44 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9446 [Revised] Use DataTables on Z39.50 servers administration page
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-02-27 23:44:44 UTC
Size:
4.04 KB
patch
obsolete
>From 15438b13619200cf8136154981a16c064f1b1929 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 22 Jan 2013 12:57:28 -0500 >Subject: [PATCH] [SIGNED-OFF] Bug 9446 [Revised] Use DataTables on Z39.50 > servers administration page > >Replace the tablesorter plugin with the DataTables plugin on the >Z39.50 servers administration page. Structural changes were made to >deal with a DataTables bug which prevents it from properly parsing a ><th> with a colspan. > >This patch also moves embedding of the toolbar and table-sorting JS from >within the body of the page to the <head> for sake of consistency. > >To test, open the Z39.50 servers administration page (Administration -> >Z39.50 client targets). Confirm that table sorting works >correctly. > >Revision corrects template path to datatables assets. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Comment: Table sorting works. No errors. >--- > .../prog/en/modules/admin/z3950servers.tt | 43 ++++++++++++-------- > 1 file changed, 25 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >index a2f473d..ca50cc4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >@@ -5,6 +5,30 @@ > [% IF ( add_validate ) %]Z39.50 servers › Z39.50 server added[% END %] > [% IF ( delete_confirmed ) %]Z39.50 servers › Z39.50 server deleted[% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] >+[% IF ( else ) %] >+<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"> >+//<![CDATA[ >+// prepare DOM for YUI Toolbar >+ $(document).ready(function() { >+ yuiToolbar(); >+ [% IF ( loop ) %]$("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ 2,3,4,7,8,9,10,11 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "iDisplayLength": 20, >+ "sPaginationType": "four_button" >+ }));[% END %] >+ }); >+// YUI Toolbar Functions >+function yuiToolbar() { >+ new YAHOO.widget.Button("newserver"); >+} //]]> >+</script> >+[% END %] > > [% IF ( add_form ) %] > <script type="text/javascript"> >@@ -260,23 +284,6 @@ > [% IF ( else ) %] > > <div id="toolbar"> >- <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >- <script type="text/javascript"> >- //<![CDATA[ >- // prepare DOM for YUI Toolbar >- $(document).ready(function() { >- yuiToolbar(); >- [% IF ( loop ) %]$.tablesorter.defaults.widgets = ['zebra']; >- $("#serverst").tablesorter({ >- sortList: [[0,0]], >- headers: { 2: {sorter:false},3: { sorter: false },4: { sorter: false },7: { sorter: false },8: { sorter: false },9: { sorter: false },10: { sorter: false }} >- });[% END %] >- }); >- // YUI Toolbar Functions >- function yuiToolbar() { >- new YAHOO.widget.Button("newserver"); >- } //]]> >- </script> > <ul class="toolbar"> > <li><a id="newserver" href="/cgi-bin/koha/admin/z3950servers.pl?op=add_form">New Z39.50 server</a></li> > </ul></div> >@@ -287,7 +294,7 @@ > You searched for [% searchfield %] > [% END %] > <table id="serverst"> >- <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Checked</th><th>Rank</th> <th>Syntax</th><th>Encoding</th><th>Timeout</th><th colspan="2"> </th> >+ <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Checked</th><th>Rank</th> <th>Syntax</th><th>Encoding</th><th>Timeout</th><th> </th><th> </th> > </tr></thead> > <tbody>[% FOREACH loo IN loop %] > [% UNLESS ( loop.odd ) %] >-- >1.7.9.5
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 9446
:
14756
|
14772
|
15701
|
15745
|
15884
|
16097
|
16506
|
16523