mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(dom) changePanel: after copy/move on tab, panel changed to ".."
This commit is contained in:
parent
d842c8db5d
commit
424dc3d82c
1 changed files with 10 additions and 5 deletions
|
|
@ -698,9 +698,9 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
/**
|
||||
* get current file by name
|
||||
*/
|
||||
this.getCurrentByName = function(name) {
|
||||
this.getCurrentByName = function(name, panelParam) {
|
||||
var element,
|
||||
panel = CurrentInfo.panel;
|
||||
panel = panelParam || CurrentInfo.panel;
|
||||
|
||||
name = 'js-file-' + name;
|
||||
element = DOM.getByDataName(name, panel);
|
||||
|
|
@ -1686,7 +1686,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
};
|
||||
|
||||
this.changePanel = function() {
|
||||
var id, files,
|
||||
var id, files, name,
|
||||
Info = CurrentInfo,
|
||||
current = Info.element,
|
||||
panel = Info.panel,
|
||||
|
|
@ -1703,8 +1703,13 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
if (current)
|
||||
files = current.parentElement;
|
||||
|
||||
if (!files || !files.parentElement)
|
||||
current = filesPassive[0];
|
||||
if (!files || !files.parentElement) {
|
||||
name = DOM.getCurrentName(current);
|
||||
current = DOM.getCurrentByName(name, panel);
|
||||
|
||||
if (!current)
|
||||
current = filesPassive[0];
|
||||
}
|
||||
|
||||
DOM.setCurrentFile(current, {
|
||||
history: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue