mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
minor changes
This commit is contained in:
parent
42d5d19e72
commit
9e1ae89ffc
8 changed files with 40 additions and 34 deletions
10
client.js
10
client.js
|
|
@ -635,11 +635,11 @@ CloudClient._changeLinks = function(pPanelID){
|
|||
if(a[i].target !== '_blank'){
|
||||
lLi.ondblclick = CloudClient._loadDir(link);
|
||||
|
||||
var lListener = lLi.addEventListener;
|
||||
if(lListener)
|
||||
lLi.addEventListener('touchend',
|
||||
CloudClient._loadDir(link),
|
||||
false);
|
||||
DOM.addListener('touchend',
|
||||
CloudClient._loadDir(link),
|
||||
false,
|
||||
lLi
|
||||
);
|
||||
}
|
||||
|
||||
lLi.id = (a[i].title ? a[i].title : a[i].textContent) +
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ var CloudCommander, $, Util, DOM, CloudFunc;
|
|||
* @param pListener
|
||||
* @param pUseCapture
|
||||
*/
|
||||
DOM.addListener = function(pType, pListener, pUseCapture){
|
||||
return document.addEventListener(
|
||||
DOM.addListener = function(pType, pListener, pUseCapture, pElement){
|
||||
return (pElement || document).addEventListener(
|
||||
pType,
|
||||
pListener,
|
||||
pUseCapture || false
|
||||
|
|
@ -635,9 +635,16 @@ var CloudCommander, $, Util, DOM, CloudFunc;
|
|||
return lLink;
|
||||
};
|
||||
|
||||
/* function getting panel active, or passive
|
||||
* @pPanel_o = {active: true}
|
||||
*/
|
||||
/** function getting FM
|
||||
* @param pPanel_o = {active: true}
|
||||
*/
|
||||
DOM.getFM = function(){
|
||||
return DOM.getPanel().parentElement;
|
||||
};
|
||||
|
||||
/** function getting panel active, or passive
|
||||
* @param pPanel_o = {active: true}
|
||||
*/
|
||||
DOM.getPanel = function(pActive){
|
||||
var lPanel = DOM.getCurrentFile().parentElement;
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ var CloudCommander, Util, DOM, CloudFunc, CodeMirror;
|
|||
};
|
||||
|
||||
/* добавляем обработчик клавишь */
|
||||
DOM.addKeyListener(lKeyListener);
|
||||
DOM.addKeyListener( lKeyListener );
|
||||
};
|
||||
|
||||
cloudcmd.Editor.CodeMirror = CodeMirrorEditor;
|
||||
|
|
|
|||
|
|
@ -200,9 +200,10 @@ var CloudCommander, Util, DOM, CloudFunc, $;
|
|||
Menu.Keys = function(pPosition){
|
||||
Position = pPosition;
|
||||
|
||||
DOM.jqueryLoad(function(){
|
||||
Util.loadOnLoad([Menu.show, load]);
|
||||
});
|
||||
DOM.jqueryLoad( Util.retLoadOnLoad([
|
||||
Menu.show,
|
||||
load
|
||||
]));
|
||||
|
||||
var lFunc = document.oncontextmenu;
|
||||
document.oncontextmenu = function(){
|
||||
|
|
|
|||
|
|
@ -92,9 +92,11 @@ var CloudCommander, Util, DOM, $, Github;
|
|||
};
|
||||
|
||||
cloudcmd.Storage.Keys = function(){
|
||||
DOM.jqueryLoad(function(){
|
||||
Util.loadOnLoad([ init, setConfig, load ]);
|
||||
});
|
||||
DOM.jqueryLoad( Util.retLoadOnLoad([
|
||||
init,
|
||||
setConfig,
|
||||
load
|
||||
]));
|
||||
};
|
||||
|
||||
cloudcmd.Storage.Github = GithubStore;
|
||||
|
|
|
|||
|
|
@ -56,18 +56,13 @@ var CloudCommander, Util, DOM, $;
|
|||
* function do basic initialization
|
||||
*/
|
||||
function init(){
|
||||
if(!TerminalId){
|
||||
var lFM = DOM.getById('fm');
|
||||
if(lFM)
|
||||
TerminalId = DOM.anyload({
|
||||
name : 'div',
|
||||
id : 'terminal',
|
||||
className : 'panel',
|
||||
parent : lFM
|
||||
});
|
||||
}
|
||||
else
|
||||
console.log('Error. Something went wrong FM not found');
|
||||
if(!TerminalId)
|
||||
TerminalId = DOM.anyload({
|
||||
name : 'div',
|
||||
id : 'terminal',
|
||||
className : 'panel',
|
||||
parent : DOM.getFM()
|
||||
});
|
||||
}
|
||||
|
||||
/* PUBLIC FUNCTIONS */
|
||||
|
|
|
|||
|
|
@ -197,9 +197,10 @@ var CloudCommander, Util, DOM, CloudFunc, $;
|
|||
};
|
||||
|
||||
cloudcmd.Viewer.Keys = function(){
|
||||
DOM.jqueryLoad(function(){
|
||||
Util.loadOnLoad([FancyBox.show, FancyBox.load]);
|
||||
});
|
||||
DOM.jqueryLoad( Util.retLoadOnLoad([
|
||||
FancyBox.show,
|
||||
FancyBox.load
|
||||
]));
|
||||
|
||||
/* добавляем обработчик клавишь */
|
||||
DOM.addKeyListener(function(){
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ var Util, exports;
|
|||
data : pData,
|
||||
callback : lCallBack
|
||||
};
|
||||
|
||||
|
||||
Util.exec(lFunc , pData || lCallBack);
|
||||
}
|
||||
};
|
||||
|
|
@ -225,7 +225,7 @@ var Util, exports;
|
|||
return lRet;
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* function gets time
|
||||
*/
|
||||
Util.getTime = function(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue