Changeset f1bf66


Ignore:
Timestamp:
Sep 29, 2007, 4:50:24 PM (13 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
7e366b
Parents:
4c28ba
Message:

added possibility to store Virtual Identity Information in AddressBook?

Location:
chrome/content/v_identity
Files:
1 added
4 edited

Legend:

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

    r4c28ba rf1bf66  
    138138        vI_msgIdentityClone.initMsgIdentityTextbox_clone();
    139139        vI_msgIdentityClone.elements.Obj_MsgIdentityTextbox_clone.value = newName;
     140        vI_msgIdentityClone.blurEvent()
    140141        var newIdentity = vI_msgIdentityClone.isNewIdentity();
    141142        window.setTimeout(vI_msgIdentityClone.markAsNewAccount, 0, newIdentity);
     143        return newIdentity;
    142144    },
    143145   
     
    167169                if (vI_msgIdentityClone.elements.Obj_MsgIdentity_clone
    168170                    .getAttribute("value") != "vid") {
     171                    vI_msgIdentityClone.elements.Obj_MsgIdentity_clone
     172                        .setAttribute("oldvalue",vI_msgIdentityClone.elements.Obj_MsgIdentity_clone
     173                                .getAttribute("value"))
    169174                    vI_msgIdentityClone.elements.Obj_MsgIdentity_clone
    170175                        .setAttribute("value","vid")
  • chrome/content/v_identity/vI_smtpSelector.js

    r4c28ba rf1bf66  
    6262            }
    6363        if (!smtpKey) smtpKey = vI_smtpSelector.smtpService.defaultServer.key;
    64        
     64        vI_smtpSelector.setMenuToKey(smtpKey);
     65    },
     66   
     67    setMenuToKey : function (smtpKey) {
    6568        MenuItems = vI_smtpSelector.elements.Obj_SMTPServerListPopup.childNodes
    6669        for (index = 0; index < MenuItems.length; index++) {
     
    7275        }
    7376    },
    74    
     77
    7578    loadSMTP_server_list : function()
    7679    {
  • chrome/content/v_identity/v_identity.js

    r4c28ba rf1bf66  
    115115        }
    116116    },
    117    
     117       
    118118    replacement_functions : {
    119119        // if the windows gets closed, this is the way to get rid of the account.
     
    121121            vI_notificationBar.dump("## v_identity: MsgComposeCloseWindow\n");
    122122            vI.original_functions.MsgComposeCloseWindow(false);
     123        },
     124       
     125        awReturnHit: function (element) {
     126            vI_notificationBar.dump("## v_identity: awReturnHit\n");
     127            vI.original_functions.awReturnHit(element);
     128            vI_addressBook.readVirtualIdentity(element);
     129        },
     130       
     131        awTabFromRecipient: function (element, event) {
     132            vI_notificationBar.dump("## v_identity: awTabFromRecipient\n");
     133            vI.original_functions.awTabFromRecipient(element, event);
     134            vI_addressBook.readVirtualIdentity(element);
    123135        },
    124136       
     
    171183                    vI_notificationBar.dump("## v_identity: SendMessage cancelled\n");
    172184                }
     185                else if (msgType == nsIMsgCompDeliverMode.Now) vI_addressBook.storeVirtualIdentity();
    173186            }
    174187        },
     
    219232        GenericSendMessage = function (msgType) {
    220233                vI.msgType = msgType; if (vI.warning(msgType)) vI.original_functions.GenericSendMessage(msgType); }
     234       
     235        // adapt awReturnHit to change Indentity if stored in AddressBook
     236        vI_notificationBar.dump("## v_identity: adapt awReturnHit\n");
     237        vI.original_functions.awReturnHit = awReturnHit;
     238        awReturnHit = function (element) {
     239                vI.replacement_functions.awReturnHit(element); }
     240       
     241        // adapt awTabFromRecipient to change Indentity if stored in AddressBook
     242        vI_notificationBar.dump("## v_identity: adapt awTabFromRecipient\n");
     243        vI.original_functions.awTabFromRecipient = awTabFromRecipient;
     244        awTabFromRecipient = function (element, event) {
     245                vI.replacement_functions.awTabFromRecipient(element, event); }
     246       
     247        //~ old_onblur = document.getElementById("addressingWidget").onblur
     248        //~ document.getElementById("addressingWidget").onblur = old_onblur +
     249            //~ "; vI_notificationBar.dump('## v_identity: awOnBlur\n'); vI.readVirtualIdentity(element);"
    221250       
    222251        gMsgCompose.RegisterStateListener(vI.ComposeStateListener);
  • chrome/content/v_identity/v_identity.xul

    r4c28ba rf1bf66  
    4545<script type="application/x-javascript" src="chrome://v_identity/content/vI_smtpSelector.js" />
    4646<script type="application/x-javascript" src="chrome://v_identity/content/vI_notificationBar.js"/>
     47<script type="application/x-javascript" src="chrome://v_identity/content/vI_addressBook.js"/>
    4748
    4849  <stringbundleset id="stringbundleset">
Note: See TracChangeset for help on using the changeset viewer.