Bugzilla – Attachment 10193 Details for
Bug 8099
DataTables in Acquisision module: acqui-home.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 8099: DataTables integration in acquisition module [2]
SIGNED-OFF-Bug-8099-DataTables-integration-in-acqu.patch (text/plain), 3.00 KB, created by
Katrin Fischer
on 2012-06-11 12:38:36 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 8099: DataTables integration in acquisition module [2]
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-06-11 12:38:36 UTC
Size:
3.00 KB
patch
obsolete
>From 9d198990cc793a0c30d58d89c9e55fa41e3feea2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 17 Feb 2012 15:55:18 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 8099: DataTables integration in acquisition > module [2] > >acqui-home.tt > >http://bugs.koha-community.org/show_bug.cgi?id=8099 >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 16 +++++++++++++++ > .../prog/en/modules/acqui/acqui-home.tt | 21 ++++++++++++++++++++ > 2 files changed, 37 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >index e0cc888..7eb70d4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >@@ -220,6 +220,22 @@ function dt_overwrite_html_sorting_localeCompare() { > return (b > a) ? 1 : ((b < a) ? -1 : 0); > } > }; >+ >+ jQuery.fn.dataTableExt.oSort['num-html-asc'] = function(a,b) { >+ var x = a.replace( /<.*?>/g, "" ); >+ var y = b.replace( /<.*?>/g, "" ); >+ x = parseFloat( x ); >+ y = parseFloat( y ); >+ return ((x < y) ? -1 : ((x > y) ? 1 : 0)); >+ }; >+ >+ jQuery.fn.dataTableExt.oSort['num-html-desc'] = function(a,b) { >+ var x = a.replace( /<.*?>/g, "" ); >+ var y = b.replace( /<.*?>/g, "" ); >+ x = parseFloat( x ); >+ y = parseFloat( y ); >+ return ((x < y) ? 1 : ((x > y) ? -1 : 0)); >+ }; > } > > // Sorting on string without accentued characters >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index 7a44420..fa6ae53 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -1,8 +1,15 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions</title> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] >+<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[ >+ >+dt_overwrite_html_sorting_localeCompare(); >+ > $(document).ready(function() { > $('#showallbudgets').click(function() { > if ( $('#showallbudgets:checked').val() !== undefined) { >@@ -18,6 +25,20 @@ $(document).ready(function() { > $('.bu_active').hide(); > } > }); >+ var srlt = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumns": [ >+ null, >+ null, >+ null, >+ null, >+ { "sType": "num-html" }, >+ { "sType": "num-html" }, >+ null, >+ ], >+ 'bPaginate': false, >+ 'bFilter': false, >+ 'bInfo': false, >+ } ) ); > }); > //]]> > </script> >-- >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 8099
:
9605
|
9782
| 10193