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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.