mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
refactor(listeners) changeLinks
This commit is contained in:
parent
6eaf96e0c1
commit
64cc13db1b
1 changed files with 9 additions and 9 deletions
|
|
@ -106,7 +106,7 @@ var Util, DOM, CloudCmd;
|
|||
},
|
||||
|
||||
/* right mouse click function varible */
|
||||
lOnContextMenu_f = function(pEvent) {
|
||||
onContextMenu = function(pEvent) {
|
||||
var target,
|
||||
isFunc = Util.isFunction(CloudCmd.Menu),
|
||||
ret = true,
|
||||
|
|
@ -139,7 +139,7 @@ var Util, DOM, CloudCmd;
|
|||
* download file from browser to descktop
|
||||
* in Chrome (HTML5)
|
||||
*/
|
||||
lOnDragStart_f = function(pEvent) {
|
||||
onDragStart = function(pEvent) {
|
||||
var lElement = pEvent.target,
|
||||
EXT = 'json',
|
||||
isDir = Info.isDir,
|
||||
|
|
@ -158,7 +158,7 @@ var Util, DOM, CloudCmd;
|
|||
lLink);
|
||||
},
|
||||
|
||||
lSetCurrentFile_f = function(pEvent) {
|
||||
setCurrentFile = function(pEvent) {
|
||||
var pElement = pEvent.target,
|
||||
lTag = pElement.tagName;
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ var Util, DOM, CloudCmd;
|
|||
filesElement = DOM.getByClass('files', lPanel)[0],
|
||||
files = filesElement.children,
|
||||
lUrl = CloudCmd.HOST,
|
||||
lLoadDirOnce = CloudCmd.loadDir();
|
||||
loadDirOnce = CloudCmd.loadDir();
|
||||
|
||||
/* ставим загрузку гифа на клик*/
|
||||
Events.addClick(CloudCmd.refresh, refresh);
|
||||
|
|
@ -198,9 +198,9 @@ var Util, DOM, CloudCmd;
|
|||
ai = a[i],
|
||||
|
||||
Events.add({
|
||||
'mousedown' : lSetCurrentFile_f,
|
||||
'contextmenu' : lOnContextMenu_f,
|
||||
'dragstart' : lOnDragStart_f
|
||||
'mousedown' : setCurrentFile,
|
||||
'contextmenu' : onContextMenu,
|
||||
'dragstart' : onDragStart
|
||||
}, current);
|
||||
|
||||
/* если на файл, а не на папку */
|
||||
|
|
@ -210,8 +210,8 @@ var Util, DOM, CloudCmd;
|
|||
}, current);
|
||||
else
|
||||
Events.add({
|
||||
'dblclick' : lLoadDirOnce,
|
||||
'touchend' : lLoadDirOnce,
|
||||
'dblclick' : loadDirOnce,
|
||||
'touchend' : loadDirOnce,
|
||||
'click' : DOM.preventDefault,
|
||||
}, current);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue