mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
Merge branch '7.1' into master
This commit is contained in:
@@ -1042,24 +1042,6 @@ export const Utils = {
|
||||
return items;
|
||||
},
|
||||
|
||||
sortTraffic(items, sortBy, sortOrder) {
|
||||
let comparator;
|
||||
switch(sortOrder) {
|
||||
case 'asc':
|
||||
comparator = function(a, b) {
|
||||
return a[sortBy] < b[sortBy] ? -1 : 1;
|
||||
};
|
||||
break;
|
||||
case 'desc':
|
||||
comparator = function(a, b) {
|
||||
return a[sortBy] < b[sortBy] ? 1 : -1;
|
||||
};
|
||||
break;
|
||||
}
|
||||
items.sort(comparator);
|
||||
return items;
|
||||
},
|
||||
|
||||
/*
|
||||
* only used in the 'catch' part of a seafileAPI request
|
||||
*/
|
||||
|
Reference in New Issue
Block a user