mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
removed unSetCurrentFile
This commit is contained in:
parent
f397a9930d
commit
64008f0aae
1 changed files with 7 additions and 19 deletions
|
|
@ -68,7 +68,6 @@ CloudCommander.keyBinding = (function(){
|
|||
|
||||
Util.setCurrentFile(lFirstFileOnList);
|
||||
}
|
||||
Util.unSetCurrentFile(lCurrentFile);
|
||||
|
||||
}catch(error){console.log(error);}
|
||||
|
||||
|
|
@ -121,9 +120,8 @@ CloudCommander.keyBinding = (function(){
|
|||
*/
|
||||
if(lCurrentFile.previousSibling &&
|
||||
lCurrentFile.previousSibling.className!=='fm_header' ){
|
||||
/* убираем выделение с текущего элемента */
|
||||
Util.unSetCurrentFile(lCurrentFile);
|
||||
/* и выделяем предыдущую строку*/
|
||||
|
||||
/* выделяем предыдущую строку*/
|
||||
Util.setCurrentFile(lCurrentFile.previousSibling);
|
||||
|
||||
/* scrolling to current file*/
|
||||
|
|
@ -144,11 +142,7 @@ CloudCommander.keyBinding = (function(){
|
|||
if(!lCurrentFile)return;
|
||||
|
||||
/* если это не последняя строка */
|
||||
if(lCurrentFile.nextSibling){
|
||||
|
||||
/* убираем с него выделение */
|
||||
Util.unSetCurrentFile(lCurrentFile);
|
||||
|
||||
if(lCurrentFile.nextSibling){
|
||||
/* выделяем следующую строку*/
|
||||
Util.setCurrentFile(lCurrentFile.nextSibling);
|
||||
|
||||
|
|
@ -165,15 +159,13 @@ CloudCommander.keyBinding = (function(){
|
|||
*/
|
||||
else if(event.keyCode === lKEY.HOME){
|
||||
lCurrentFile = Util.getCurrentFile();
|
||||
/* убираем выделение с текущего файла*/
|
||||
Util.unSetCurrentFile(lCurrentFile);
|
||||
/* получаем первый элемент
|
||||
* пропускаем путь и заголовки столбиков
|
||||
* пропускаем путь и заголовки столбиков
|
||||
* выделяем верхий файл
|
||||
*/
|
||||
Util.setCurrentFile(lCurrentFile
|
||||
.parentElement.firstElementChild
|
||||
.nextElementSibling.nextElementSibling);
|
||||
Util.setCurrentFile(lCurrentFile
|
||||
.parentElement.firstElementChild
|
||||
.nextElementSibling.nextElementSibling);
|
||||
|
||||
/* move scrollbar to top */
|
||||
Util.getPanel().scrollByLines(-100000000000000);
|
||||
|
|
@ -186,8 +178,6 @@ CloudCommander.keyBinding = (function(){
|
|||
*/
|
||||
else if( event.keyCode === lKEY.END){
|
||||
lCurrentFile = Util.getCurrentFile();
|
||||
/* снимаем выделение с текущего файла*/
|
||||
Util.unSetCurrentFile(lCurrentFile);
|
||||
/* выделяем самый нижний файл */
|
||||
Util.setCurrentFile(lCurrentFile
|
||||
.parentElement.lastElementChild);
|
||||
|
|
@ -210,7 +200,6 @@ CloudCommander.keyBinding = (function(){
|
|||
|
||||
lCurrentFile = lCurrentFile.nextSibling;
|
||||
}
|
||||
Util.unSetCurrentFile(Util.getCurrentFile());
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
|
||||
event.preventDefault();//запрет на дальнейшее действие
|
||||
|
|
@ -237,7 +226,6 @@ CloudCommander.keyBinding = (function(){
|
|||
}
|
||||
lCurrentFile = lCurrentFile.previousSibling;
|
||||
}
|
||||
Util.unSetCurrentFile(Util.getCurrentFile());
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
|
||||
event.preventDefault();//запрет на дальнейшее действие
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue