mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
chore(dom) rm " "
This commit is contained in:
parent
e7108e130d
commit
802a980e86
1 changed files with 35 additions and 35 deletions
|
|
@ -73,7 +73,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* hide load image
|
||||
*/
|
||||
this.hideLoad = function() {
|
||||
DOM.hide( lImages.loading() );
|
||||
DOM.hide( lImages.loading());
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -201,10 +201,10 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
CloudCmd.getConfig(function(pConfig) {
|
||||
var lData;
|
||||
|
||||
if ( Util.isString(p.url) )
|
||||
if (Util.isString(p.url))
|
||||
p.url = decodeURI(p.url);
|
||||
|
||||
if ( p.data &&
|
||||
if (p.data &&
|
||||
!Util.isString(p.data) &&
|
||||
!Util.isArrayBuffer(p.data))
|
||||
lData = Util.stringifyJSON(p.data);
|
||||
|
|
@ -280,7 +280,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
var lRet,
|
||||
lClassList = pElement && pElement.classList;
|
||||
|
||||
if ( lClassList )
|
||||
if (lClassList )
|
||||
lRet = lClassList.contains(pClass);
|
||||
|
||||
return lRet;
|
||||
|
|
@ -539,7 +539,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
lEventProcess = lEventProcess.bind(lElement);
|
||||
|
||||
if (lRet) {
|
||||
if (Util.isString(pType) )
|
||||
if (Util.isString(pType))
|
||||
lEventProcess(
|
||||
pType,
|
||||
pListener,
|
||||
|
|
@ -761,7 +761,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
if (p.dataType !== 'text')
|
||||
/* If it's json - parse it as json */
|
||||
if (lType && Util.isContainStr(lType, TYPE_JSON) )
|
||||
if (lType && Util.isContainStr(lType, TYPE_JSON))
|
||||
lData = Util.parseJSON(lJqXHR.response) || lJqXHR.response;
|
||||
|
||||
Util.exec(p.success, lData, lJqXHR.statusText, lJqXHR);
|
||||
|
|
@ -793,15 +793,15 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* @param pFunc - onload function
|
||||
*/
|
||||
this.anyLoadOnLoad = function(pParams_a, pFunc) {
|
||||
if ( Util.isArray(pParams_a) ) {
|
||||
if (Util.isArray(pParams_a)) {
|
||||
var lParam = pParams_a.pop(),
|
||||
lFunc = function() {
|
||||
Loader.anyLoadOnLoad(pParams_a, pFunc);
|
||||
};
|
||||
|
||||
if ( Util.isString(lParam) )
|
||||
if (Util.isString(lParam))
|
||||
lParam = { src : lParam };
|
||||
else if ( Util.isArray(lParam) ) {
|
||||
else if (Util.isArray(lParam)) {
|
||||
|
||||
Loader.anyLoadInParallel(lParam, lFunc);
|
||||
}
|
||||
|
|
@ -811,7 +811,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
Loader.anyload(lParam);
|
||||
|
||||
}else
|
||||
} else
|
||||
Util.exec(pFunc);
|
||||
}
|
||||
|
||||
|
|
@ -832,11 +832,11 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
lDoneFunc = function (pCallBack) {
|
||||
Util.exec(pCallBack);
|
||||
|
||||
if ( !lDone.pop() )
|
||||
if (!lDone.pop())
|
||||
Util.exec(pFunc);
|
||||
};
|
||||
|
||||
if ( !Util.isArray(pParams_a) ) {
|
||||
if (!Util.isArray(pParams_a)) {
|
||||
pParams_a = [pParams_a];
|
||||
}
|
||||
|
||||
|
|
@ -846,7 +846,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
if (lParam) {
|
||||
lDone.push(i);
|
||||
|
||||
if (Util.isString(lParam) )
|
||||
if (Util.isString(lParam))
|
||||
lParam = { src : lParam };
|
||||
|
||||
var lFunc = lParam.func;
|
||||
|
|
@ -880,13 +880,13 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
this.anyload = function(pParams_o) {
|
||||
var i, n, lElements_a;
|
||||
|
||||
if ( !pParams_o ) return;
|
||||
if (!pParams_o ) return;
|
||||
|
||||
/* if a couple of params was
|
||||
* processing every of params
|
||||
* and quit
|
||||
*/
|
||||
if ( Util.isArray(pParams_o) ) {
|
||||
if (Util.isArray(pParams_o)) {
|
||||
lElements_a = [];
|
||||
for(i = 0, n = pParams_o.length; i < n ; i++)
|
||||
lElements_a[i] = this.anyload(pParams_o[i]);
|
||||
|
|
@ -907,7 +907,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
lStyle = pParams_o.style,
|
||||
lNotAppend = pParams_o.not_append;
|
||||
|
||||
if ( Util.isObject(lFunc) ) {
|
||||
if (Util.isObject(lFunc)) {
|
||||
lOnError = lFunc.onerror;
|
||||
lFunc = lFunc.onload;
|
||||
}
|
||||
|
|
@ -943,12 +943,12 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
if (lClass)
|
||||
lElement.className = lClass;
|
||||
|
||||
if(lSrc) {
|
||||
if (lSrc) {
|
||||
/* if work with css use href */
|
||||
if (lName === 'link') {
|
||||
lElement.href = lSrc;
|
||||
lElement.rel = 'stylesheet';
|
||||
}else
|
||||
} else
|
||||
lElement.src = lSrc;
|
||||
|
||||
/*
|
||||
|
|
@ -1054,7 +1054,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* все параметры опциональны
|
||||
*/
|
||||
this.cssLoad = function(pParams_o) {
|
||||
if ( Util.isArray(pParams_o) ) {
|
||||
if (Util.isArray(pParams_o)) {
|
||||
for(var i = 0, n = pParams_o.length; i < n; i++) {
|
||||
pParams_o[i].name = 'link';
|
||||
pParams_o[i].parent = pParams_o.parent || document.head;
|
||||
|
|
@ -1063,7 +1063,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
return Loader.anyload(pParams_o);
|
||||
}
|
||||
|
||||
else if ( Util.isString(pParams_o) )
|
||||
else if (Util.isString(pParams_o))
|
||||
pParams_o = { src: pParams_o };
|
||||
|
||||
pParams_o.name = 'link';
|
||||
|
|
@ -1199,7 +1199,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
lSelected = Cmd.getSelectedNames(lFiles),
|
||||
i, n = lSelected && lSelected.length;
|
||||
|
||||
if ( !Cmd.isCurrentFile(pCurrentFile) )
|
||||
if (!Cmd.isCurrentFile(pCurrentFile))
|
||||
pCurrentFile = null;
|
||||
|
||||
if (n > 1) {
|
||||
|
|
@ -1211,7 +1211,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
lMsg = lMsgAsk + lMsgSel + n + ' files/directoris?\n' + lName ;
|
||||
lQuery = '?files';
|
||||
}else{
|
||||
} else{
|
||||
var lType, lIsDir;
|
||||
|
||||
/* dom element passed and it is not event */
|
||||
|
|
@ -1461,13 +1461,13 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
Images.showError(jqXHR);
|
||||
};
|
||||
|
||||
if ( Util.isFunction(lParams) )
|
||||
if (Util.isFunction(lParams))
|
||||
lParams.success = Util.retExec(pParams);
|
||||
|
||||
lParams.error = lError;
|
||||
|
||||
|
||||
if ( this.isCurrentIsDir(lCurrentFile) )
|
||||
if (this.isCurrentIsDir(lCurrentFile))
|
||||
lPath += '?json';
|
||||
else if (!lParams.dataType)
|
||||
lParams.dataType = 'text';
|
||||
|
|
@ -1512,7 +1512,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
});
|
||||
};
|
||||
|
||||
if ( !Util.isObject(pCallBack) )
|
||||
if (!Util.isObject(pCallBack))
|
||||
lParams = lFunc;
|
||||
else
|
||||
lParams = {
|
||||
|
|
@ -1661,7 +1661,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
this.isCurrentFile = function(pCurrent) {
|
||||
var lRet;
|
||||
|
||||
if ( pCurrent )
|
||||
if (pCurrent )
|
||||
lRet = this.isContainClass(pCurrent, CURRENT_FILE);
|
||||
|
||||
return lRet;
|
||||
|
|
@ -1675,7 +1675,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
this.isSelected = function(pSelected) {
|
||||
var lRet;
|
||||
|
||||
if ( pSelected )
|
||||
if (pSelected )
|
||||
lRet = this.isContainClass(pSelected, SELECTED_FILE);
|
||||
|
||||
return lRet;
|
||||
|
|
@ -1701,7 +1701,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* @param pCurrentFile - current file by default
|
||||
*/
|
||||
this.getCurrentLink = function(pCurrentFile) {
|
||||
var lLink = this.getByTag( 'a', pCurrentFile || this.getCurrentFile() ),
|
||||
var lLink = this.getByTag( 'a', pCurrentFile || this.getCurrentFile()),
|
||||
|
||||
lRet = lLink.length > 0 ? lLink[0] : -1;
|
||||
|
||||
|
|
@ -1733,7 +1733,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
var lCurrent = pCurrentFile || this.getCurrentFile(),
|
||||
lLink = this.getCurrentLink( lCurrent );
|
||||
|
||||
if ( Util.isObject(lLink) )
|
||||
if (Util.isObject(lLink))
|
||||
lLink = lLink.title || lLink.textContent;
|
||||
|
||||
return lLink;
|
||||
|
|
@ -2010,7 +2010,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* @pCurrent
|
||||
*/
|
||||
this.renameCurrent = function(pCurrentFile) {
|
||||
if ( !Cmd.isCurrentFile(pCurrentFile) )
|
||||
if (!Cmd.isCurrentFile(pCurrentFile))
|
||||
pCurrentFile = null;
|
||||
|
||||
var lCurrent = pCurrentFile || Cmd.getCurrentFile(),
|
||||
|
|
@ -2018,7 +2018,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
lTo = Dialog.prompt('Rename', lFrom) || lFrom,
|
||||
lDirPath = Cmd.getCurrentDirPath();
|
||||
|
||||
if ( !Util.strCmp(lFrom, lTo) ) {
|
||||
if (!Util.strCmp(lFrom, lTo)) {
|
||||
var lFiles = {
|
||||
from : lDirPath + lFrom,
|
||||
to : lDirPath + lTo
|
||||
|
|
@ -2036,7 +2036,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* @pCurrent
|
||||
*/
|
||||
this.moveCurrent = function(pCurrentFile) {
|
||||
if ( !Cmd.isCurrentFile(pCurrentFile) )
|
||||
if (!Cmd.isCurrentFile(pCurrentFile))
|
||||
pCurrentFile = null;
|
||||
|
||||
var lCurrent = pCurrentFile || Cmd.getCurrentFile(),
|
||||
|
|
@ -2046,7 +2046,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
lToPath = Dialog.prompt('Rename/Move file "' + lName + '"', lToPath);
|
||||
|
||||
if ( lToPath && !Util.strCmp(lFromPath, lToPath) ) {
|
||||
if (lToPath && !Util.strCmp(lFromPath, lToPath)) {
|
||||
var lFiles = {
|
||||
from : lFromPath,
|
||||
to : lToPath
|
||||
|
|
@ -2070,7 +2070,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* @pCurrent
|
||||
*/
|
||||
this.copyCurrent = function(pCurrentFile) {
|
||||
if ( !Cmd.isCurrentFile(pCurrentFile) )
|
||||
if (!Cmd.isCurrentFile(pCurrentFile))
|
||||
pCurrentFile = null;
|
||||
|
||||
var lCurrent = pCurrentFile || Cmd.getCurrentFile(),
|
||||
|
|
@ -2079,7 +2079,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
lToPath = Cmd.getNotCurrentDirPath() + lName;
|
||||
lToPath = Dialog.prompt( 'Copy file "' + lName + '" to', lToPath );
|
||||
|
||||
if ( lToPath && !Util.strCmp(lFromPath, lToPath) ) {
|
||||
if (lToPath && !Util.strCmp(lFromPath, lToPath)) {
|
||||
var lFiles = {
|
||||
from : lFromPath,
|
||||
to : lToPath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue