Changeset 2955 for trunk


Ignore:
Timestamp:
06/18/10 11:45:28 (14 years ago)
Author:
amuller
Message:

Ticket #1109 - Refaz a tela de regras com melhorias na visualização

Location:
trunk/expressoMail1_2/js/jscode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/jscode/filter.js

    r2694 r2955  
    276276         * quando a caixa de seleção para manter o e-mail na caixa de entrada do usuário for selecionada 
    277277         */ 
    278         cfilter.prototype.disable_radio3 =  function() 
    279         { 
     278        cfilter.prototype.disable_radio =  function() 
     279        { 
     280                radio4 = Element('radio4'); 
    280281                radio3 = Element('radio3'); 
    281                 field6 = Element('field6'); 
    282282                cb2 = Element('checkBox2'); 
     283                field6 = Element('field6') 
    283284 
    284285                if (cb2.checked) 
    285286                { 
    286287                        radio3.disabled = true; 
     288                        radio4.disabled = true; 
    287289                        field6.disabled = true; 
    288290 
     
    295297                { 
    296298                        radio3.disabled = false; 
     299                        radio4.disabled = false; 
    297300                        field6.disabled = false; 
    298301                } 
     
    304307                         var form = ""; 
    305308                                 form = "<div id='div_rule' style='display:none'><table id='table_rule' border='0' cellpading='0' cellspacing='0' width='100%'>"+ 
    306                                                 "<tr><td colspan='2'><input type='checkBox' id='checkBox1' name='checkb'>"+get_lang('Also check message against next rule') + "</td></tr>"+ 
    307                                                 "<tr><td colspan='2'><input type='checkBox' id='checkBox2' onclick='filter.disable_radio3();' name='checkb'>"+get_lang('Keep a copy of the message at your Inbox')+ "</td><tr>"+ 
    308                                                 "<tr><td colspan='2'><hr size='1' width='100%'></td></tr><tr>"+ 
    309                                                 "<td rowspan='4' width='20%'>"+get_lang('Coincident')+"<br><select id='select_rules' name='select_rules'>"+ 
    310                                                 "<option value='0'>"+get_lang("with all")+"</option><option value='1'>"+get_lang("with some")+"</option>"+ 
     309/*                                              "<tr><td colspan='2'><input type='checkBox' id='checkBox1' name='checkb'>"+get_lang('Also check message against next rule') + "</td></tr>"+*/ 
     310                                                "<tr><td colspan='2'><b>"+get_lang("Criteria")+":</b></td></tr><tr>"+ 
     311                                                "<td rowspan='4' width='20%'>"+get_lang('Find items')+":<br><select id='select_rules' name='select_rules'>"+ 
     312                                                "<option value='1'>"+get_lang("If any criterion is met")+"</option><option value='0'>"+get_lang("If all criteria is met")+"</option>"+ 
    311313                                                "</select></td><td>"+get_lang('The field \"%1\" of the message it contains',get_lang('From'))+".: <input type='text' id='field1' name='field1' size='35' maxlength='200'></td>"+ 
    312314                                                "</tr><tr><td>"+get_lang('The field \"%1\" of the message it contains', get_lang('To'))+".: <input type='text' id='field2' name='field2' size='35' maxlength='200'></td>"+ 
    313315                                                "</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>"+ 
    314316                                                "</tr><tr><td>"+get_lang('The size of the message is')+".: &nbsp<select id='select_size' name='select_size'>"+ 
    315                                                 "<option value='0'>"+get_lang("Less than")+"</option><option value='1'>"+get_lang("Greater than")+"</option>"+                                            
     317                                                "<option value='1'>"+get_lang("Greater than")+"</option><option value='0'>"+get_lang("Less than")+"</option>"+                                            
    316318                                                "</select>&nbsp;<input type='text' id='field4' name='field4' size='8' maxlength='8'> Kb</td>"+ 
    317                                                 "</tr><tr><td colspan='2'><hr size='1' width='100%'></td></tr>"+ 
     319                                                "</tr><tr><td colspan='2'><hr size='1' width='100%'><b>"+get_lang("Action")+":</b></td></tr>"+ 
    318320                                                "</table><table id='table_rule1' border='0' cellpading='0' cellspacing='0' width='100%'>"+ 
     321                                                "<tr><td colspan='2'><input type='checkBox' id='checkBox2' onclick='filter.disable_radio();' name='checkb'>"+get_lang('Keep a copy of the message at your Inbox')+ "</td><tr>"+ 
     322 
    319323                                                "<tr><td width='50%'><input type='radio' id='radio1' name='radio' value='folder'>"+get_lang('Store at')+".:</td>"+ 
    320324                                                "<td width='50%'><select id='select_mailboxes' name='select_mailboxes'></select></td>"+ 
     
    324328                                                "<td width='50%'><textarea id='field6' onkeypress='return charCounter(this);' name='field6' rows='3' cols='25'></textarea></td>"+ 
    325329                                                "</tr><tr><td colspan='2'><input type='radio' id='radio4' name='radio' value='discard'>"+get_lang('Erase the message')+"</td>"+ 
     330 
    326331                                                "</tr></table></div><div id='div_vacation' style='display:none'>"+ 
    327332                                                "<table id='table_vacation' border='0' cellpading='0' cellspacing='0' width='100%'>"+ 
  • trunk/expressoMail1_2/js/jscode/filters.js

    r2916 r2955  
    150150                if(type == 'voip') 
    151151                        return " <a href='javascript:void(0)' onclick=filter.form_r('"+pos+"','voip')><b>" + get_lang("Status") + " : </b>" + "<font color='red'>" + get_lang(fields[2]) + "</font>" + " - " + fields[3] + " <b>" + get_lang("Subject") + ":</b> " + fields[5] + "</a>"; 
    152                 else 
    153                         return " <a href='javascript:void(0)' onclick=filter.form_r('"+pos+"','')><b>" + get_lang("Status") + " : </b>" + "<font color='red'>" + get_lang(fields[2]) + "</font>" + " - <b>" + get_lang("E-mail rule") + ":</b> " + fields[3] + " - <b>" + get_lang("Action") + ":</b> " + fields[6] + "</a>"; 
     152                else{ 
     153 
     154                        var _criteria = " "; 
     155                        if (fields[3].length > 0) 
     156                                _criteria = "<b>"+get_lang("is from")+"</b>:"+fields[3]; 
     157                        if (fields[4].length > 0) 
     158                                _criteria += "<b>"+get_lang("is to")+"</b>:"+fields[4]; 
     159                        if (fields[5].length > 0) 
     160                                _criteria += "<b>"+get_lang("subject is")+"</b>:"+fields[5]; 
     161                        if (parseInt(fields[11]) > 0) 
     162                        { 
     163                                if(fields[8] == "2") 
     164                                        _criteria += "<b>"+get_lang("size is over than")+"</b>:"+fields[11]; 
     165                                else 
     166                                        _criteria += "<b>"+get_lang("size is under than")+"</b>:"+fields[11]; 
     167                        } 
     168                        var _action = " "; 
     169                        if (fields[6] == 'folder') 
     170                                _action = get_lang("Store at")+" "+(fields[7].split("/"))[1]; 
     171                        else 
     172                                _action = get_lang(fields[6]); 
     173 
     174                        return " <a href='javascript:void(0)' onclick=filter.form_r('"+pos+"','')><b>" + get_lang("Status") + " : </b>" + "<font color='red'>" + get_lang(fields[2]) + "</font>" + " - <b>" + get_lang("if email") + " </b>" + _criteria + " - <b>" + get_lang("Action") + ":</b> " + _action + "</a>"; 
     175                } 
    154176        } 
    155177         
Note: See TracChangeset for help on using the changeset viewer.