mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fixed bug in setCurentFile
This commit is contained in:
parent
7634365a95
commit
d748bf3b06
2 changed files with 13 additions and 21 deletions
26
client.js
26
client.js
|
|
@ -652,24 +652,16 @@ CloudClient.Util = (function(){
|
|||
}
|
||||
var lCurrentFileWas = this.getCurrentFile();
|
||||
|
||||
var lClass = pCurrentFile.className;
|
||||
if (lClass !== 'path' &&
|
||||
lClass !== 'fm_header'){
|
||||
if(lCurrentFileWas)
|
||||
this.unSetCurrentFile(lCurrentFileWas);
|
||||
|
||||
pCurrentFile.className = CloudCommander.CURRENT_FILE;
|
||||
} else {
|
||||
this.addCloudStatus({
|
||||
code : -2,
|
||||
msg : 'Error pCurrentFile in' +
|
||||
'setCurrentFile' +
|
||||
'could not be ' +
|
||||
'path or fm_header'
|
||||
});
|
||||
if (pCurrentFile.className === 'path')
|
||||
pCurrentFile = pCurrentFile.nextSibling;
|
||||
|
||||
if (pCurrentFile.className == 'fm_header')
|
||||
pCurrentFile = pCurrentFile.nextSibling;
|
||||
|
||||
if(lCurrentFileWas)
|
||||
this.unSetCurrentFile(lCurrentFileWas);
|
||||
|
||||
lRet_b = false;
|
||||
}
|
||||
pCurrentFile.className = CloudCommander.CURRENT_FILE;
|
||||
|
||||
return lRet_b;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -196,8 +196,8 @@ var CloudCommander;
|
|||
* пропускаем путь и заголовки столбиков
|
||||
* выделяем верхий файл
|
||||
*/
|
||||
lCurrentFile = lCurrentFile
|
||||
.parentElement.children[2];
|
||||
lCurrentFile = lCurrentFile.
|
||||
parentElement.firstChild;
|
||||
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
|
||||
|
|
@ -212,8 +212,8 @@ var CloudCommander;
|
|||
*/
|
||||
else if( event.keyCode === lKEY.END){
|
||||
/* выделяем самый нижний файл */
|
||||
lCurrentFile = lCurrentFile
|
||||
.parentElement.lastElementChild;
|
||||
lCurrentFile = lCurrentFile.
|
||||
parentElement.lastElementChild;
|
||||
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue