Ignore:
Timestamp:
12/17/09 15:16:25 (15 years ago)
Author:
amuller
Message:

Ticket #597 - Melhoria do FM, Implementação do arquivamento

Location:
sandbox/filemanager/js
Files:
3 edited

Legend:

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

    r1865 r1869  
    160160        if (el.value == oldValue) return; 
    161161        var filename = base64_encode(el.id); 
    162         cExecute('./index.php?menuaction=filemanager.vfs_functions.editComment&file='+filename+'&comment='+base64_encode(el.value),updateComment); 
     162        cExecute('./index.php?menuaction=filemanager.vfs_functions.editComment&file='+filename+'&comment='+base64_encode(el.value),handler.updateComment); 
    163163} 
    164164 
     
    168168} 
    169169 
    170 function updateComment(data) { 
    171         var returnVal = data.split(':'); 
    172         if (data.indexOf("True") == 0){ 
    173                 write_msg(get_lang('Updated comment for %1',returnVal[1])); 
    174         } 
    175         else 
    176         { 
    177                 if (returnVal[1] == "badchar") 
    178                         write_error(get_lang('Comments cannot contain "%1"',returnVal[2])); 
    179                 else 
    180                         write_error(get_lang('You have no permission to access this file')); 
    181         } 
    182  
    183 } 
     170 
    184171function EditColumns(param){ 
    185172        if (param == 'close') 
  • sandbox/filemanager/js/draw_api.js

    r1865 r1869  
    459459                                if (files[i].checked){ 
    460460                                        one_checked = true; 
    461                                         filesUrl += "&fileman["+j+"]="+files[i].value; 
     461                                        filesUrl += "&fileman["+j+"]="+base64_encode(files[i].value); 
    462462                                        j++; 
    463463                                } 
     
    479479                                if (files[i].checked){ 
    480480                                        one_checked = true; 
    481                                         filesUrl += "&fileman["+j+"]="+files[i].value; 
     481                                        filesUrl += "&fileman["+j+"]="+base64_encode(files[i].value); 
    482482                                        j++; 
    483483                                } 
  • sandbox/filemanager/js/handler.js

    r1865 r1869  
    22} 
    33handler.prototype.del = function(data){ 
    4         var returnVal = data.split(':'); 
     4        var returnVal = data.split('|'); 
    55        var deletedFiles = ""; 
    66        for (i=0; i < returnVal.length; i++) 
     
    1616                                pai.parentNode.removeChild(pai); 
    1717                        } 
     18                        if (i > 3) //to avoid big message 
     19                        { 
     20                                deletedFiles = "  " +returnVal.length + " " +get_lang("files"); 
     21                                break; 
     22                        } 
    1823                } 
    1924                write_msg(get_lang('Deleted %1',deletedFiles.substr(2))); 
     
    2631        } 
    2732        else 
    28                 var returnVal = data.split(':'); 
     33                var returnVal = data.split('|'); 
    2934        if ( returnVal[0] == "True" ){ 
    3035                if (returnVal[1] != returnVal[2]) write_msg(get_lang('Renamed %1 to %2',returnVal[1],returnVal[2])); 
     
    4449        else 
    4550        { 
    46                 if (returnVal[1] == "badchar") 
    47                         write_error(get_lang('File names cannot contain "%1"',returnVal[2])); 
    48                 else 
    49                         if (returnVal[1] == "slashes") 
    50                                 write_error(get_lang('File names cannot contain \\ or /')); 
    51                         if (returnVal[1] == "editing") 
    52                                 write_error(get_lang('This file is being edited right now')); 
    53                         else 
    54                                 write_error(get_lang('Could not rename %1 to %2', returnVal[1], returnVal[2])); 
     51                if (returnVal[1] == "badchar") 
     52                        write_error(get_lang('File names cannot contain "%1"',returnVal[2])); 
     53                else if (returnVal[1] == "slashes") 
     54                        write_error(get_lang('File names cannot contain \\ or /')); 
     55                else if (returnVal[1] == "editing") 
     56                        write_error(get_lang('This file is being edited right now')); 
     57                else 
     58                        write_error(get_lang('Could not rename %1 to %2', returnVal[1], returnVal[2])); 
    5559        } 
    5660 
     
    6973handler.prototype.restricted = function(data){ 
    7074        if (data.indexOf("True") == 0){ 
    71                 returnVal = data.split(':'); 
     75                returnVal = data.split('|'); 
    7276                var img_lock = document.getElementById('restrict_'+returnVal[1]); 
    7377                if (img_lock.src.indexOf('button_unlock') > 0) 
     
    8690} 
    8791handler.prototype.archive = function(data) { 
    88         returnVal = data.split(':'); 
     92        returnVal = data.split('|'); 
    8993        if (returnVal[0] == 'False') 
    9094        { 
     
    102106 
    103107} 
     108handler.prototype.updateComment = function (data) { 
     109        var returnVal = data.split('|'); 
     110        if (data.indexOf("True") == 0) 
     111        { 
     112                write_msg(get_lang('Updated comment for %1',returnVal[1])); 
     113        } 
     114        else 
     115        { 
     116                if (returnVal[1] == "badchar") 
     117                        write_error(get_lang('Comments cannot contain "%1"',returnVal[2])); 
     118                else 
     119                        write_error(get_lang('You have no permission to access this file')); 
     120        } 
     121 
     122} 
    104123 
    105124var handler = new handler(); 
Note: See TracChangeset for help on using the changeset viewer.