Changeset e1508e


Ignore:
Timestamp:
Oct 25, 2007, 1:18:43 PM (12 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
f27c48
Parents:
0bc2a7
Message:

use Virtual Identity address parsing also for Entries in the addressbook

Location:
chrome/content/v_identity
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_addressBook.js

    r0bc2a7 re1508e  
    190190                }
    191191               
    192                 // split FullEmail into parts
    193                 var splitted = { number : 0, emails : {}, fullNames : {}, combinedNames : {} };
    194                 vI.headerParser.parseHeadersWithArray(newFullEmail, splitted.emails,
    195                     splitted.fullNames, splitted.combinedNames);
    196 
     192                var splitted = vI.helper.parseAddress(newFullEmail);
    197193                // format of addresses is choosen to be compatible with vI_smartIdentity
    198194                var addresses = { number : 1,
    199                         emails : Array(splitted.emails.value[0]),
    200                         fullNames : Array(splitted.fullNames.value[0]),
    201                         combinedNames : Array(splitted.combinedNames.value[0]),
     195                        emails : Array(splitted.email),
     196                        fullNames : Array(splitted.name),
     197                        combinedNames : Array(splitted.combinedName),
    202198                        id_keys : {}, smtp_keys : {},
    203199                        fullABEntry : Array(Card[prop].replace(/vIdentity: /,"")) };
  • chrome/content/v_identity/v_identity.js

    r0bc2a7 re1508e  
    6262        getAddress : function() {
    6363            vI_msgIdentityClone.initMsgIdentityTextbox_clone();
    64             var address = vI_msgIdentityClone.elements.Obj_MsgIdentityTextbox_clone.value;
    65            
     64            return vI.helper.parseAddress(vI_msgIdentityClone.elements.Obj_MsgIdentityTextbox_clone.value);
     65        },
     66       
     67        parseAddress : function(address) {
    6668            // prefer an email address separated with < >, only if not found use any other
    6769            if (!address.match(/<\s*[^>\s]*@[^>\s]*\s*>/)) address.match(/<?\s*[^>\s]*@[^>\s]*\s*>?/)
     
    7577                 email: email,
    7678                 combinedName: name + " <" + email + ">"}
    77         },
     79        }
    7880    },
    7981
Note: See TracChangeset for help on using the changeset viewer.