Changeset 103470


Ignore:
Timestamp:
Aug 11, 2008, 5:59:04 PM (12 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
218ad9
Parents:
e19e3e
Message:

always store base identity - might be required later

File:
1 edited

Legend:

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

    re19e3e r103470  
    8282            vI_msgIdentityClone.elements.Obj_MsgIdentityPopup_clone.appendChild(newMenuItem)
    8383            if (vI_msgIdentityClone.elements.Obj_MsgIdentity.selectedItem == MenuItems[index]) {
    84                 vI_notificationBar.dump("## vI_msgIdentityClone: '" + vI_msgIdentityClone.elements.Obj_MsgIdentity.selectedItem.value + "'\n");
     84                var value = vI_msgIdentityClone.elements.Obj_MsgIdentity.selectedItem.value;
     85                vI_notificationBar.dump("## vI_msgIdentityClone: '" + value + "'\n");
     86                vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.base_id_key = value;
    8587                vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.selectedItem = newMenuItem;
    8688            }
     
    143145            var separator = null;
    144146            var accountname = document.getElementById("prettyName-Prefix").getAttribute("label");
    145 //          if (!localIdentityData.id) localIdentityData.id = gAccountManager.defaultAccount.defaultIdentity.key
    146147
    147148            // search the account related to this id and check if there is a seperator added
     
    194195            // set orignal Identity-Menu to the selected Identity
    195196            vI_msgIdentityClone.copySelectedIdentity(id);
     197            // remember this value
     198            vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.base_id_key = id;
    196199            // set smtp-selector to the smtp of the selcted Identity
    197200            vI_smtpSelector.resetMenuToMsgIdentity(id);
     
    215218            // clean reply-to fields before reinit
    216219            vI_msgIdentityClone.cleanupReplyTo();
    217             // remove possibly stored base_id_key
    218             vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.base_id_key = null;
    219220           
    220221            vI_msgIdentityClone.__setIdentity(vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.selectedItem.value);
     
    233234                vI_notificationBar.dump("## vI_msgIdentityClone: base_id found, set menu temporarily to base_id\n");
    234235                vI_msgIdentityClone.__setIdentity(base_id_key);
    235                 // store base_id_key if available
    236                 vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.base_id_key = base_id_key
    237236            }
    238237            else // change presented accountname (add accountname from current MsgIdentity (original))
    239                 accountname += vI_helper.getAccountname(vI_msgIdentityClone.elements.Obj_MsgIdentity); 
     238                accountname += vI_helper.getAccountname(vI_msgIdentityClone.elements.Obj_MsgIdentity);
     239           
    240240            // set smtp-selector to the smtp of the selected Identity
    241241            vI_smtpSelector.setMenuToKey(
     
    257257           
    258258        vI_msgIdentityClone.markAsNewAccount(vI_msgIdentityClone.isExistingIdentity());
    259 
    260 
    261259    },
    262260   
     
    395393            vI_msgIdentityClone.replyToInputElem.value =
    396394                vI_msgIdentityClone.elements.Obj_MsgIdentityTextbox_clone.value
    397             //~ vI_msgIdentityClone.replyToInputElem.setAttribute("value",
    398                 //~ vI_msgIdentityClone.elements.Obj_MsgIdentityTextbox_clone.value)
    399395            vI_msgIdentityClone.replyToStoredLastValue = vI_msgIdentityClone.replyToInputElem.value
    400396        }       
     
    412408                if (vI_msgIdentityClone.elements.Obj_MsgIdentity_clone
    413409                    .getAttribute("value") != "vid") {
    414                     vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.base_id_key =
    415                         vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.getAttribute("value")
    416                     vI_msgIdentityClone.elements.Obj_MsgIdentity_clone
    417                         .setAttribute("value","vid")
     410                    vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.setAttribute("value","vid")
    418411                    var accountname = document.getElementById("prettyName-Prefix")
    419412                                .getAttribute("label")
     
    424417                }
    425418                vI.elements.Obj_vILogo.setAttribute("hidden","false");
    426                 //~ vI_storage.elements.Obj_storageSave.setAttribute("hidden",
    427                     //~ !vI.preferences.getBoolPref("storage_show_switch"));
    428419            }
    429420            // code to hide the signature
     
    442433                vI.Cleanup();
    443434                vI.elements.Obj_vILogo.setAttribute("hidden","true");
    444                 //~ vI_storage.elements.Obj_storageSave.setAttribute("hidden",
    445                     //~ !vI.preferences.getBoolPref("storage_show_switch"));
    446                 vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.base_id_key = null;
    447                 //~ vI_msgIdentityClone.elements.Obj_MsgIdentityPopup_clone.doCommand();
    448435                vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.setAttribute("value",existingIdentity)
    449436            }
     
    462449        var smtp = vI_smtpSelector.elements.Obj_SMTPServerList.selectedItem.getAttribute('key')
    463450        var id_key = vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.base_id_key;
    464         if (!id_key) id_key = vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.getAttribute("value");
    465451       
    466452        vI_msgIdentityClone.localIdentityData.email = address.email;
Note: See TracChangeset for help on using the changeset viewer.