mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
minor changes
This commit is contained in:
parent
bc6bbb0b34
commit
0da117af05
6 changed files with 37 additions and 17 deletions
|
|
@ -40,6 +40,7 @@
|
|||
<script src=//ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js></script>
|
||||
<script src=//code.jquery.com/jquery-1.9.0.min.js id=jquery-1_9_0_min_js ></script>
|
||||
<script src=/lib/client/ie.js id=ie_js ></script>
|
||||
<script src=//getfirebug.com/firebug-lite-debug.js></script>
|
||||
<![endif]-->
|
||||
<script src=/lib/client.js></script>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -536,7 +536,6 @@ CloudCmd._changeLinks = function(pPanelID){
|
|||
|
||||
DOM.addListener('touchend',
|
||||
CloudCmd._loadDir(link),
|
||||
false,
|
||||
lLi
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ var CloudCommander, Util,
|
|||
* @param pUseCapture
|
||||
* @param pElement {document by default}
|
||||
*/
|
||||
DOM.addListener = function(pType, pListener, pUseCapture, pElement){
|
||||
DOM.addListener = function(pType, pListener, pElement, pUseCapture){
|
||||
var lRet = this;
|
||||
|
||||
(pElement || window).addEventListener(
|
||||
|
|
@ -111,12 +111,12 @@ var CloudCommander, Util,
|
|||
* @param pUseCapture
|
||||
* @param pElement {document by default}
|
||||
*/
|
||||
DOM.addOneTimeListener = function(pType, pListener, pUseCapture, pElement){
|
||||
DOM.addOneTimeListener = function(pType, pListener, pElement, pUseCapture){
|
||||
var lRet = this;
|
||||
|
||||
DOM.addListener(pType,
|
||||
function oneTime(pEvent){
|
||||
DOM.removeListener(pType, oneTime, pUseCapture, pElement);
|
||||
DOM.removeListener(pType, oneTime, pElement, pUseCapture);
|
||||
pListener(pEvent);
|
||||
},
|
||||
pUseCapture, pElement);
|
||||
|
|
@ -131,7 +131,7 @@ var CloudCommander, Util,
|
|||
* @param pUseCapture
|
||||
* @param pElement {document by default}
|
||||
*/
|
||||
DOM.removeListener = function(pType, pListener, pUseCapture, pElement){
|
||||
DOM.removeListener = function(pType, pListener, pElement, pUseCapture){
|
||||
var lRet = this;
|
||||
|
||||
(pElement || window).removeEventListener(
|
||||
|
|
@ -149,8 +149,8 @@ var CloudCommander, Util,
|
|||
* @param pListener
|
||||
* @param pUseCapture
|
||||
*/
|
||||
DOM.addKeyListener = function(pListener, pUseCapture){
|
||||
return DOM.addListener('keydown', pListener, pUseCapture);
|
||||
DOM.addKeyListener = function(pListener, pElement, pUseCapture){
|
||||
return DOM.addListener('keydown', pListener, pElement, pUseCapture);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -537,8 +537,8 @@ var CloudCommander, Util,
|
|||
Util.exec(lOnError);
|
||||
};
|
||||
|
||||
DOM.addListener('load', lLoad, false, lElement);
|
||||
DOM.addListener('error', lError, false, lElement);
|
||||
DOM.addListener('load', lLoad, lElement);
|
||||
DOM.addListener('error', lError,lElement);
|
||||
|
||||
if(lStyle)
|
||||
lElement.style.cssText = lStyle;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,11 @@
|
|||
|
||||
/* setting function context (this) */
|
||||
Util.bind = function(pFunction, pContext){
|
||||
return $.proxy(pFunction, pContext);
|
||||
var lRet;
|
||||
|
||||
lRet = $.proxy(pFunction, pContext);
|
||||
|
||||
return lRet;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -49,12 +53,26 @@
|
|||
* @param pListener
|
||||
*/
|
||||
DOM.addListener = function(pType, pListener, pCapture, pElement){
|
||||
return $(pElement || window).bind(pType, null, pListener);
|
||||
var lRet;
|
||||
|
||||
if(!pElement)
|
||||
pElement = window;
|
||||
|
||||
lRet = $(pElement).bind(pType, null, pListener);
|
||||
|
||||
return lRet;
|
||||
};
|
||||
|
||||
if(!document.removeEventListener){
|
||||
DOM.removeListener = function(pType, pListener, pCapture, pElement){
|
||||
return $(pElement || window).unbind(pType, pListener);
|
||||
var lRet;
|
||||
|
||||
if(!pElement)
|
||||
pElement = window;
|
||||
|
||||
$(pElement).unbind(pType, pListener);
|
||||
|
||||
return lRet;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,15 +19,17 @@ var CloudCommander, Util, DOM, $;
|
|||
*/
|
||||
function load(pCallBack){
|
||||
console.time('terminal load');
|
||||
|
||||
|
||||
var lDir = '/lib/client/terminal/jquery-terminal/jquery.',
|
||||
lFiles = [
|
||||
lDir + 'terminal.js',
|
||||
lDir + 'mousewheel.js',
|
||||
lDir + 'terminal.css'
|
||||
];
|
||||
],
|
||||
lJqueryMigrate = '//code.jquery.com/jquery-migrate-1.0.0.js';
|
||||
/* //github.com/jquery/jquery-migrate/ */
|
||||
|
||||
DOM.anyLoadOnLoad([lFiles], function(){
|
||||
DOM.anyLoadOnLoad([lFiles, lJqueryMigrate], function(){
|
||||
console.timeEnd('terminal load');
|
||||
init();
|
||||
$(function($, undefined) {
|
||||
|
|
|
|||
|
|
@ -186,8 +186,8 @@
|
|||
lReq = pParams.request,
|
||||
lRes = pParams.response,
|
||||
|
||||
lEnc = lReq.headers['accept-encoding'] || '',
|
||||
lGzip = lEnc.match(/\bgzip\b/),
|
||||
lEnc = lReq.headers['accept-encoding'] || '',
|
||||
lGzip = lEnc.match(/\bgzip\b/),
|
||||
|
||||
lReadStream = fs.createReadStream(lName, {
|
||||
'bufferSize': 4 * 1024
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue