Changeset ee2df4


Ignore:
Timestamp:
Aug 25, 2018, 12:03:23 PM (14 months ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
acf7ad
Parents:
fab458
Message:

added new send-types, smaller fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/vI_smartIdentity.js

    rfab458 ree2df4  
    5858    var msgHdr;
    5959    var msgComposeTypeReference = Components.interfaces.nsIMsgCompType;
    60     Log.debug("this._document.title=" + this._document.title + " this._msgCompose=" + this._msgCompose + " msgIdentityClone=" + this._document.getElementById("virtualIdentityExtension_msgIdentityClone"))
     60    Log.debug("this._document.title=" + this._document.title + " this._msgCompose=" + this._msgCompose + " msgIdentityClone=" + this._document.getElementById("msgIdentity"))
    6161
    6262    var newsgroup = this._msgCompose.compFields.newsgroups;
     
    7171    case msgComposeTypeReference.ReplyWithTemplate:
    7272    case msgComposeTypeReference.ReplyToList:
     73    case msgComposeTypeReference.ReplyIgnoreQuote:
    7374      Log.debug("Reply");
    7475      msgHdr = this.messenger.
    7576      messageServiceFromURI(this._msgCompose.originalMsgURI).messageURIToMsgHdr(this._msgCompose.originalMsgURI);
    76       this._smartIdentityCollection = new smartIdentityCollection(this._currentWindow, msgHdr, this._currentWindow.getCurrentIdentity(), this._document.getElementById("virtualIdentityExtension_msgIdentityClone").vid,
     77      this._smartIdentityCollection = new smartIdentityCollection(this._currentWindow, msgHdr, this._currentWindow.getCurrentIdentity(), this._document.getElementById("msgIdentity").vid,
    7778        newsgroup, this._getRecipients());
    7879      this._smartIdentityCollection.Reply();
     
    8485      msgHdr = this.messenger.
    8586      messageServiceFromURI(this._msgCompose.compFields.draftId).messageURIToMsgHdr(this._msgCompose.compFields.draftId);
    86       this._smartIdentityCollection = new smartIdentityCollection(this._currentWindow, msgHdr, this._currentWindow.getCurrentIdentity(), this._document.getElementById("virtualIdentityExtension_msgIdentityClone").vid,
     87      this._smartIdentityCollection = new smartIdentityCollection(this._currentWindow, msgHdr, this._currentWindow.getCurrentIdentity(), this._document.getElementById("msgIdentity").vid,
    8788        newsgroup, this._getRecipients());
    8889      this._smartIdentityCollection.Draft();
     
    9495    case msgComposeTypeReference.NewsPost:
    9596    case msgComposeTypeReference.MailToUrl:
     97    case msgComposeTypeReference.EditAsNew:
     98    case msgComposeTypeReference.EditTemplate:
    9699      Log.debug("New Mail");
    97       this._smartIdentityCollection = new smartIdentityCollection(this._currentWindow, null, this._currentWindow.getCurrentIdentity(), this._document.getElementById("virtualIdentityExtension_msgIdentityClone").vid,
     100      this._smartIdentityCollection = new smartIdentityCollection(this._currentWindow, null, this._currentWindow.getCurrentIdentity(), this._document.getElementById("msgIdentity").vid,
    98101        newsgroup, this._getRecipients());
    99102      // to enable composing new email with new identity: identity is hidden in subject line
     
    109112      break;
    110113    }
    111     if (this._smartIdentityCollection._allIdentities.number > 0) this.__smartIdentitySelection(autocreate);
     114    if (this._smartIdentityCollection &&
     115      this._smartIdentityCollection._allIdentities.number > 0) this.__smartIdentitySelection(autocreate);
    112116  },
    113117
     
    136140        Log.debug("found existing Identity, use without interaction.");
    137141        // add all Indentities to Clone Menu before selecting and leaving the function
    138         this._document.getElementById("virtualIdentityExtension_msgIdentityClone").addIdentitiesToCloneMenu(this._smartIdentityCollection._allIdentities);
     142        this._document.getElementById("msgIdentity").addIdentitiesToCloneMenu(this._smartIdentityCollection._allIdentities);
    139143        this.changeIdentityToSmartIdentity(this, existingIDIndex.key);
    140144        return;
     
    142146    }
    143147
    144     this._document.getElementById("virtualIdentityExtension_msgIdentityClone").addIdentitiesToCloneMenu(this._smartIdentityCollection._allIdentities);
     148    this._document.getElementById("msgIdentity").addIdentitiesToCloneMenu(this._smartIdentityCollection._allIdentities);
     149   
     150   
    145151    Log.debug("__smartIdentitySelection _allIdentities.number=" +
    146152      this._smartIdentityCollection._allIdentities.number +
     
    167173    Log.debug("changeIdentityToSmartIdentity selectedValue=" + selectedValue + " from " + allIdentities.number);
    168174    Log.debug("changeIdentityToSmartIdentity selectedValue=" + selectedValue + ": '" + allIdentities.identityDataCollection[selectedValue].combinedName + "' " + "(" + allIdentities.identityDataCollection[selectedValue].id.value + "," + allIdentities.identityDataCollection[selectedValue].smtp.value + ")");
    169     self._document.getElementById("virtualIdentityExtension_msgIdentityClone").selectedMenuItem = allIdentities.menuItems[selectedValue];
    170     if (self._document.getElementById("virtualIdentityExtension_msgIdentityClone").vid) {
     175   
     176//     allIdentities.menuItems[selectedValue].setAttribute("accountkey",
     177//                                                         self._document.getElementById("msgIdentity").selectedMenuItem.accountkey);
     178//     allIdentities.menuItems[selectedValue].setAttribute("identitykey", 
     179//                                                         self._document.getElementById("msgIdentity").selectedMenuItem.identitykey);
     180    self._document.getElementById("msgIdentity").selectedMenuItem = allIdentities.menuItems[selectedValue];
     181    if (self._document.getElementById("msgIdentity").vid) {
    171182      var label = self.stringBundle.GetStringFromName("vident.smartIdentity.vIUsage");
    172183      if (allIdentities.number > 1) label += " " + self.stringBundle.GetStringFromName("vident.smartIdentity.moreThanOne");
Note: See TracChangeset for help on using the changeset viewer.