From 943542936f552c9c065e77a1b380bf65fed7393a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 7 Jun 2012 12:45:05 +0200 Subject: [PATCH] [SIGNED-OFF] Bug : DataTables integration in acquisition module [1] parcel.tt http://bugs.koha-community.org/show_bug.cgi?id=8098 Signed-off-by: Katrin Fischer Fixed bug number. --- koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 16 ++++++ .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 60 +++++++++++++------- 2 files changed, 55 insertions(+), 21 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 c3b169d..7b0f7ca 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' %] -