Changeset e07880


Ignore:
Timestamp:
May 22, 2008, 6:30:32 PM (14 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
2f6899
Parents:
ff4c3d
Message:

ignore Bcc fields if configured in Identity settings.

File:
1 edited

Legend:

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

    rff4c3d re07880  
    260260        var recipientType = document.getElementById(inputElement.id.replace(/^addressCol2/,"addressCol1"))
    261261            .selectedItem.getAttribute("value");
    262         if (recipientType == "addr_reply" || recipientType == "addr_followup") {
    263             // reset firstUsedInputElement and firstUsedStorageData if recipientType was changed
     262        var row = inputElement.id.replace(/^addressCol2#/,"")
     263        if (recipientType == "addr_reply" || recipientType == "addr_followup" || vI_storage.__isDoBcc(row)) {
     264            // reset firstUsedInputElement and firstUsedStorageData if recipientType was changed (and don't care about doBcc fields)
    264265            if (vI_storage.firstUsedInputElement == inputElement) {
    265266                vI_storage.firstUsedInputElement = null;
    266267                vI_storage.firstUsedStorageData = null;
    267268            }
    268             vI_notificationBar.dump("## vI_storage: field is a 'reply-to' or 'followup-to'. not searched.\n")
     269            vI_notificationBar.dump("## vI_storage: field is a 'reply-to' or 'followup-to' or preconfigured 'doBcc'. not searched.\n")
    269270            return;
    270271        }
     
    369370            var recipientType = awGetPopupElement(row).selectedItem.getAttribute("value");
    370371            if (recipientType == "addr_reply" || recipientType == "addr_followup" ||
    371                 awGetInputElement(row).value.match(/^\s*$/) ) continue;
     372                vI_storage.__isDoBcc(row) || awGetInputElement(row).value.match(/^\s*$/) ) continue;
    372373            if (recipients++ == 1) {
    373374                vI_storage.multipleRecipients = true
     
    380381            var recipientType = awGetPopupElement(row).selectedItem.getAttribute("value");
    381382            if (recipientType == "addr_reply" || recipientType == "addr_followup" ||
    382                 awGetInputElement(row).value.match(/^\s*$/) ) continue;
     383                vI_storage.__isDoBcc(row) || awGetInputElement(row).value.match(/^\s*$/) ) continue;
    383384            // by using a Timeout the possible prompt stopps the MessageSending
    384385            // this is required, else lavascript context might be gone
     
    509510        return mailListName;
    510511    },
    511        
     512   
     513    __isDoBcc : function(row) {
     514        var recipientType = awGetPopupElement(row).selectedItem.getAttribute("value");
     515        if (recipientType != "addr_bcc" || !getCurrentIdentity().doBcc) return false
     516        var doBccArray = gMsgCompose.compFields.SplitRecipients(getCurrentIdentity().doBccList, false);
     517        for ( var index = 0; index < doBccArray.count; index++ ) {
     518            if (doBccArray.StringAt(index) == awGetInputElement(row).value) {
     519                vI_notificationBar.dump("## vI_storage: ignoring doBcc field '" +
     520                    doBccArray.StringAt(index) + "'.\n");
     521                return true;
     522            }
     523        }       
     524        return false
     525    },
     526
    512527    getVIdentityFromAllRecipients : function(allIdentities) {
    513528        if (!vI.preferences.getBoolPref("storage"))
     
    517532        for (var row = 1; row <= top.MAX_RECIPIENTS; row ++) {
    518533            var recipientType = awGetPopupElement(row).selectedItem.getAttribute("value");
    519             if (recipientType == "addr_reply" || recipientType == "addr_followup") continue;
     534            if (recipientType == "addr_reply" || recipientType == "addr_followup" || vI_storage.__isDoBcc(row)) continue;
    520535            vI_storage.lastCheckedEmail[row] = awGetInputElement(row).value;
    521536            recipient = vI_storage.__getDescriptionAndType(awGetInputElement(row).value, recipientType);
Note: See TracChangeset for help on using the changeset viewer.