Ignore:
Timestamp:
07/20/12 11:39:05 (12 years ago)
Author:
eduardow
Message:

Ticket #2969 - Correção de bug ao enviar e-mail com virgla entre aspas no nome.

File:
1 edited

Legend:

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

    r6754 r6833  
    28422842        // fim 
    28432843        // ALEXANDRE LUIZ CORREIA 
    2844         if(info_msg.toaddress2 != null ) 
     2844        if(info_msg.toaddress2 != null) 
    28452845        { 
    2846                 toaddress_array[ID] = info_msg.toaddress2.split(","); 
     2846                toaddress_array[ID] = break_comma(info_msg.toaddress2); 
    28472847 
    28482848                if (toaddress_array[ID].length > 1) 
     
    33253325         //window.setTimeout(function() { $("#div_message_scroll_"+ID).focus() },250); 
    33263326 
     3327        /*  
     3328     * @AUTHOR Marcos Luiz Wilhelm  
     3329     * @DATE 2012/07/17  
     3330     * @BRIEF Break out emails only with comma out of quote marks  
     3331     */  
     3332    function break_comma (originalText){  
     3333            var quotesMarks = false;  
     3334            var completeString = "";  
     3335            var brokenEmails = new Array();  
     3336            originalText+=",";  
     3337            for(i=0; i<originalText.length; i++){  
     3338                    var character = originalText.substr(i,1);  
     3339                    if(character == "\""){  
     3340                            quotesMarks = !quotesMarks;  
     3341                    }  
     3342                    if(!quotesMarks){  
     3343                            if(character == ","){  
     3344                                    brokenEmails.push(completeString);  
     3345                                    completeString = "";  
     3346                            }  
     3347                            else  
     3348                                    completeString+=character;        
     3349                    }  
     3350                    else  
     3351                            completeString+=character;  
     3352            }  
     3353            return brokenEmails;  
     3354    } 
     3355 
    33273356        function mailto( link ) 
    33283357        { 
     
    36883717                        } 
    36893718                        if(input.val() != ""){ 
     3719                                        if(e.keyCode == 188 && !e.shiftKey && input.val().split("\"").length > 1){  
     3720                            return;  
     3721                    } 
    36903722                                if(e.keyCode != 9) 
    36913723                                        e.preventDefault(); 
Note: See TracChangeset for help on using the changeset viewer.