Ignore:
Timestamp:
04/28/10 18:16:21 (14 years ago)
Author:
niltonneto
Message:

Ticket #1056 - Corrigido problema que remove todas as regras ao criar um nova.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/expressoMail1_2/js/filter.js

    r689 r2658  
    1111        function cfilter(){ 
    1212 
     13                this.criticalError = false; 
    1314                this.mode_in   = ""; 
    1415                this.rulest              = new Array; 
     
    4647                var cont1 = parseInt(0); 
    4748                var cont2 = parseInt(0); 
    48                                  
     49         
    4950                if( _this.rulest.length == 0 ) 
    5051                { 
    5152                        var handler_sieve = function(data) 
    5253                        { 
     54                                if (data.indexOf('Error:') == 0) 
     55                                { 
     56                                        _this.criticalError = true; 
     57                                        alert(data); 
     58                                } 
     59                                else 
     60                                try{ 
    5361                                if(data.rule.length > 0){ 
    5462                                        for(var i=0 ; i < data.rule.length; i++) 
     
    6472                                _this.out_officeR = _this.out_officeR ? trim(_this.out_officeR.toString().replace("\n","")) : ""; 
    6573                                if(data.mode.length > 0){_this.mode_in = data.mode[0];} 
     74                                } 
     75                                catch(e){ 
     76                                        _this.criticalError = true; 
     77                                        alert("Expresso:"+e.description); 
     78                                } 
    6679                        } 
    6780                        if(Element('form_status') != null) 
     
    747760                var args   = "$this.ScriptS.rec_rules"; 
    748761                var params = "arfilter="+aux_rul; 
    749                 cExecute(args,h_filter,params); 
     762                if(!_this.criticalError) 
     763                        cExecute(args,h_filter,params); 
    750764        } 
    751765 
Note: See TracChangeset for help on using the changeset viewer.