Changeset ee2df4
- Timestamp:
- Aug 25, 2018, 12:03:23 PM (2 years ago)
- Branches:
- ng_0.9
- Children:
- acf7ad
- Parents:
- fab458
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/vI_smartIdentity.js
rfab458 ree2df4 58 58 var msgHdr; 59 59 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")) 61 61 62 62 var newsgroup = this._msgCompose.compFields.newsgroups; … … 71 71 case msgComposeTypeReference.ReplyWithTemplate: 72 72 case msgComposeTypeReference.ReplyToList: 73 case msgComposeTypeReference.ReplyIgnoreQuote: 73 74 Log.debug("Reply"); 74 75 msgHdr = this.messenger. 75 76 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, 77 78 newsgroup, this._getRecipients()); 78 79 this._smartIdentityCollection.Reply(); … … 84 85 msgHdr = this.messenger. 85 86 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, 87 88 newsgroup, this._getRecipients()); 88 89 this._smartIdentityCollection.Draft(); … … 94 95 case msgComposeTypeReference.NewsPost: 95 96 case msgComposeTypeReference.MailToUrl: 97 case msgComposeTypeReference.EditAsNew: 98 case msgComposeTypeReference.EditTemplate: 96 99 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, 98 101 newsgroup, this._getRecipients()); 99 102 // to enable composing new email with new identity: identity is hidden in subject line … … 109 112 break; 110 113 } 111 if (this._smartIdentityCollection._allIdentities.number > 0) this.__smartIdentitySelection(autocreate); 114 if (this._smartIdentityCollection && 115 this._smartIdentityCollection._allIdentities.number > 0) this.__smartIdentitySelection(autocreate); 112 116 }, 113 117 … … 136 140 Log.debug("found existing Identity, use without interaction."); 137 141 // 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); 139 143 this.changeIdentityToSmartIdentity(this, existingIDIndex.key); 140 144 return; … … 142 146 } 143 147 144 this._document.getElementById("virtualIdentityExtension_msgIdentityClone").addIdentitiesToCloneMenu(this._smartIdentityCollection._allIdentities); 148 this._document.getElementById("msgIdentity").addIdentitiesToCloneMenu(this._smartIdentityCollection._allIdentities); 149 150 145 151 Log.debug("__smartIdentitySelection _allIdentities.number=" + 146 152 this._smartIdentityCollection._allIdentities.number + … … 167 173 Log.debug("changeIdentityToSmartIdentity selectedValue=" + selectedValue + " from " + allIdentities.number); 168 174 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) { 171 182 var label = self.stringBundle.GetStringFromName("vident.smartIdentity.vIUsage"); 172 183 if (allIdentities.number > 1) label += " " + self.stringBundle.GetStringFromName("vident.smartIdentity.moreThanOne");
Note: See TracChangeset
for help on using the changeset viewer.