Commit a62c5d54 authored by Romain Loth's avatar Romain Loth

locale aware doc titles sort adapted to 2 ways sort

parent 3634567c
......@@ -546,10 +546,11 @@ function Main_test(Data) {
MyTable.data('dynatable').settings.dataset.queries['docFilter'] = 'filter_all'
MyTable.data('dynatable').sorts.functions["rawtitleSort"] = function testSort (rec1,rec2) {
MyTable.data('dynatable').sorts.functions["rawtitleSort"] = function rawtitleSort (rec1,rec2, attr, direction) {
// sorts on rawtitle instead of derived docurl
// and sorts with locale-aware order
return rec1.rawtitle.localeCompare(rec2.rawtitle)
if (direction == 1) return rec1.rawtitle.localeCompare(rec2.rawtitle)
else return rec2.rawtitle.localeCompare(rec1.rawtitle)
}
MyTable.data('dynatable').process();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment