Changeset 1889
- Timestamp:
- 12/23/09 09:51:15 (14 years ago)
- Location:
- sandbox/filemanager
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/inc/class.uifilemanager.inc.php
r1880 r1889 477 477 } 478 478 479 # main action switch480 // FIXME this will become a switch481 479 if($this->newfile_x && $this->newfile_or_dir) // create new textfile 482 480 { 483 481 $this->createfile(); 484 }485 elseif($this->copy_to_x)486 {487 $this->copyTo();488 }489 elseif($this->move_to_x)490 {491 $this->moveTo();492 482 } 493 483 elseif($this->edit_cancel_x) … … 752 742 // end file count 753 743 } 754 755 # Handle Moving Files and Directories756 function moveTo()757 {758 if(!$this->to)759 {760 $this->messages[] = lang('Error:').lang('Could not move file because no destination directory is given ', $this->disppath.'/'.$file);761 762 }763 else764 {765 $this->to = $this->bo->fakebase.'/'.$this->to;766 while(list($num, $file) = each($this->fileman))767 {768 if($this->bo->vfs->mv(array(769 'from' => $this->from . '/' . $file,770 'to' => $this->to . '/' . $file,771 'relatives' => array(RELATIVE_NONE, RELATIVE_NONE)772 )))773 {774 $moved++;775 $this->messages[0]=lang('Files moved to %1 successfuly',$this->to);776 }777 else778 {779 $this->messages[] = lang('Error:').lang('Could not move %1 to %2', $file, $this->to);780 }781 }782 }783 784 if($moved)785 {786 $x=0;787 }788 789 $this->readFilesInfo();790 $this->filelisting();791 }792 793 // Handle Copying of Files and Directories794 function copyTo()795 {796 if(!$this->to)797 {798 $this->messages[] = lang('Error:').lang('Could not copy file because no destination directory is given ');799 800 }801 else802 {803 $this->to = $this->bo->fakebase.'/'.$this->to;804 while(list($num, $file) = each($this->fileman))805 {806 if($this->bo->vfs->cp(array(807 'from' => $this->from . '/' . $file,808 'to' => $this->to . '/' . $file,809 'relatives' => array(RELATIVE_NONE, RELATIVE_NONE)810 )))811 {812 $copied++;813 $this->messages[0] = lang('Files Copied to %1 successfuly', $this->to);814 }815 else816 {817 $this->messages[] = lang('Error:').lang('Could not copy %1',$file);818 }819 }820 }821 if($copied)822 823 {824 $x=0;825 }826 827 $this->readFilesInfo();828 $this->filelisting();829 }830 831 744 function removedir() 832 745 { -
sandbox/filemanager/inc/class.vfs_functions.inc.php
r1880 r1889 28 28 'archive'=>True, 29 29 'unarchive'=>True, 30 'copyto'=>True, 31 'moveto'=>True, 30 32 'summary' => True 31 33 ); … … 345 347 } 346 348 } 349 # Handle Moving Files and Directories 350 function moveto() 351 { 352 if(!$this->to) 353 { 354 echo "NODIR|"; 355 return; 356 } 357 else 358 { 359 $this->from = base64_decode($this->from); 360 while(list($num, $file) = each($this->fileman)) 361 { 362 if($this->bo->vfs->mv(array( 363 'from' => $this->from . '/' . $file, 364 'to' => $this->to . '/' . $file, 365 'relatives' => array(RELATIVE_NONE, RELATIVE_NONE) 366 ))) 367 $moved++; 368 else 369 $error++; 370 } 371 } 372 if($error > 0){ 373 echo "SOMEERROR|".$error; 374 return; 375 } 376 if($moved > 0) 377 echo "MOVED|".$moved; 378 } 379 380 // Handle Copying of Files and Directories 381 function copyto() 382 { 383 if(!$this->to) 384 { 385 echo "NODIR|"; 386 return; 387 } 388 else 389 { 390 $this->from = base64_decode($this->from); 391 while(list($num, $file) = each($this->fileman)) 392 { 393 if($this->bo->vfs->cp(array( 394 'from' => $this->from . '/' . $file, 395 'to' => $this->to . '/' . $file, 396 'relatives' => array(RELATIVE_NONE, RELATIVE_NONE) 397 ))) 398 $copied++; 399 else 400 $error++; 401 } 402 } 403 if($error > 0){ 404 echo "SOMEERROR|".$error; 405 return; 406 } 407 if($copied > 0) 408 echo "COPIED|".$copied; 409 } 410 347 411 # Handle Renaming Files and Directories 348 412 function rename() -
sandbox/filemanager/js/common_functions.js
r1886 r1889 85 85 return null; 86 86 ret = ""; 87 for ( var i=0; i < data.length; i++ )87 for ( var i=0;(i < data.length && data.charCodeAt(i) > 31); i++ ) 88 88 { 89 89 ret += String.fromCharCode(data.charCodeAt(i) ^ sec_key.charCodeAt(i)); -
sandbox/filemanager/js/draw_api.js
r1888 r1889 523 523 } 524 524 var elements = new Array(); 525 inputEl = document.getElementById('content_folders'); 526 for(i=0; i< inputEl.childNodes.length; i++) 525 for(i=0; i< folders.length; i++) 527 526 { 528 if (inputEl.childNodes[i].nodeName != 'SPAN')529 continue;530 527 elements[i] = new Array(); 531 elements[i]['text']= inputEl.childNodes[i].innerHTML;528 elements[i]['text']=folders[i]; 532 529 address = document.location.toString(); 533 530 address = address.split("&"); 534 elements[i]['url'] = address[0]+ 535 "&"+escape(arg)+".x=10"+ 536 "&from="+base64_encode(currentPath)+ 537 "&to="+base64_encode(inputEl.childNodes[i].innerHTML)+ 538 filesUrl; 539 531 elements[i]['url'] = "javascript:"+escape(arg)+"('"+folders[i]+"','"+filesUrl+"')"; 540 532 } 541 533 draw_menu(arg,elements); … … 586 578 cExecute('./index.php?menuaction=filemanager.vfs_functions.unarchive&pswd='+base64_encode(password)+'&path='+base64_encode(currentPath)+'&file='+base64_encode(filename),handler.archive); 587 579 } 580 function move_to(to,filesUrl){ 581 cExecute('./index.php?menuaction=filemanager.vfs_functions.moveto&from='+base64_encode(currentPath)+'&to='+base64_encode(to)+filesUrl,handler.moveto); 582 } 583 function copy_to(to,filesUrl){ 584 cExecute('./index.php?menuaction=filemanager.vfs_functions.copyto&from='+base64_encode(currentPath)+'&to='+base64_encode(to)+filesUrl,handler.copyto); 585 } 588 586 589 587 function draw_card(filename){ -
sandbox/filemanager/js/handler.js
r1888 r1889 145 145 folders_tree.getNodeById(currentPath)._select(); 146 146 } 147 handler.prototype.copyto = function (data) { 148 returnVal = data.split('|'); 149 if (returnVal[0] == 'NODIR') 150 write_error(get_lang('Could not copy file because no destination directory is given')); 151 else if(returnVal[0] == 'SOMEERROR'){ 152 write_error(get_lang('Could not copy %1 file(s)',returnVal[1])); 153 } 154 else if(returnVal[0] == 'COPIED'){ 155 if (returnVal[1] == 1) 156 write_msg(get_lang('File copied successfuly')); 157 else 158 write_msg(get_lang('%1 files copied successfuly', returnVal[1])); 159 } 160 } 161 handler.prototype.moveto = function (data) { 162 returnVal = data.split('|'); 163 if (returnVal[0] == 'NODIR') 164 write_error(get_lang('Could not copy file because no destination directory is given')); 165 else if(returnVal[0] == 'SOMEERROR'){ 166 write_error(get_lang('Could not move %1 file(s)',returnVal[1])); 167 } 168 else if(returnVal[0] == 'MOVED'){ 169 if (returnVal[1] == 1) 170 write_msg(get_lang('File moved successfuly')); 171 else 172 write_msg(get_lang('%1 files moved successfuly', returnVal[1])); 173 } 174 handler.refreshDir(); 175 } 147 176 handler.prototype.refreshDir = function (data) { 148 177 cExecute('./index.php?menuaction=filemanager.uifilemanager.get_folders_list',handler.draw_folders_list); -
sandbox/filemanager/setup/phpgw_pt-br.lang
r1888 r1889 8 8 comment filemanager pt-br Comentário 9 9 comments cannot contain "%1" filemanager pt-br Comentários não podem conter "%1" 10 Files Copied to %1 successfuly filemanager pt-br Arquivos copiado para %1 com sucesso 10 %1 files copied successfuly filemanager pt-br %1 arquivos foram copiados com sucesso 11 File copied successfuly filemanager pt-br O arquivo foi copiado com sucesso 11 12 copy to filemanager pt-br Copiar Para 12 13 copy to: filemanager pt-br Copiar para: 13 could not copy %1 filemanager pt-br Não foi possível copiar %114 could not copy %1 files filemanager pt-br Não foi possível copiar %1 arquivos 14 15 could not copy file because no destination directory is given filemanager pt-br Não foi possível copiar o arquivo porque não se definiu um diretório de destino 15 16 could not create %1 filemanager pt-br Não foi possível criar %1 16 17 could not create directory %1 filemanager pt-br Não foi possível criar a pasta %1 17 18 could not delete %1 filemanager pt-br Não foi possível remover %1 18 could not move %1 to %2 filemanager pt-br Não foi possível mover %1 para %219 could not move %1 file(s) filemanager pt-br Não foi possível mover %1 arquivo(s) 19 20 Select a folder filemanager pt-br Selecione uma pasta 20 21 could not move file because no destination directory is given filemanager pt-br Não foi possível mover o arquivo porque não se definiu um diretório de destino … … 93 94 move to filemanager pt-br Mover Para 94 95 move to: filemanager pt-br Mover para: 95 Files moved to %1 successfuly filemanager pt-br Arquivos movidos para %1 com sucesso 96 %1 files moved successfuly filemanager pt-br %1 arquivos movidos com sucesso 97 File moved successfuly filemanager pt-br Arquivo movido com sucesso 96 98 Archive filemanager pt-br Arquivar 97 99 Unarchive filemanager pt-br Desarquivar
Note: See TracChangeset
for help on using the changeset viewer.