Changeset 643bca
- Timestamp:
- Sep 16, 2008, 8:52:53 PM (14 years ago)
- Branches:
- lite_0.1, multiEdit, ng_0.6, ng_0.6_help, ng_0.8, ng_0.9
- Children:
- 2f8c7f
- Parents:
- b3755b
- Location:
- chrome/content/v_identity
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
chrome/content/v_identity/vI_htmlTextBox.js
rb3755b r643bca 39 39 }, 40 40 41 initByObject : function(object, stringName, outputString, cssSource) {42 vI_htmlTextBox.Obj_TextBox = object;43 if (stringName)44 vI_htmlTextBox.string = document.getElementById("vITextBoxBundle").getString(stringName);45 else if (outputString)46 vI_htmlTextBox.string = outputString;47 vI_htmlTextBox.cssSource = cssSource;48 vI_htmlTextBox.__init();49 },50 51 41 // read the chrome file (copied from http://forums.mozillazine.org/viewtopic.php?p=921150) 52 42 __getContents : function (aURL){ … … 76 66 77 67 __init : function () { 78 if(!vI_htmlTextBox.Obj_TextBox)vI_htmlTextBox.Obj_TextBox = document.getElementById(vI_htmlTextBox.objectID);79 //vI_htmlTextBox.Obj_TextBox.contentDocument80 //.lastChild.setAttribute("style", "background-color: -moz-dialog; font: -moz-dialog;");68 vI_htmlTextBox.Obj_TextBox = document.getElementById(vI_htmlTextBox.objectID); 69 vI_htmlTextBox.Obj_TextBox.contentDocument 70 .lastChild.setAttribute("style", "background-color: -moz-dialog; font: -moz-dialog;"); 81 71 82 72 if (vI_htmlTextBox.cssSource) vI_htmlTextBox.__setCSS(); -
chrome/content/v_identity/vI_htmlTextBox.xml
rb3755b r643bca 37 37 <property name="outputString" > 38 38 <setter><![CDATA[ 39 if (!this._cssRead) this.cssSource = this.getAttribute('cssSource'); // read initial Attribute. 40 41 var oldChilds = this.contentDocument.body.childNodes; 42 while (oldChilds.length > 0) this.contentDocument.body.removeChild(oldChilds[0]) 43 39 44 var text_list = val.split(/\n/) 40 45 for (var i = 0; i < text_list.length; i++) { … … 50 55 ]]></setter> 51 56 </property> 57 <field name="_cssRead">false</field> 52 58 <property name="cssSource" > 53 59 <setter><![CDATA[ 60 if (!val) return; 54 61 var head = this.contentDocument.getElementsByTagName("HEAD").item(0); 55 62 var range = document.createRange(); … … 58 65 var documentFragment = range.createContextualFragment("<style type='text/css'>" + css_text + "</style>"); 59 66 head.appendChild(documentFragment); 67 this._cssRead = true; 60 68 ]]></setter> 61 69 </property> -
chrome/content/v_identity/vI_prefDialog.js
rb3755b r643bca 281 281 document.getElementById("fccReplyFollowsParentBox").setAttribute("hidden", "true"); 282 282 } 283 if (!(typeof(enigSetMenuSettings)=="function")) {284 document.getElementById("openPGPencryption").setAttribute("hidden", "true");285 }283 // if (!(typeof(enigSetMenuSettings)=="function")) { 284 // document.getElementById("openPGPencryption").setAttribute("hidden", "true"); 285 // } 286 286 287 287 vI_prefDialog.base.smartReplyConstraint(document.getElementById("VIdent_identity.smart_reply")); -
chrome/content/v_identity/vI_storage.js
rb3755b r643bca 99 99 isExistingIdentity : function() { 100 100 vI_notificationBar.dump("## vI_storage: isExistingIdentity\n"); 101 if (this.__keyTranslator.getID(this.id)) { 102 // if id is set, just grab the related identity and compare 103 if (this.__equalsIdentity(gAccountManager.getIdentity(this.id))) { 104 vI_notificationBar.dump("## vI_storage: existing Identity found: " + this.id + "\n"); 105 return this.id; 106 } 107 } 108 else { 109 // loop and compare with all Identities 110 var accounts = queryISupportsArray(gAccountManager.accounts, Components.interfaces.nsIMsgAccount); 111 for (var i in accounts) { 112 // skip possible active VirtualIdentity Accounts 113 try { vI_account.prefroot.getBoolPref("mail.account."+accounts[i].key+".vIdentity"); continue; } catch (e) { }; 114 115 var identities = queryISupportsArray(accounts[i].identities, Components.interfaces.nsIMsgIdentity); 116 for (var j in identities) { 117 if (this.__equalsIdentity(identities[j])) { 118 vI_notificationBar.dump("## vI_storage: existing Identity found: " + identities[j].key + "\n"); 119 return identities[j].key; 120 } 101 var accounts = queryISupportsArray(gAccountManager.accounts, Components.interfaces.nsIMsgAccount); 102 for (var i in accounts) { 103 // skip possible active VirtualIdentity Accounts 104 try { vI_account.prefroot.getBoolPref("mail.account."+accounts[i].key+".vIdentity"); continue; } catch (e) { }; 105 106 var identities = queryISupportsArray(accounts[i].identities, Components.interfaces.nsIMsgIdentity); 107 for (var j in identities) { 108 if ( (this.ignoreFullNameWhileComparing || this.fullName == identities[j].fullName) && 109 (this.email == identities[j].email) && 110 this.__equalSMTP(identities[j].smtpServerKey) ) { 111 vI_notificationBar.dump("## vI_storage: existing Identity found: " + identities[j].key + "\n"); 112 return identities[j].key; 121 113 } 122 114 } … … 433 425 var warning = { title: null, recLabel : null, recipient : null, warning : null, css: null, query : null }; 434 426 warning.title = vI.elements.strings.getString("vident." + warningCase + ".title") 435 warning.recLabel = vI.elements.strings.getString("vident." + warningCase + ".recipient") + 427 warning.recLabel = vI.elements.strings.getString("vident." + warningCase + ".recipient") + " (" + recipient.recType + "):" 436 428 warning.recipient = recipient.recDesc; 437 429 warning.warning = -
chrome/content/v_identity/vI_storageExtras.js
rb3755b r643bca 69 69 70 70 function vI_storageExtras(callFunction, resource) { 71 this.extras = [ 71 // function vI_storageExtras_checkbox(field, option, composeDialogElementID, updateFunction, identityValue) { 72 this.extras = [ 73 74 // gReceiptOptionChanged 75 76 72 77 new vI_storageExtras_checkbox( 73 "reciept", "storageExtras_returnReciept", "returnReceiptMenu", null, null),78 "reciept", "storageExtras_returnReciept", "returnReceiptMenu", null, "identity.requestReturnReceipt;"), 74 79 new vI_storageExtras_characterEncoding(), 75 80 new vI_storageExtras_msgFormat(), … … 77 82 new vI_storageExtras_checkbox( 78 83 "sMimeSig", "storageExtras_sMime_messageSignature", "menu_securitySign1", 79 (typeof(setSecuritySettings)=="function")?setSecuritySettings:null, 1), 84 "(typeof(setSecuritySettings)=='function')?setSecuritySettings(1):null;", 85 "identity.getBoolAttribute('sign_mail')"), 80 86 new vI_storageExtras_checkbox( 81 87 "PGPEnc", "storageExtras_openPGP_messageEncryption", "enigmail_encrypted_send", 82 (typeof(enigSetMenuSettings)=="function")?enigSetMenuSettings:null, ''), 88 "(typeof(enigSetMenuSettings)=='function')?enigSetMenuSettings(''):null;", 89 "identity.getIntAttribute('defaultEncryptionPolicy') > 0"), 83 90 new vI_storageExtras_checkbox( 84 91 "PGPSig", "storageExtras_openPGP_messageSignature", "enigmail_signed_send", 85 (typeof(enigSetMenuSettings)=="function")?enigSetMenuSettings:null, ''), 92 "(typeof(enigSetMenuSettings)=='function')?enigSetMenuSettings(''):null;", 93 "(identity.getIntAttribute('defaultEncryptionPolicy') > 0)?identity.getBoolAttribute('pgpSignEncrypted'):identity.getBoolAttribute('pgpSignPlain')"), 86 94 new vI_storageExtras_checkbox( 87 95 "PGPMIME", "storageExtras_openPGP_PGPMIME", "enigmail_sendPGPMime", 88 (typeof(enigSetMenuSettings)=="function")?enigSetMenuSettings:null, '')] 96 "(typeof(enigSetMenuSettings)=='function')?enigSetMenuSettings(''):null;", 97 "identity.getBoolAttribute('pgpMimeMode')") 98 ] 89 99 if (callFunction) this.loopForRDF(callFunction, resource) 90 100 } … … 112 122 for( var i = 0; i < this.extras.length; i++ ) { 113 123 if (this.extras[i].active) { 114 equal = (this.extras[i].equal(storageExtras.extras[i] .value) && equal) // in this order to compare all fields (required for Matrix)124 equal = (this.extras[i].equal(storageExtras.extras[i]) && equal) // in this order to compare all fields (required for Matrix) 115 125 } 116 126 } … … 122 132 for( var i = 0; i < this.extras.length; i++ ) { 123 133 if (this.extras[i].active) { 124 if (this.extras[i]. getLabel(null))134 if (this.extras[i].valueHtml) 125 135 string += "<tr>" + 126 136 "<td class='col1 extras '>" + prefStrings.getString("vident.identityData.extras." + this.extras[i].field) + "</td>" + 127 "<td class='col2 extras '>" + this.extras[i]. getLabel(null)+ "</td>" +137 "<td class='col2 extras '>" + this.extras[i].valueHtml + "</td>" + 128 138 "</tr>" 129 139 } … … 140 150 "<td class='col1 extras " + classEqual + "'>" + prefStrings.getString("vident.identityData.extras." + this.extras[i].field) + "</td>" + 141 151 "<td class='col2 extras " + classEqual + "'>" + this.extras[i].comp.compareValue + "</td>" + 142 "<td class='col3 extras " + classEqual + "'>" + this.extras[i]. comp.value+ "</td>" +152 "<td class='col3 extras " + classEqual + "'>" + this.extras[i].valueHtml + "</td>" + 143 153 "</tr>" 144 154 } … … 156 166 157 167 readIdentityValues : function(identity) { 158 this.readValues(); // has to be build for all extras 168 if (vI_storageExtrasHelper.seamonkey_to_old()) return; 169 for( var i = 0; i < this.extras.length; i++ ) { 170 if (this.extras[i].active) this.extras[i].readIdentityValue(identity) 171 // vI_notificationBar.dump("## vI_storageExtras readIdentityValues "+ this.extras[i].field + "=" + this.extras[i].value + "\n"); 172 } 159 173 }, 160 174 … … 169 183 if (vI_storageExtrasHelper.seamonkey_to_old()) return; 170 184 for( var i = 0; i < this.extras.length; i++ ) { 185 // vI_notificationBar.dump("## vI_storageExtras preparing readValue "+ this.extras[i].field +"\n"); 171 186 if (this.extras[i].active) this.extras[i].readValue() 172 // vI_notificationBar.dump("## vI_storageExtras readValue "+ this.extras[i].field + "=" + this.extras[i].value + "\n");187 // vI_notificationBar.dump("## vI_storageExtras readValue "+ this.extras[i].field + "=" + this.extras[i].value + "\n"); 173 188 } 174 189 }, … … 208 223 function vI_storageExtras_characterEncoding() { 209 224 this.active = vI_storageExtrasHelper.preferences.getBoolPref(this.option) 210 this.comp = { value : null,compareValue : null, equal : null }225 this.comp = { compareValue : null, equal : null } 211 226 } 212 227 vI_storageExtras_characterEncoding.prototype = { … … 216 231 option : "storageExtras_characterEncoding", 217 232 comp : null, 218 219 get Label : function() {233 234 get valueHtml() { 220 235 return this.value?gCharsetConvertManager 221 236 .getCharsetTitle(gCharsetConvertManager.getCharsetAlias(this.value)):""; 222 237 }, 223 equal : function(compareValue) { 224 this.comp.compareValue = compareValue?compareValue:""; 225 this.comp.value = this.value?this.value:""; 226 this.comp.equal = (this.value == null || this.value == compareValue); 238 239 // function to read the value from a given identity 240 readIdentityValue : function(identity) { }, // no charset per identity 241 242 equal : function(compareStorageExtra) { 243 this.comp.compareValue = compareStorageExtra.valueHtml; 244 this.comp.equal = (!this.value || !compareStorageExtra.value || this.value == compareStorageExtra.value); 227 245 return this.comp.equal; 228 246 }, … … 278 296 comp : null, 279 297 280 get Label : function() {298 get valueHtml() { 281 299 return this.value?document.getElementById(this.value).label:""; 282 300 }, 283 equal : function(compareValue) { 284 this.comp.compareValue = compareValue?document.getElementById(compareValue).label:""; 285 this.comp.value = this.value?document.getElementById(this.value).label:""; 286 this.comp.equal = (this.value == null || this.value == compareValue); 301 302 // function to read the value from a given identity 303 readIdentityValue : function(identity) { }, // no msgFormat per identity 304 305 equal : function(compareStorageExtra) { 306 this.comp.compareValue = compareStorageExtra.valueHtml; 307 this.comp.equal = (!this.value || !compareStorageExtra.value || this.value == compareStorageExtra.value); 287 308 return this.comp.equal; 288 309 }, … … 329 350 comp : null, 330 351 331 getLabel : function(value) { 332 if (value == null) value = this.value; 333 switch (value) { 334 case "true": 335 return "<div class='bool checked'><label class='screen'> <label><label class='braille'>yes</label></div>" 336 case "false": 337 return "<div class='bool'><label class='screen'> <label><label class='braille'>no</label></div>" 338 } 339 return ""; 340 }, 341 342 equal : function(compareValue) { 343 this.comp.value = this.getLabel(this.value); 344 this.comp.compareValue = this.getLabel(compareValue); 345 this.comp.equal = (this.value == null || this.value == compareValue); 352 get valueHtml() { 353 if (!this.value) return ""; 354 return "<div class='bool" + ((this.value=="true")?" checked":"") + "'>" + 355 "<label class='screen'> </label>" + 356 "<label class='braille'>" + ((this.value=="true")?"yes":"no") + "</label>" + 357 "</div>" 358 }, 359 360 equal : function(compareStorageExtra) { 361 this.comp.compareValue = compareStorageExtra.valueHtml; 362 this.comp.equal = (this.value == null || this.value == compareStorageExtra.value); 346 363 return this.comp.equal; 364 }, 365 366 // function to read the value from a given identity 367 readIdentityValue : function(identity) { 368 this.value = (identity.getIntAttribute("encryptionpolicy") == 2)?"true":"false" 347 369 }, 348 370 // function to set or read the value from/to the MessageCompose Dialog … … 374 396 } 375 397 376 function vI_storageExtras_checkbox(field, option, composeDialogElementID, updateFunction, updateFunctionParam1) { 377 this.field = field; 378 this.option = option; 398 // a general checkbox for extra options. Has to provide some additional information 399 function vI_storageExtras_checkbox(field, option, composeDialogElementID, updateFunction, identityValue) { 400 this.field = field; // description of the option 401 this.option = option; // option string to get preference settings 379 402 this.composeDialogElementID = composeDialogElementID; 380 403 this.updateFunction = updateFunction; 381 this. updateFunctionParam1 = updateFunctionParam1;404 this.valueFromIdentityFunction = identityValue; 382 405 this.active = vI_storageExtrasHelper.preferences.getBoolPref(this.option) && 383 406 document.getElementById(this.composeDialogElementID); 384 this.comp = { value : null,compareValue : null, equal : null }407 this.comp = { compareValue : null, equal : null } 385 408 } 386 409 vI_storageExtras_checkbox.prototype = { … … 392 415 composeDialogElementID : null, 393 416 updateFunction : null, // some elements have to be updated before the can be read 394 updateFunctionParam1: null,417 valueFromIdentityFunction : null, 395 418 396 getLabel : function(value) { 397 if (value == null) value = this.value; 398 switch (value) { 399 case "true": 400 return "<div class='bool checked'><label class='screen'> <label><label class='braille'>yes</label></div>" 401 case "false": 402 return "<div class='bool'><label class='screen'> <label><label class='braille'>no</label></div>" 403 } 404 return ""; 405 }, 406 407 equal : function(compareValue) { 408 this.comp.value = this.getLabel(this.value); 409 this.comp.compareValue = this.getLabel(compareValue); 410 this.comp.equal = (this.value == null || this.value == compareValue); 419 get valueHtml() { 420 if (!this.value) return ""; 421 return "<div class='bool" + ((this.value=="true")?" checked":"") + "'>" + 422 "<label class='screen'> </label>" + 423 "<label class='braille'>" + ((this.value=="true")?"yes":"no") + "</label>" + 424 "</div>" 425 }, 426 427 equal : function(compareStorageExtra) { 428 this.comp.compareValue = compareStorageExtra.valueHtml; 429 this.comp.equal = (this.value == null || this.value == compareStorageExtra.value); 411 430 return this.comp.equal; 431 }, 432 433 // function to read the value from a given identity 434 readIdentityValue : function(identity) { 435 this.value = eval(this.valueFromIdentityFunction)?"true":"false"; 412 436 }, 413 437 // function to set or read the value from/to the MessageCompose Dialog … … 424 448 var element = document.getElementById(this.composeDialogElementID) 425 449 if (!element) return; 426 if (this.updateFunction) this.updateFunction(this.updateFunctionParam1);450 if (this.updateFunction) eval(this.updateFunction); 427 451 this.value = ((element.getAttribute("checked") == "true")?"true":"false") 428 452 }, -
chrome/content/v_identity/v_identity.js
rb3755b r643bca 312 312 vI.tempStorage.BaseIdentity = vI.elements.Obj_MsgIdentity.selectedItem; 313 313 vI.tempStorage.NewIdentity = document.createElement("menuitem"); 314 MenuItem.className = "identity-popup-item";314 vI.tempStorage.NewIdentity.className = "identity-popup-item"; 315 315 316 316 // set the account name in the choosen menu item 317 MenuItem.setAttribute("label", vI_account.account.defaultIdentity.identityName);318 MenuItem.setAttribute("accountname", " - " + vI_account.account.incomingServer.prettyName);319 MenuItem.setAttribute("accountkey", vI_account.account.key);320 MenuItem.setAttribute("value", vI_account.account.defaultIdentity.key);321 322 vI.elements.Obj_MsgIdentityPopup.appendChild( MenuItem);317 vI.tempStorage.NewIdentity.setAttribute("label", vI_account.account.defaultIdentity.identityName); 318 vI.tempStorage.NewIdentity.setAttribute("accountname", " - " + vI_account.account.incomingServer.prettyName); 319 vI.tempStorage.NewIdentity.setAttribute("accountkey", vI_account.account.key); 320 vI.tempStorage.NewIdentity.setAttribute("value", vI_account.account.defaultIdentity.key); 321 322 vI.elements.Obj_MsgIdentityPopup.appendChild(vI.tempStorage.NewIdentity); 323 323 vI.__setSelectedIdentity(vI.tempStorage.NewIdentity); 324 324 }, -
chrome/content/v_identity/v_identity.xml
rb3755b r643bca 46 46 <implementation> 47 47 <method name="addTooltip"> 48 <parameter name=" identityData" />49 <parameter name=" randID" />48 <parameter name="elem" /> 49 <parameter name="permanent" /> 50 50 <body><![CDATA[ 51 vI_notificationBar.dump("** v_identity.xml: addTooltip.\n"); 52 var randID = elem.tooltipElem.getAttribute("tooltip"); 51 53 this.removeTooltip(randID); 52 if (!randID) randID = "tooltip_" + parseInt((new Date()).getTime()); 54 if (!randID) { 55 randID = "tooltip_" + parseInt((new Date()).getTime()); 56 elem.tooltipElem.setAttribute("tooltip", randID); 57 } 53 58 var toolTip = document.createElement("tooltip"); 54 59 toolTip.setAttribute("class", "identityDataTooltip"); 55 60 toolTip.setAttribute("id", randID); 56 toolTip.identityData = identityData; 61 toolTip.elem = elem; 62 toolTip.permanent = permanent; 63 vI_notificationBar.dump("** v_identity.xml: addTooltip 3.\n"); 57 64 this.appendChild(toolTip); 58 return randID;65 vI_notificationBar.dump("** v_identity.xml: addTooltip done.\n"); 59 66 ]]></body> 60 67 </method> … … 69 76 70 77 <binding id="vI_identityDataTooltip" extends="chrome://global/content/bindings/popup.xml#tooltip"> 71 <content onpopup showing="this.popupshowing();this.resize()" onpopupshown="this.resize()" >72 <xul:browser style="overflow:hidden" anonid="tooltipBrowser" class="vI_htmlTextBox" flex="1" disablehistory="true" onoverflow="document.getBindingParent(this).resize()"/>78 <content onpopuphidden="popuphidden();" onpopupshowing="this.popupshowing();this.resize()" onpopupshown="this.resize()" > 79 <xul:browser style="overflow:hidden" anonid="tooltipBrowser" class="vI_htmlTextBox" cssSource="vI_TooltipBrowser.css" flex="1" disablehistory="true" onoverflow="document.getBindingParent(this).resize()"/> 73 80 <children /> 74 81 </content> … … 76 83 <method name="popupshowing"> 77 84 <body><![CDATA[ 78 if (this.identityData && !this._initialized) { 79 if (!this._identityInfo) this._identityInfo = 80 "<table><tr><td colspan='2' class='name'>" + 81 this.identityData.combinedNameHtml + 82 "</td></tr>" + 83 "<tr><td class='image'><img src='chrome://v_identity/skin/vi-info.png' /></td>" + 84 "<td class='identityTable'>" + 85 "<table><tbody>" + this.identityData.getMatrix() + "</tbody></table>" + 86 "</td></tr></table>" 85 vI_notificationBar.dump("** v_identity.xml: popupshowing\n"); 86 if (!this._identityInfo) { 87 vI_notificationBar.dump("** v_identity.xml: popupshowing 2\n"); 88 this._identityInfo = 89 "<table>" + 90 "<tr>" + 91 "<td colspan='2' class='name'>" + this.elem.identityData.combinedNameHtml + "</td>" + 92 "</tr><tr>" + 93 "<td class='image'><img src='chrome://v_identity/skin/vi-info.png' /></td>" + 94 "<td class='identityTable'><table><tbody>" + this.elem.identityData.getMatrix() + "</tbody></table></td>" + 95 "</tr>" + 96 "</table>" 87 97 this._tooltipBrowser.outputString = this._identityInfo; 88 this._tooltipBrowser.cssSource = "vI_TooltipBrowser.css"; 89 this._initialized = true; 90 } 91 ]]></body> 92 </method> 98 } 99 vI_notificationBar.dump("** v_identity.xml: popupshowing done.\n"); 100 ]]></body> 101 </method> 102 <method name ="popuphidden"> 103 <body><![CDATA[ 104 vI_notificationBar.dump("** v_identity.xml: popuphidden\n"); 105 if (!this.permanent) this._identityInfo = null; 106 ]]></body> 107 </method> 93 108 <method name="resize"> 94 109 <body><![CDATA[ 110 if (!this._identityInfo) return; 111 vI_notificationBar.dump("** v_identity.xml: resize.\n"); 95 112 var width = document.getElementById("msgIdentity_clone").boxObject.width * 0.7; 96 113 var height = this._tooltipBrowser.contentDocument.lastChild.scrollHeight + 5; … … 98 115 width = document.getElementById("msgIdentity_clone").boxObject.width * 0.75; 99 116 this.sizeTo(width, height); 100 ]]></body> 101 </method> 102 <field name="blocked">false</field> 103 <field name="identityData" /> 117 vI_notificationBar.dump("** v_identity.xml: resize done.\n"); 118 ]]></body> 119 </method> 120 <field name="permanent" /> 121 <field name="elem" /> 122 <!-- <field name="identityData">this.elem.identityData</field> --> 104 123 <field name="_identityInfo">false</field> 105 <field name="_initialized">false</field>124 <!-- <field name="_initialized">false</field> --> 106 125 <field name="_tooltipBrowser">document.getAnonymousElementByAttribute(this, "anonid", "tooltipBrowser")</field> 107 126 </implementation> … … 124 143 this.description = this._identityDataStorage.sideDescription; 125 144 126 this.setAttribute("tooltip", 127 document.getElementById("vI_tooltipPopupset") 128 .addTooltip(this._identityDataStorage, this.getAttribute("tooltip"))); 145 document.getElementById("vI_tooltipPopupset").addTooltip(this, true); 129 146 ]]> 130 147 </constructor> … … 132 149 <body><![CDATA[ 133 150 document.getElementById("vI_tooltipPopupset") 134 .removeTooltip(this. getAttribute("tooltip"));151 .removeTooltip(this.tooltipElem.getAttribute("tooltip")); 135 152 ]]></body> 136 153 </method> … … 141 158 </destructor> 142 159 <property name="_identityData" onget="return this._identityDataStorage;" /> 160 <field name="tooltipElem">this</field> 143 161 <property name="vid" onget="return this.getAttribute('vid');" onset="this.setAttribute('vid', val); return val;" /> 144 162 <property name="label" onget="return this.getAttribute('label');" onset="this.setAttribute('label', val); return val;" /> … … 267 285 if (!inputTextbox.timeout) inputTextbox.setAttribute("type", "timed"); 268 286 inputTextbox.setAttribute("timeout", "300") 287 288 document.getElementById("vI_tooltipPopupset").addTooltip(this, false); 269 289 ]]> 270 290 </constructor> … … 272 292 <![CDATA[ 273 293 document.getElementById("vI_tooltipPopupset") 274 .removeTooltip(this. getAttribute("tooltip"));294 .removeTooltip(this.tooltipElem.getAttribute("tooltip")); 275 295 ]]> 276 296 </destructor> … … 296 316 vI_notificationBar.dump("** v_identity.xml: clone_Obj_MsgIdentity\n"); 297 317 298 this.dontInitExtras = true;299 318 var MenuItems = this._msgIdentityPopupElem.childNodes 300 319 for (var index = 0; index < MenuItems.length; index++) { … … 315 334 } 316 335 this._popupMenu_separator = true; 317 this.dontInitExtras = false;318 336 319 337 vI_msgIdentityCloneTools.initReplyToFields(this.value); … … 329 347 } 330 348 this.selectedItem = null; 349 this.identityData = null; 331 350 ]]></body> 332 351 </method> … … 437 456 this.setAttribute("label", this.label); 438 457 439 this.tooltipElem.setAttribute("tooltip",440 document.getElementById("vI_tooltipPopupset")441 .addTooltip(this._identityDataStorage, this.tooltipElem.getAttribute("tooltip")));442 443 458 var existingIdentity = this.checkForVirtualIdentity(); 444 459 if (existingIdentity) this.selectedMenuItem = existingIdentity; … … 462 477 this.identityData.smtp = val; 463 478 464 this.tooltipElem.setAttribute("tooltip", 465 document.getElementById("vI_tooltipPopupset") 466 .addTooltip(this._identityDataStorage, this.tooltipElem.getAttribute("tooltip"))); 479 document.getElementById("vI_tooltipPopupset").addTooltip(this); 467 480 468 481 var existingIdentity = this.checkForVirtualIdentity(); … … 470 483 ]]></setter> 471 484 </property> 472 <field name="dontInitExtras" /> 473 <property name="identityData" onget="return this._identityDataStorage;" > 485 <property name="identityData"> 486 <getter><![CDATA[ 487 vI_notificationBar.dump("** v_identity.xml: read identityData.\n"); 488 this._identityDataStorage.extras.readValues(); // update with current data 489 vI_notificationBar.dump("** v_identity.xml: extras update done identityData.\n"); 490 return this._identityDataStorage; 491 ]]></getter> 474 492 <setter><![CDATA[ 475 vI_notificationBar.dump("** v_identity.xml: updating DataStorage.\n"); 476 var oldIdentityData = this._identityDataStorage; 477 this._identityDataStorage = val; 478 if (!this._identityDataStorage.id) { 479 this._identityDataStorage.id = oldIdentityData.id; 480 var idName = this._identityDataStorage.idName; 481 this._identityDataStorage.sideDescription = (idName)?" - "+idName:""; 482 } 483 this.label = this._identityDataStorage.combinedName; 484 this.value = this._identityDataStorage.id; 485 this.description = this._identityDataStorage.sideDescription; 486 document.getAnonymousElementByAttribute(this, "anonid", "smtpServerListHbox").smtp = this._identityDataStorage.smtp; 487 488 if (!this.dontInitExtras) { 489 vI_notificationBar.dump("** v_identity.xml: set extra Values\n"); 490 this._identityDataStorage.extras.setValues(); 491 } 492 vI_notificationBar.dump("** v_identity.xml: read extra Values\n"); 493 this._identityDataStorage.extras.readValues(); // fill in the missing Values 494 495 this.checkForVirtualIdentity(); 496 497 this.tooltipElem.setAttribute("tooltip", 498 document.getElementById("vI_tooltipPopupset") 499 .addTooltip(this._identityDataStorage, this.tooltipElem.getAttribute("tooltip"))); 500 501 vI_notificationBar.dump("** v_identity.xml: updating DataStorage done.\n"); 493 if (!val) this._identityDataStorage = null 494 else { 495 vI_notificationBar.dump("** v_identity.xml: updating DataStorage.\n"); 496 var oldIdentityData = this._identityDataStorage; 497 this._identityDataStorage = val; 498 499 if (oldIdentityData) { // indicates that it's not first time after clean 500 if (!this._identityDataStorage.id) { 501 this._identityDataStorage.id = oldIdentityData.id; 502 var idName = this._identityDataStorage.idName; 503 this._identityDataStorage.sideDescription = (idName)?" - "+idName:""; 504 } 505 vI_notificationBar.dump("** v_identity.xml: set extra Values\n"); 506 this._identityDataStorage.extras.setValues(); 507 508 this.checkForVirtualIdentity(); 509 } 510 else this.vid = false; // first time after clean it's always a real identity 511 512 this.label = this._identityDataStorage.combinedName; 513 this.value = this._identityDataStorage.id; 514 this.description = this._identityDataStorage.sideDescription; 515 document.getAnonymousElementByAttribute(this, "anonid", "smtpServerListHbox").smtp = this._identityDataStorage.smtp; 516 517 vI_notificationBar.dump("** v_identity.xml: updating DataStorage done.\n"); 518 } 502 519 ]]></setter> 503 520 </property>
Note: See TracChangeset
for help on using the changeset viewer.