Bugzilla – Attachment 14806 Details for
Bug 9476
Use Datatables on Koha news page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9476 - Use Datatables on Koha news page
Bug-9476---Use-Datatables-on-Koha-news-page.patch (text/plain), 2.25 KB, created by
Owen Leonard
on 2013-01-24 01:44:23 UTC
(
hide
)
Description:
Bug 9476 - Use Datatables on Koha news page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-01-24 01:44:23 UTC
Size:
2.25 KB
patch
obsolete
>From 9aa74bad9df3aec91b6315c2bdeb22ac0bfb8456 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 23 Jan 2013 20:40:36 -0500 >Subject: [PATCH] Bug 9476 - Use Datatables on Koha news page >Content-Type: text/plain; charset="utf-8" > >Replace the tablesorter plugin with the DataTables plugin on the >Koha news page. > >To test, open the Koha news page (Tools -> News). Confirm that table sorting >works correctly. >--- > .../prog/en/modules/tools/koha-news.tt | 22 +++++++++++++------- > 1 file changed, 15 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >index f782897..d1148b5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >@@ -2,17 +2,25 @@ > <title>Koha › Tools › News</title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >+[% IF ( opac_news_count ) %] >+<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" /> >+<script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+[% INCLUDE 'datatables-strings.inc' %] >+<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script> > <script type="text/javascript">//<![CDATA[ >+[% IF (dateformat == 'metric') %]dt_add_type_uk_date();[% END %] > $(document).ready(function() { >- $("#newst").tablesorter({[% IF ( dateformat == 'metric' ) %] >- dateFormat: 'uk',[% END %] >- sortList: [[2,0]], >- headers: { 0: {sorter:false},6: { sorter: false },7: { sorter: false }} >- }); >-}); >+ $("#newst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sDom": 't', >+ "aoColumnDefs": [ >+ { "aTargets": [ 0,-1,-2 ], "bSortable": false, "bSearchable": false } >+ ], >+ "bPaginate": false >+ })); >+}); > //]]> > </script> >+[% END %] > <script language="javascript" type="text/javascript" src="[% themelang %]/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script> > <script language="javascript" type="text/javascript"> > tinyMCE.init({ >-- >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 9476
:
14806
|
15099
|
15109
|
15113
|
15131