keep original values, only use insensitive filtering, use case-sensitive sorting - jscancer - Javascript crap (relatively small)
HTML git clone git://git.codemadness.org/jscancer
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 6373051632540cfb70faf8c988faa798cabcfb70
DIR parent 9b8f9db8eb2c2a9a299ac2cf943453f2d198cbf5
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 3 Aug 2017 19:01:19 +0200
keep original values, only use insensitive filtering, use case-sensitive sorting
Diffstat:
M datatable/datatable.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
DIR diff --git a/datatable/datatable.js b/datatable/datatable.js
@@ -193,12 +193,12 @@ function datatable_data_parse(d) {
// prefer data-value attribute, else use cell contents,
// also set preprocess values to filter on cell content
// and data-value (case-insensitive).
- var s = (td.textContent || td.innerText).toLowerCase();
+ var s = td.textContent || td.innerText;
if (typeof(v) != "undefined" && v !== null) {
- fv.push([ v.toLowerCase(), s ]);
+ fv.push([ v.toLowerCase(), s.toLowerCase() ]);
values.push(d.cols[j].parsefn(v));
} else {
- fv.push([ s ]);
+ fv.push([ s.toLowerCase() ]);
values.push(d.cols[j].parsefn(s));
}
}