Changeset 509348 for modules/identityDataExtras/messageFormat.js
- Timestamp:
- Nov 3, 2014, 12:35:40 PM (8 years ago)
- Branches:
- ng_0.9
- Children:
- 7204cb
- Parents:
- 3c9c29
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/identityDataExtras/messageFormat.js
r3c9c29 r509348 36 36 function identityDataExtrasObject_messageFormat(currentWindow) { 37 37 this.currentWindow = currentWindow; 38 this.field = "msgFormat";// description of the option39 this.option = "storageExtras_messageFormat"; 38 this.field = "msgFormat"; // description of the option 39 this.option = "storageExtras_messageFormat"; // option string to get preference settings 40 40 } 41 41 identityDataExtrasObject_messageFormat.prototype = { 42 42 __proto__: identityDataExtrasObject.prototype, 43 43 44 44 // functions to get nicely formatted output 45 get valueHtml() { return this.valueNice; }, 45 get valueHtml() { 46 return this.valueNice; 47 }, 46 48 get valueNice() { 47 return this.value ?this.currentWindow.document.getElementById(this.value).label:"";49 return this.value ? this.currentWindow.document.getElementById(this.value).label : ""; 48 50 }, 49 51 50 setValueToEnvironment_msgCompose: function () {52 setValueToEnvironment_msgCompose: function () { 51 53 if (this.value == null) 52 54 return 53 55 this.currentWindow.document.getElementById("outputFormatMenu").removeAttribute("hidden"); 54 this.currentWindow.document.getElementById(this.value).setAttribute("checked", "true");56 this.currentWindow.document.getElementById(this.value).setAttribute("checked", "true"); 55 57 this.currentWindow.OutputFormatMenuSelect(this.currentWindow.document.getElementById(this.value)) 56 58 }, 57 58 setValueToEnvironment_dataEditor: function () {59 60 setValueToEnvironment_dataEditor: function () { 59 61 if (this.value != null) { 60 62 this.currentWindow.document.getElementById("outputFormatMenu").selectedItem = this.currentWindow.document.getElementById(this.value); … … 62 64 } 63 65 this.currentWindow.document.getElementById("vI_" + this.option + "_store").doCommand(); 64 },65 66 getValueFromEnvironment_msgCompose: function () {66 }, 67 68 getValueFromEnvironment_msgCompose: function () { 67 69 const nsIMsgCompSendFormat = Components.interfaces.nsIMsgCompSendFormat; 68 70 switch (this.currentWindow.gSendFormat) { 69 case nsIMsgCompSendFormat.AskUser: this.value = "format_auto"; break; 70 case nsIMsgCompSendFormat.PlainText: this.value = "format_plain"; break; 71 case nsIMsgCompSendFormat.HTML: this.value = "format_html"; break; 72 case nsIMsgCompSendFormat.Both: this.value = "format_both"; break; 71 case nsIMsgCompSendFormat.AskUser: 72 this.value = "format_auto"; 73 break; 74 case nsIMsgCompSendFormat.PlainText: 75 this.value = "format_plain"; 76 break; 77 case nsIMsgCompSendFormat.HTML: 78 this.value = "format_html"; 79 break; 80 case nsIMsgCompSendFormat.Both: 81 this.value = "format_both"; 82 break; 73 83 } 74 84 }, 75 76 getValueFromEnvironment_dataEditor: function () {85 86 getValueFromEnvironment_dataEditor: function () { 77 87 if (this.currentWindow.document.getElementById("vI_" + this.option + "_store").getAttribute("checked") == "true") 78 88 this.value = this.currentWindow.document.getElementById("outputFormatMenu").selectedItem.id
Note: See TracChangeset
for help on using the changeset viewer.