Bugzilla – Attachment 32019 Details for
Bug 12987
Update table footer with the visible rows
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12987: Fix remove all what is not number
Bug-12987-Fix-remove-all-what-is-not-number.patch (text/plain), 1.08 KB, created by
Jonathan Druart
on 2014-10-06 18:19:52 UTC
(
hide
)
Description:
Bug 12987: Fix remove all what is not number
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-10-06 18:19:52 UTC
Size:
1.08 KB
patch
obsolete
>From 1c371e18b4eff412054448378ab837287b5b0449 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 6 Oct 2014 20:17:46 +0200 >Subject: [PATCH] Bug 12987: Fix remove all what is not number > >The regex was wrong, to calculate a total, we should keep number (0-9) >and minus sign (-). All others characters should be removed. >--- > koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >index 838f27e..92abf10 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >@@ -616,7 +616,7 @@ function footer_column_sum( api, column_numbers ) { > if ( isNaN(i) ) return 0; > return i; > } else if ( typeof i === 'string' ) { >- var value = i.replace(/[a-zA-Z ,.]/g, '')*1; >+ var value = i.replace(/[^-0-9]/g, '')*1; > if ( isNaN(value) ) return 0; > return value; > } >-- >2.1.0
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 12987
:
31853
|
31854
|
31976
|
32019
|
32094
|
32095
|
32812
|
32813
|
32814
|
32815