mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
minor changes
This commit is contained in:
parent
f31b370ed6
commit
21ce3358f3
1 changed files with 15 additions and 3 deletions
|
|
@ -619,6 +619,7 @@ CloudCmd._createFileTable = function(pElem, pJSON, pSetCurrent){
|
|||
/* getting current element if was refresh */
|
||||
lPath = DOM.getByClass('path', lElem),
|
||||
lCurrent = DOM.getCurrentFile(),
|
||||
lName = DOM.getCurrentName(lName),
|
||||
lWasRefresh_b = lPath[0].textContent === pJSON[0].path;
|
||||
|
||||
/* говорим построителю,
|
||||
|
|
@ -636,11 +637,22 @@ CloudCmd._createFileTable = function(pElem, pJSON, pSetCurrent){
|
|||
|
||||
/* searching current file */
|
||||
if(lWasRefresh_b){
|
||||
for(i = 0; i < lElem.childNodes.length; i++)
|
||||
if(lElem.childNodes[i].textContent === lCurrent.textContent){
|
||||
lCurrent = lElem.childNodes[i];
|
||||
var lFound, n = lElem.childNodes.length;
|
||||
for(i = 2; i < n ; i++){
|
||||
var lVarCurrent = lElem.childNodes[i],
|
||||
lVarName = DOM.getCurrentName(lVarCurrent);
|
||||
|
||||
lFound = lVarName === lName;
|
||||
|
||||
if(lFound){
|
||||
lCurrent = lElem.childNodes[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!lFound) /* .. */
|
||||
lCurrent = lElem.childNodes[2];
|
||||
|
||||
DOM.setCurrentFile(lCurrent);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue