mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
fix(dom) this -> Cmd
This commit is contained in:
parent
284734a495
commit
0dc5ae7864
2 changed files with 27 additions and 21 deletions
|
|
@ -128,6 +128,8 @@ getJSONfromFileTable.
|
|||
|
||||
* fix(diff) rm, work bad with win line ending
|
||||
|
||||
* fix(dom) this -> Cmd
|
||||
|
||||
|
||||
2012.04.22, v0.2.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1052,9 +1052,12 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
lFiles = Cmd.getSelectedFiles(),
|
||||
lSelected = Cmd.getSelectedNames(lFiles),
|
||||
i, n = lSelected && lSelected.length;
|
||||
|
||||
if ( !Cmd.isCurrentFile(pCurrentFile) )
|
||||
pCurrentFile = null;
|
||||
|
||||
if (n > 1){
|
||||
for(i = 0; i < 5 && i < n; i++)
|
||||
for (i = 0; i < 5 && i < n; i++)
|
||||
lName += '\n' + lSelected[i];
|
||||
|
||||
if (n >= 5)
|
||||
|
|
@ -1066,12 +1069,12 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
var lType, lIsDir;
|
||||
|
||||
/* dom element passed and it is not event */
|
||||
if ( pCurrentFile && !pCurrentFile.pType)
|
||||
if (pCurrentFile && !pCurrentFile.pType)
|
||||
lCurrent = pCurrentFile;
|
||||
else
|
||||
lCurrent = this.getCurrentFile();
|
||||
lCurrent = Cmd.getCurrentFile();
|
||||
|
||||
lIsDir = this.isCurrentIsDir(lCurrent);
|
||||
lIsDir = Cmd.isCurrentIsDir(lCurrent);
|
||||
|
||||
if (lIsDir){
|
||||
lQuery = '?dir';
|
||||
|
|
@ -1082,7 +1085,7 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
|
||||
lType += ' ';
|
||||
|
||||
lName = this.getCurrentName(lCurrent);
|
||||
lName = Cmd.getCurrentName(lCurrent);
|
||||
lMsg = lMsgAsk + lMsgSel + lType + lName + '?';
|
||||
}
|
||||
|
||||
|
|
@ -1090,13 +1093,14 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
lRet = confirm(lMsg);
|
||||
else
|
||||
alert('No files selected!');
|
||||
if (lRet){
|
||||
|
||||
if (lRet) {
|
||||
var lUrl;
|
||||
|
||||
if (lCurrent)
|
||||
lUrl = this.getCurrentPath(lCurrent);
|
||||
else{
|
||||
lUrl = this.getCurrentDirPath();
|
||||
lUrl = Cmd.getCurrentPath(lCurrent);
|
||||
else {
|
||||
lUrl = Cmd.getCurrentDirPath();
|
||||
lCurrent = lFiles[0];
|
||||
}
|
||||
|
||||
|
|
@ -1671,9 +1675,9 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
* @pCurrent
|
||||
*/
|
||||
this.deleteCurrent = function(pCurrent, pNextFile, pPreviousFile, pNotSet){
|
||||
var lCurrent = pCurrent || this.getCurrentFile(),
|
||||
var lCurrent = pCurrent || Cmd.getCurrentFile(),
|
||||
lParent = lCurrent && lCurrent.parentElement,
|
||||
lName = this.getCurrentName(lCurrent);
|
||||
lName = Cmd.getCurrentName(lCurrent);
|
||||
|
||||
if (lCurrent && lParent && lName !== '..'){
|
||||
var lNext = pNextFile || lCurrent.nextSibling,
|
||||
|
|
@ -1746,13 +1750,13 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
* @pCurrent
|
||||
*/
|
||||
this.moveCurrent = function(pCurrentFile){
|
||||
if ( !this.isCurrentFile(pCurrentFile) )
|
||||
if ( !Cmd.isCurrentFile(pCurrentFile) )
|
||||
pCurrentFile = null;
|
||||
|
||||
var lCurrent = pCurrentFile || this.getCurrentFile(),
|
||||
lName = this.getCurrentName(lCurrent),
|
||||
lFromPath = this.getCurrentPath(),
|
||||
lToPath = this.getNotCurrentDirPath() + lName;
|
||||
var lCurrent = pCurrentFile || Cmd.getCurrentFile(),
|
||||
lName = Cmd.getCurrentName(lCurrent),
|
||||
lFromPath = Cmd.getCurrentPath(),
|
||||
lToPath = Cmd.getNotCurrentDirPath() + lName;
|
||||
|
||||
lToPath = prompt( 'Rename/Move file "' + lName + '"', lToPath );
|
||||
|
||||
|
|
@ -1780,13 +1784,13 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
* @pCurrent
|
||||
*/
|
||||
this.copyCurrent = function(pCurrentFile){
|
||||
if ( !this.isCurrentFile(pCurrentFile) )
|
||||
if ( !Cmd.isCurrentFile(pCurrentFile) )
|
||||
pCurrentFile = null;
|
||||
|
||||
var lCurrent = pCurrentFile || this.getCurrentFile(),
|
||||
lName = this.getCurrentName(lCurrent),
|
||||
lFromPath = this.getCurrentPath(),
|
||||
lToPath = this.getNotCurrentDirPath() + lName;
|
||||
var lCurrent = pCurrentFile || Cmd.getCurrentFile(),
|
||||
lName = Cmd.getCurrentName(lCurrent),
|
||||
lFromPath = Cmd.getCurrentPath(),
|
||||
lToPath = Cmd.getNotCurrentDirPath() + lName;
|
||||
lToPath = prompt( 'Copy file "' + lName + '" to', lToPath );
|
||||
|
||||
if ( lToPath && !Util.strCmp(lFromPath, lToPath) ){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue