Changeset 8148


Ignore:
Timestamp:
05/10/13 11:21:07 (11 years ago)
Author:
douglas
Message:

Ticket #3402 - Nao preenchimento automatico de destinatario ao selecionar um grupo no catalogo de enderecos

Location:
branches/2.5/expressoMail1_2/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/expressoMail1_2/js/draw_api.js

    r8146 r8148  
    17481748        var msg_number = Element('msg_number').value; 
    17491749        if(!msg_folder && msg_number) { 
    1750         if (msg_number.toString().indexOf('@') != -1){  
     1750        if ((msg_number.toString().indexOf('@') != -1) || !msg_number.toString().match(/[0-9]/)){  
    17511751            new_message_to(msg_number);  
    17521752        }      
  • branches/2.5/expressoMail1_2/js/main.js

    r8147 r8148  
    21512151                        msgId = $('#border_tr td.menu-sel').attr('id').toString();  
    21522152                        content = $("#content_id_"+msgId.substr(msgId.lastIndexOf("_")+1,msgId.length));  
    2153                         draw_reply_boxes_by_field("to",email,content);  
     2153                        /*Envio de email para um grupo*/  
     2154                        if (email.indexOf('@') == -1){  
     2155                                var groups = REST.get('/groups');  
     2156                                        $.each(normalizeContacts(groups.collection.itens),function(index,group){  
     2157                                                if (group.name.toLocaleLowerCase() == email.toLocaleLowerCase()){  
     2158                                                        email = group.id;  
     2159                                                }  
     2160                                        });  
     2161                                draw_email_box(email, content.find('.to').filter('textarea:first'),"G");          
     2162                        }  
     2163                        else  
     2164                                draw_reply_boxes_by_field("to",email,content);  
    21542165                },500);  
    21552166        }  
    21562167        else{  
    21572168                var content = $("#content_id_"+new_border_ID);   
    2158                 draw_reply_boxes_by_field("to",email,content);  
     2169                if (email.indexOf('@') == -1){  
     2170                        var groups = REST.get('/groups');  
     2171                                $.each(normalizeContacts(groups.collection.itens),function(index,group){  
     2172                                        if (group.name.toLocaleLowerCase() == email.toLocaleLowerCase()){  
     2173                                                email = group.id;  
     2174                                        }  
     2175                                });  
     2176                        draw_email_box(email, content.find('.to').filter('textarea:first'),"G");          
     2177                }  
     2178                else  
     2179                        draw_reply_boxes_by_field("to",email,content);  
    21592180        }         
    21602181} 
Note: See TracChangeset for help on using the changeset viewer.