From 5a5ec0c96408ec18ebbe50f3bbc1f5050c0cba51 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 17 Feb 2012 15:53:24 +0100 Subject: [PATCH 01/16] Bug 5345: DataTables integration in acquisition module [1] parcel.tt --- koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 16 ++++++ .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 58 +++++++++++++------- 2 files changed, 54 insertions(+), 20 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js index e0cc888..d435535 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js @@ -382,3 +382,19 @@ $.fn.dataTableExt.oPagination.four_button = { } } }; + +$.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)); +}; + +$.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)); +}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index eb5492e..0a70181 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -1,26 +1,52 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% IF ( date ) %] Receipt Summary for [% name %] [% IF ( invoice ) %]Invoice [% invoice %][% END %] on [% formatteddatereceived %][% ELSE %]Receive Orders from [% name %][% END %] + [% INCLUDE 'doc-head-close.inc' %] + +[% INCLUDE 'datatables-strings.inc' %] + [% INCLUDE 'greybox.inc' %] -