Ignore:
Timestamp:
12/21/10 17:15:26 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #1468 - Notificacao por email de uploads de arquivos enviados pelo modulo Filemanager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/filemanager/js/handler.js

    r3591 r3619  
    11function handler(){ 
    22} 
    3 handler.prototype.del = function(data){ 
    4         var returnVal = data.split('|'); 
    5         var deletedFiles = ""; 
    6         for (i=0; i < returnVal.length; i++) 
    7                 if (returnVal[i] == 'False'){ 
    8                         write_error(get_lang('Could not delete %1',returnVal[i+1])); 
    9                         return; 
    10                 }else 
    11                 { 
    12                         if (returnVal[i] != ""){ 
    13                                 deletedFiles += ", "+returnVal[i]; 
    14                                 /*var element = document.getElementById("name_"+returnVal[i]); 
    15                                 var pai = element.parentNode.parentNode.parentNode; 
    16                                 pai.parentNode.removeChild(pai);*/ 
    17                         } 
     3 
     4handler.prototype.del = function(data) 
     5{ 
     6        var _return = data; 
     7        var deletedFiles = ""; 
     8         
     9        _return = _return.substring(0, ( _return.length - 1 ) ); 
     10        _return = _return.split("|"); 
     11         
     12         
     13        for (var i = 0 ; i < _return.length; i++) 
     14        {        
     15                if ( _return[i] == 'False') 
     16                { 
     17                        write_error(get_lang('Could not delete %1', _return[i+1]) ); 
     18                        return; 
     19                } 
     20                else 
     21                { 
     22                        if ( _return[i] != "" ) 
     23                        { 
     24                                deletedFiles += ", " + _return[i]; 
     25                        } 
     26         
    1827                        if (i > 3) //to avoid big message 
    1928                        { 
    20                                 deletedFiles = "  " +returnVal.length + " " +get_lang("files"); 
     29                                deletedFiles = "  " + _return.length + " " +get_lang("files"); 
    2130                                break; 
    2231                        } 
    23                 } 
    24                 write_msg(get_lang('Deleted %1',deletedFiles.substr(2))); 
    25         //Repaint stripes  
     32                } 
     33        } 
     34         
     35        write_msg(get_lang('Deleted %1',deletedFiles.substr(2))); 
     36         
    2637        toolbar.control('reload'); 
    27         //folderList.drawStripes(); 
    28 } 
     38 
     39} 
     40 
    2941handler.prototype.rename = function(data) { 
    3042        if (data == null){ 
     
    6274 
    6375} 
    64 handler.prototype.upload = function(data){ 
    65         close_window(); 
     76 
     77handler.prototype.upload = function(data) 
     78{ 
     79         
    6680        connector.hideProgressBar(); 
    6781        var response = unserialize(data); 
     
    7387        toolbar.control('reload'); 
    7488} 
    75 handler.prototype.restricted = function(data){ 
     89 
     90handler.prototype.restricted = function(data) 
     91{ 
    7692        if (data.indexOf("True") == 0){ 
    7793                returnVal = data.split('|'); 
     
    91107                write_error("Could not mark as restricted"); 
    92108} 
    93 handler.prototype.archive = function(data) { 
     109 
     110handler.prototype.archive = function(data) 
     111{ 
    94112        returnVal = data.split('|'); 
    95113        if (returnVal[0] == 'False') 
     
    108126 
    109127} 
    110 handler.prototype.updateComment = function (data) { 
     128 
     129handler.prototype.updateComment = function (data) 
     130{ 
    111131        var returnVal = data.split('|'); 
    112132        if (data.indexOf("True") == 0) 
     
    174194} 
    175195 
    176 handler.prototype.copyto = function (data) { 
     196handler.prototype.copyto = function (data) 
     197{ 
    177198        returnVal = data.split('|'); 
    178199        if (returnVal[0] == 'NODIR') 
     
    188209        } 
    189210} 
     211 
    190212handler.prototype.moveto = function (data) { 
    191213        returnVal = data.split('|'); 
Note: See TracChangeset for help on using the changeset viewer.