fix file sorting problem.

fix https://github.com/kalcaddle/KodExplorer/issues/251
pull/275/head
warlee 2018-01-22 18:39:06 +08:00 committed by GitHub
parent 0b88917b40
commit eaac64d7c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -252,7 +252,9 @@ var Cookie = (function(){
var cookieArray=document.cookie.split("; ");
for (var i=0;i<cookieArray.length;i++){
var arr=cookieArray[i].split("=");
data[arr[0]] = unescape(arr[1]);
if( typeof(data[arr[0]]) == 'undefined' ){
data[arr[0]] = unescape(arr[1]);
}
}
return data;
}
@ -650,10 +652,10 @@ var pathTools = (function(){
if(a==undefined || b==undefined){
return 0;
}
if(typeof(a) == "number" && typeof(b) == "number"){
if($.isNumeric(a) && $.isNumeric(b)){
a = parseFloat(a);b = parseFloat(b);
return a>b?1:(a==b?0:-1);
}
var re = /([0-9\.]+)/g, // /(-?[0-9\.]+)/g, 负数 2016-11-09 2016-11-10歧义
x = a.toString().toLowerCase() || '',
y = b.toString().toLowerCase() || '',