1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-01 23:38:37 +00:00

Modify variable name

This commit is contained in:
zxj96 2019-05-30 16:01:18 +08:00
parent f7dee15902
commit d485c2c58a
3 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ class Dirent {
this.isSelected = false; // is check or not
this.starred = json.starred || false;
if (json.type === 'file') {
this.initialSize = json.size;
this.size_original = json.size;
this.size = Utils.bytesToSize(json.size);
this.is_locked = json.is_locked || false;
this.lock_time = json.lock_time || '';

View File

@ -5,7 +5,7 @@ class Repo {
this.repo_id = object.repo_id;
this.repo_name = object.repo_name;
this.permission = object.permission;
this.initialSize = object.size;
this.size_original = object.size;
this.size = Utils.bytesToSize(object.size);
this.owner_name = object.owner_name;
this.owner_email = object.owner_email;

View File

@ -622,7 +622,7 @@ export const Utils = {
let result = _this.compareTwoWord(a.repo_name, b.repo_name);
return result;
}
return a.initialSize < b.initialSize ? -1 : 1;
return a.size_original < b.size_original ? -1 : 1;
};
break;
case 'size-desc':
@ -632,7 +632,7 @@ export const Utils = {
return -result;
}
return a.initialSize < b.initialSize ? 1 : -1;
return a.size_original < b.size_original ? 1 : -1;
};
break;
}
@ -674,7 +674,7 @@ export const Utils = {
let result = _this.compareTwoWord(a.name, b.name);
return result;
}
return a.initialSize < b.initialSize ? -1 : 1;
return a.size_original < b.size_original ? -1 : 1;
};
break;
case 'size-desc':
@ -683,7 +683,7 @@ export const Utils = {
let result = _this.compareTwoWord(a.name, b.name);
return -result;
}
return a.initialSize < b.initialSize ? 1 : -1;
return a.size_original < b.size_original ? 1 : -1;
};
break;
}