mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 18:23:35 +00:00
refactored
This commit is contained in:
parent
5eaf783c83
commit
856d9bb293
7 changed files with 60 additions and 117 deletions
|
|
@ -236,32 +236,14 @@ CloudClient._setCurrent = function(){
|
|||
* вызоветься _loadDir
|
||||
*/
|
||||
return function(pFromEnter){
|
||||
var lCurrentFile = DOM.getCurrentFile();
|
||||
if(lCurrentFile){/* устанавливаем курсор на файл, на который нажали */
|
||||
DOM.setCurrentFile(this);
|
||||
//if (DOM.isCurrentFile(this) &&
|
||||
// !Util.isBoolean(pFromEnter)){
|
||||
//var lParent = this;
|
||||
|
||||
//setTimeout(function(){
|
||||
/* waiting a few seconds
|
||||
* and if classes still equal
|
||||
* make file name editable
|
||||
* in other case
|
||||
* double click event happend
|
||||
*/
|
||||
// if(DOM.getCurrentFile() === lParent)
|
||||
// CloudClient._editFileName(lParent);
|
||||
// },1000);
|
||||
//}
|
||||
}
|
||||
var lCurrent = DOM.getCurrentFile();
|
||||
/* если мы попали сюда с энтера */
|
||||
if(pFromEnter===true){
|
||||
var lResult = Util.exec( Util.bind(this.ondblclick, this) );
|
||||
var lResult = Util.exec( Util.bind(lCurrent.ondblclick, lCurrent) );
|
||||
/* enter pressed on file */
|
||||
if(!lResult){
|
||||
var lA = DOM.getCurrentLink(this);
|
||||
Util.exec( Util.bind(lA.ondblclick, this) );
|
||||
var lA = DOM.getCurrentLink(lCurrent);
|
||||
Util.exec( Util.bind(lA.ondblclick, lCurrent) );
|
||||
}
|
||||
}/* если мы попали сюда от клика мышки */
|
||||
else
|
||||
|
|
@ -603,7 +585,7 @@ CloudClient._changeLinks = function(pPanelID){
|
|||
a[i].onclick = CloudClient._loadDir(link);
|
||||
}
|
||||
else {
|
||||
lLi.onclick = CloudClient._setCurrent();
|
||||
lLi.onclick = CloudClient._setCurrent();
|
||||
lLi.onmousedown = lSetCurrentFile_f;
|
||||
a[i].ondragstart = lOnDragStart_f;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue