Changeset 12d910c


Ignore:
Timestamp:
Oct 2, 2007, 8:57:04 PM (14 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
a13713
Parents:
fad89f
Message:

added timeout to enable saving of new emails in addressbook before VirtualIdentity?-Information is added

Location:
chrome/content/v_identity
Files:
2 edited

Legend:

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

    rfad89f r12d910c  
    3030vI_addressBook = {
    3131    CardFields : Array("Custom1", "Custom2", "Custom3", "Custom4", "Notes"),
     32   
     33    VIdentityString : null,
    3234   
    3335    elements : {
     
    197199                (old_address.email == addresses.emails[0]) &&
    198200                (old_address.name == addresses.fullNames[0])    )
    199         if (equal) vI_notificationBar.dump("## vI_addressBook: Identities are the same\n")
    200         else vI_notificationBar.dump("## vI_addressBook: Identities differ\n")
     201        if (equal) vI_notificationBar.dump("## vI_addressBook: Identities are the same.\n")
     202        else vI_notificationBar.dump("## vI_addressBook: Identities differ.\n")
    201203        return equal;
    202204    },
     
    245247            vI_notificationBar.dump("## vI_addressBook: checking " + prop + ".\n")
    246248            if (Card[prop] == "" || Card[prop].indexOf("vIdentity: ") == 0) {
    247                 Card[prop] = "vIdentity: " + vI_addressBook.getCurrentVIdentityString();
     249                Card[prop] = "vIdentity: " + vI_addressBook.VIdentityString;
    248250                Card.editCardToDatabase("");
    249                 vI_notificationBar.dump("## vI_addressBook: added vIdentity to AddressBook '" + vI_addressBook.getCurrentVIdentityString() + "' to field '" + prop + "'.\n")
     251                vI_notificationBar.dump("## vI_addressBook: added vIdentity to AddressBook '" + vI_addressBook.VIdentityString + "' to field '" + prop + "'.\n")
    250252                return;
    251253            }
     
    263265        if (addresses) {
    264266            if (!vI_addressBook.equalsCurrentIdentity(addresses)) {
    265                 vI_notificationBar.dump("## vI_addressBook: Identities differ.\n")
    266267                var warning =   vI.elements.strings.getString("vident.updateAddressBook.warning1") +
    267268                        email +
     
    269270                        addresses.fullABEntry[0] +
    270271                        vI.elements.strings.getString("vident.updateAddressBook.warning3") +
    271                         vI_addressBook.getCurrentVIdentityString() +
     272                        vI_addressBook.VIdentityString +
    272273                        vI.elements.strings.getString("vident.updateAddressBook.warning4");
    273274                vI_notificationBar.dump("## vI_addressBook: " + warning + ".\n")
     
    302303        }
    303304       
     305        // store VIdentityString
     306        vI_addressBook.VIdentityString = vI_addressBook.getCurrentVIdentityString();
     307       
    304308        for (var row = 1; row <= top.MAX_RECIPIENTS; row ++) {
    305             vI_addressBook.updateABookFromVIdentity(awGetInputElement(row).value)
     309            window.setTimeout(vI_addressBook.updateABookFromVIdentity, 50, awGetInputElement(row).value)
    306310        }
    307311    },
  • chrome/content/v_identity/v_identity.js

    rfad89f r12d910c  
    173173                vI_account.createAccount();
    174174                vI.addVirtualIdentityToMsgIdentityMenu();
     175                vI.original_functions.GenericSendMessage(msgType);
    175176                vI_addressBook.storeVIdentityToAllRecipients(msgType);
    176                 vI.original_functions.GenericSendMessage(msgType);
    177177                if (window.cancelSendMessage) {
    178178                    vI.Cleanup_Account();
    179179                    vI_notificationBar.dump("## v_identity: SendMessage cancelled\n");
    180                 };
     180                }
    181181            }
    182182        },
     
    228228        GenericSendMessage = function (msgType) {
    229229                vI.msgType = msgType; if (vI.warning(msgType)) {
    230                     vI_addressBook.storeVIdentityToAllRecipients(msgType);
    231                     vI.original_functions.GenericSendMessage(msgType); } }
     230                    vI.original_functions.GenericSendMessage(msgType);
     231                    vI_addressBook.storeVIdentityToAllRecipients(msgType); } }
    232232       
    233233        // better approach would be to use te onchange event, but this one is not fired in any change case
     
    288288            GenericSendMessage = function (msgType) {
    289289                vI.msgType = msgType; if (vI.warning(msgType)) {
    290                     vI_addressBook.storeVIdentityToAllRecipients(msgType);
    291                     vI.original_functions.GenericSendMessage(msgType); } }
     290                    vI.original_functions.GenericSendMessage(msgType);
     291                    vI_addressBook.storeVIdentityToAllRecipients(msgType); } }
    292292            vI_notificationBar.dump("## v_identity: restored GenericSendMessage (Virtual Identity deactivated)\n");
    293293        }
Note: See TracChangeset for help on using the changeset viewer.