Fix sort issue with folders
parent
f3cf848c84
commit
60e9efdd3b
|
@ -2904,10 +2904,12 @@ define([
|
|||
var el = useId ? _el : root[_el];
|
||||
var sfId = (el && el.root && el.key) ? el.root[el.key] : el;
|
||||
if (folder && el && manager.isSharedFolder(sfId)) {
|
||||
var title = manager.getSharedFolderData(sfId).title || el;
|
||||
var sfData = manager.getSharedFolderData(sfId);
|
||||
var title = sfData.title || sfData.lastTitle || el;
|
||||
return String(title).toLowerCase();
|
||||
} else if (folder) {
|
||||
return String((el && el.key) || el).toLowerCase();
|
||||
console.log(el);
|
||||
return String((el && el.key) || _el).toLowerCase();
|
||||
}
|
||||
var data = manager.getFileData(el);
|
||||
if (!data) { return ''; }
|
||||
|
@ -2928,6 +2930,7 @@ define([
|
|||
}
|
||||
props[uid] = getProp(k);
|
||||
});
|
||||
if (folder) { console.error(useId, props); }
|
||||
keys.sort(function(a, b) {
|
||||
var _a = props[(a && a.uid) || a];
|
||||
var _b = props[(b && b.uid) || b];
|
||||
|
|
|
@ -926,9 +926,8 @@ define([
|
|||
if (!resolved.id) {
|
||||
var el = Env.user.userObject.find(resolved.path);
|
||||
if (Env.user.userObject.isSharedFolder(el) && Env.folders[el]) {
|
||||
var oldName = Env.folders[el].proxy.metadata.title;
|
||||
Env.folders[el].proxy.metadata.title = data.newName;
|
||||
Env.user.proxy[UserObject.SHARED_FOLDERS][el].lastTitle = oldName;
|
||||
Env.user.proxy[UserObject.SHARED_FOLDERS][el].lastTitle = data.newName;
|
||||
return void cb();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue