Ignore case on sorting.
This commit is contained in:
parent
5af10b1061
commit
8f38c09c2e
|
@ -249,7 +249,16 @@ Scholar.ItemTreeView.prototype.sort = function()
|
||||||
{
|
{
|
||||||
function columnSort(a,b)
|
function columnSort(a,b)
|
||||||
{
|
{
|
||||||
return (a.getField(column.id) > b.getField(column.id)) ? -1 : (a.getField(column.id) < b.getField(column.id)) ? 1 : 0;
|
var fieldA = a.getField(column.id);
|
||||||
|
var fieldB = b.getField(column.id);
|
||||||
|
|
||||||
|
if(typeof fieldA == 'string')
|
||||||
|
{
|
||||||
|
fieldA = fieldA.toLowerCase();
|
||||||
|
fieldB = fieldB.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
return (fieldA > fieldB) ? -1 : (fieldA < fieldB) ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user