Changeset 3438


Ignore:
Timestamp:
10/29/10 10:29:44 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #1289 - Criacao de regra para as mensagens c/mais de 0k nao é aceita

Location:
branches/2.2/expressoMail1_2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/inc/class.ScriptS.inc.php

    r3018 r3438  
    4040                 
    4141                $this->continuebit      = 1; 
    42         $this->sizebit          = 2; 
     42        $this->sizebit          = 1; 
    4343        $this->anyofbit         = 4; 
    4444        $this->keepbit          = 8; 
     
    286286          $rule['unconditional']   = 0; 
    287287                   
    288                   if (!$rule['from'] && !$rule['to'] && !$rule['subject'] && !$rule['field'] && !$rule['size'] && $rule['action']){ 
     288                  if (!$rule['from'] && !$rule['to'] && !$rule['subject'] && !$rule['field'] && !($rule['size'] >= 0) && $rule['action']){ 
    289289                         $rule['unconditional'] = 1; 
    290290                  } 
     
    359359                        $started = 1; 
    360360                    } 
    361                     if ($rule['size']) { 
     361                    if ($rule['size'] >= 0) { 
    362362                        $xthan = " :under "; 
    363363                        if ($rule['gthan']) $xthan = " :over "; 
  • branches/2.2/expressoMail1_2/js/filter.js

    r3407 r3438  
    44                if (form.value.length >= 300) 
    55                { 
    6                         alert(get_lang("You have exceeded the number of allowed characters")); 
     6                        alert(_lang("You have exceeded the number of allowed characters")); 
    77                        return false; 
    88                } 
     
    307307                                                "</tr><tr><td>"+get_lang('The field \"%1\" of the message it contains', get_lang('Subject'))+".: <input type='text' id='field3' name='field3' size='35' maxlength='200'></td>"+ 
    308308                                                "</tr><tr><td>"+get_lang('The size of the message is')+".: &nbsp<select id='select_size' name='select_size'>"+ 
    309                                                 "<option value='1'>"+get_lang("Greater than")+"</option><option value='0'>"+get_lang("Less than")+"</option>"+ 
     309                                                "<option value='0'>"+get_lang("Less than")+"</option><option value='1'>"+get_lang("Greater than")+"</option>"+ 
    310310                                                "</select>&nbsp;<input type='text' id='field4' name='field4' size='8' maxlength='8'> Kb</td>"+ 
    311311                                                "</tr><tr><td colspan='2'><hr size='1' width='100%'><b>"+get_lang("Action")+":</b></td></tr>"+ 
     
    612612                        } 
    613613                        var opts = ""; 
    614                         if(Element("checkBox2").checked == true){opts += ",checkBox2";} 
    615                         if(Element("select_size").options[1].selected == true){opts += ",select_size=1";} 
    616                         if(Element("select_rules").options[1].selected == true){opts += ",select_rules=1";} 
    617                         for(var i=0; i < this.values.length; i++){if(this.values[i] == opts){mount_rule += i + "&&";}} 
     614                        if(Element("checkBox2").checked == true){ 
     615                            opts += ",checkBox2"; 
     616                        } 
     617                        if(Element("select_size").options[1].selected == true){ 
     618                            opts += ",select_size=1"; 
     619                        } 
     620                        if(Element("select_rules").options[1].selected == true){ 
     621                            opts += ",select_rules=1"; 
     622                        } 
     623                        for(var i=0; i < this.values.length; i++){ 
     624                            if(this.values[i] == opts){ 
     625                                mount_rule += i + "&&"; 
     626                            } 
     627                        } 
    618628                        mount_rule += "&&&&"; 
    619                         if(LTrim(Element("field4").value) != ""){ 
     629                        if(LTrim(Element("field4").value) != "" && LTrim(Element("field4").value) >= 0){ 
    620630                                mount_rule += LTrim(Element("field4").value); 
    621                         }else{ 
    622                                 mount_rule += 0; 
    623631                        } 
    624632                        if(form[0] == "new") 
     
    766774                var h_filter = function(data) 
    767775                { 
    768                         if(data != "Ok"){alert("Erro : \n" + data);} 
     776                        if(data != "Ok"){alert("Erro : \n" + get_lang(data));} 
    769777                } 
    770778                var args   = "$this.ScriptS.rec_rules"; 
  • branches/2.2/expressoMail1_2/js/filters.js

    r3187 r3438  
    159159                if (fields[5].length > 0)  
    160160                        _criteria += "<b>"+get_lang("subject is")+"</b>:"+fields[5];  
    161                 if (parseInt(fields[11]) > 0)  
     161                if (parseInt(fields[11]) >= 0) 
    162162                {  
    163                         if(fields[8] == "2")  
     163                        if(fields[8] == "1") 
    164164                                _criteria += "<b>"+get_lang("size is over than")+"</b>:"+fields[11];  
    165165                        else  
Note: See TracChangeset for help on using the changeset viewer.