Ignore:
Timestamp:
12/23/09 09:51:15 (15 years ago)
Author:
amuller
Message:

Ticket #597 - Melhoria do FM. melhorias na interface, melhoria na cópia, ao mover e etc...

Location:
sandbox/filemanager/js
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/js/common_functions.js

    r1886 r1889  
    8585                        return null; 
    8686                ret = ""; 
    87                 for ( var i=0;i < data.length; i++ ) 
     87                for ( var i=0;(i < data.length && data.charCodeAt(i) > 31); i++ ) 
    8888                { 
    8989                        ret += String.fromCharCode(data.charCodeAt(i) ^ sec_key.charCodeAt(i)); 
  • sandbox/filemanager/js/draw_api.js

    r1888 r1889  
    523523                        } 
    524524                        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++) 
    527526                        { 
    528                                 if (inputEl.childNodes[i].nodeName != 'SPAN') 
    529                                         continue; 
    530527                                elements[i] = new Array(); 
    531                                 elements[i]['text']=inputEl.childNodes[i].innerHTML; 
     528                                elements[i]['text']=folders[i]; 
    532529                                address = document.location.toString(); 
    533530                                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+"')"; 
    540532                        } 
    541533                        draw_menu(arg,elements); 
     
    586578        cExecute('./index.php?menuaction=filemanager.vfs_functions.unarchive&pswd='+base64_encode(password)+'&path='+base64_encode(currentPath)+'&file='+base64_encode(filename),handler.archive); 
    587579} 
     580function 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} 
     583function 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} 
    588586 
    589587function draw_card(filename){ 
  • sandbox/filemanager/js/handler.js

    r1888 r1889  
    145145        folders_tree.getNodeById(currentPath)._select(); 
    146146} 
     147handler.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} 
     161handler.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} 
    147176handler.prototype.refreshDir = function (data) { 
    148177        cExecute('./index.php?menuaction=filemanager.uifilemanager.get_folders_list',handler.draw_folders_list); 
Note: See TracChangeset for help on using the changeset viewer.