mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fix(dom) getSelectedNames: if current is ".." not select it
This commit is contained in:
parent
f8972a3a26
commit
f895f191f0
1 changed files with 15 additions and 5 deletions
|
|
@ -1370,17 +1370,27 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
};
|
||||
|
||||
this.getSelectedNames = function(selected) {
|
||||
var current, first, name, i, n,
|
||||
var current, first, name, i, n, isSelected,
|
||||
ret = [];
|
||||
|
||||
if (!selected)
|
||||
selected = this.getSelectedFiles() || [];
|
||||
|
||||
first = selected[0];
|
||||
name = this.getCurrentName(first);
|
||||
|
||||
if (name === '..')
|
||||
first = selected[0];
|
||||
|
||||
if (first) {
|
||||
name = this.getCurrentName(first);
|
||||
} else {
|
||||
first = this.getCurrentFile();
|
||||
name = this.getCurrentName(first);
|
||||
}
|
||||
|
||||
isSelected = this.isSelected(first);
|
||||
|
||||
if (name === '..' && isSelected) {
|
||||
selected.shift();
|
||||
this.toggleSelectedFile(first);
|
||||
}
|
||||
|
||||
n = selected.length;
|
||||
for (i = 0; i < n;i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue