Changeset 039e6e
- Timestamp:
- Jul 17, 2009, 9:52:25 PM (12 years ago)
- Branches:
- lite_0.1, multiEdit, ng_0.6, ng_0.6_help, ng_0.8, ng_0.9
- Children:
- 193c97
- Parents:
- e7fe3d
- Location:
- chrome
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
chrome/content/v_identity/vI_prefDialog.js
re7fe3d r039e6e 108 108 } 109 109 }, 110 110 111 111 savePrefs : function() { 112 112 for( var i = 0; i < vI_prefDialog.base._elementIDs.length; i++ ) { … … 132 132 }, 133 133 134 idSelectionConstraint : function() { 134 modifyAttribute : function(elemID, attribute, value) { 135 if (value) document.getElementById(elemID).removeAttribute(attribute); 136 else document.getElementById(elemID).setAttribute(attribute, "true"); 137 }, 138 139 constraints : function() { 135 140 var storage = document.getElementById("VIdent_identity.storage").checked; 136 141 var smartDraft = document.getElementById("VIdent_identity.smart_draft").checked; 137 142 var smartReply = document.getElementById("VIdent_identity.smart_reply").checked; 138 vI_prefDialog.base.idSelectionConstraint1(storage && smartReply); 139 vI_prefDialog.base.idSelectionConstraint2(storage || smartReply || smartDraft); 140 if (storage || smartReply || smartDraft) vI_prefDialog.base.idSelectionResultConstraint() 141 }, 142 143 idSelectionConstraint1 : function(checked) { 144 var elementIDs = [ 145 "VIdent_identity.idSelection_storage_prefer_smart_reply", 146 "VIdent_identity.idSelection_storage_ignore_smart_reply"]; 147 for( var i = 0; i < elementIDs.length; i++ ) { 148 if (checked) document.getElementById(elementIDs[i]).removeAttribute("disabled"); 149 else document.getElementById(elementIDs[i]).setAttribute("disabled", "true"); 150 } 151 }, 152 153 idSelectionConstraint2 : function(checked) { 154 var elementIDs = [ 155 "VIdent_identity.idSelection_ask", 156 "VIdent_identity.idSelection_ask_always", 157 "VIdent_identity.idSelection_autocreate", 158 "VIdent_identity.idSelection_autocreate.desc",]; 159 for( var i = 0; i < elementIDs.length; i++ ) { 160 if (checked) document.getElementById(elementIDs[i]).removeAttribute("disabled"); 161 else document.getElementById(elementIDs[i]).setAttribute("disabled", "true"); 162 } 163 }, 164 165 smartReplyConstraint : function(element) { 166 var elementIDs = [ 167 "VIdent_identity.smart_reply_for_newsgroups", 168 "VIdent_identity.smart_reply_headers", 169 "VIdent_identity.smart_reply_filter", 170 "VIdent_identity.smart_reply_defaultFullName", 171 "VIdent_identity.smart_reply_ignoreFullName", 172 "VIdent_identity.smart_reply_headers_reset", 173 "VIdent_identity.smart_detectByReceivedHeader"]; 174 for( var i = 0; i < elementIDs.length; i++ ) { 175 if (element.checked) document.getElementById(elementIDs[i]).removeAttribute("disabled"); 176 else document.getElementById(elementIDs[i]).setAttribute("disabled", "true"); 177 } 178 vI_prefDialog.base.idSelectionConstraint(); 179 }, 180 143 var mAttr = vI_prefDialog.base.modifyAttribute; 144 145 // idSelectionConstraint 146 var idSelectionConstraint = (storage || smartReply || smartDraft); 147 mAttr("VIdent_identity.idSelection_ask","disabled",idSelectionConstraint); 148 mAttr("VIdent_identity.idSelection_ask_always","disabled",idSelectionConstraint); 149 mAttr("VIdent_identity.idSelection_autocreate","disabled",idSelectionConstraint); 150 mAttr("VIdent_identity.idSelection_autocreate.desc","disabled",idSelectionConstraint); 151 mAttr("selection","featureDisabled",idSelectionConstraint); 152 mAttr("toCompose","featureDisabled",idSelectionConstraint); 153 154 // idSelectionInputConstraint 155 var idSelectionInputConstraint = (storage && smartReply); 156 mAttr("VIdent_identity.idSelection_storage_prefer_smart_reply","disabled",idSelectionInputConstraint); 157 mAttr("VIdent_identity.idSelection_storage_ignore_smart_reply","disabled",idSelectionInputConstraint); 158 if (idSelectionInputConstraint) vI_prefDialog.base.idSelectionResultConstraint(); 159 160 // sourceEmailConstraint 161 var sourceEmailConstraint = (smartReply || smartDraft); 162 mAttr("sourceEmail","featureDisabled",sourceEmailConstraint); 163 mAttr("toSelection","featureDisabled",sourceEmailConstraint); 164 165 }, 166 181 167 idSelectionResultConstraint : function() { 182 168 var ask = document.getElementById("VIdent_identity.idSelection_ask") … … 188 174 autocreate_desc.setAttribute("disabled", (ask.checked && ask_always.checked)) 189 175 autocreate_desc.setAttribute("hidden", !ask.checked) 176 }, 177 178 smartReplyConstraint : function(element) { 179 var mAttr = vI_prefDialog.base.modifyAttribute; 180 mAttr("VIdent_identity.smart_reply_for_newsgroups","disabled",element.checked); 181 mAttr("VIdent_identity.smart_reply_headers","disabled",element.checked); 182 mAttr("VIdent_identity.smart_reply_filter","disabled",element.checked); 183 mAttr("VIdent_identity.smart_reply_defaultFullName","disabled",element.checked); 184 mAttr("VIdent_identity.smart_reply_ignoreFullName","disabled",element.checked); 185 mAttr("VIdent_identity.smart_reply_headers_reset","disabled",element.checked); 186 mAttr("VIdent_identity.smart_detectByReceivedHeader","disabled",element.checked); 187 vI_prefDialog.base.constraints(); 190 188 }, 191 189 … … 222 220 223 221 storageConstraint : function(element) { 224 var elementIDs = [ 225 "VIdent_identity.storage_storedefault", 226 "VIdent_identity.storage_store_base_id", 227 "VIdent_identity.storage_dont_update_multiple", 228 "VIdent_identity.storage_show_switch", 229 "VIdent_identity.storage_warn_update", 230 "VIdent_identity.storage_warn_vI_replace", 231 "VIdent_identity.storage_notification", 232 "VIdent_identity.storage_getOneOnly", 233 "VIdent_identity.storageExtras_returnReciept", 234 "VIdent_identity.storageExtras_characterEncoding", 235 "VIdent_identity.storageExtras_messageFormat", 236 "VIdent_identity.storageExtras_sMime_messageEncryption", 237 "VIdent_identity.storageExtras_sMime_messageSignature", 238 "VIdent_identity.storageExtras_openPGP_messageEncryption", 239 "VIdent_identity.storageExtras_openPGP_messageSignature", 240 "VIdent_identity.storageExtras_openPGP_PGPMIME"]; 241 for( var i = 0; i < elementIDs.length; i++ ) { 242 if (element.checked) document.getElementById(elementIDs[i]).removeAttribute("disabled"); 243 else document.getElementById(elementIDs[i]).setAttribute("disabled", "true"); 244 } 245 var imageIDs = ["storageOut", "storageUp", "storageUpDown"]; 246 for( var i = 0; i < imageIDs.length; i++ ) { 247 if (element.checked) document.getElementById(imageIDs[i]).removeAttribute("feature"); 248 else document.getElementById(imageIDs[i]).setAttribute("feature", "off"); 249 } 250 vI_prefDialog.base.idSelectionConstraint(); 222 var mAttr = vI_prefDialog.base.modifyAttribute; 223 mAttr("VIdent_identity.storage_storedefault","disabled",element.checked); 224 mAttr("VIdent_identity.storage_store_base_id","disabled",element.checked); 225 mAttr("VIdent_identity.storage_dont_update_multiple","disabled",element.checked); 226 mAttr("VIdent_identity.storage_show_switch","disabled",element.checked); 227 mAttr("VIdent_identity.storage_warn_update","disabled",element.checked); 228 mAttr("VIdent_identity.storage_warn_vI_replace","disabled",element.checked); 229 mAttr("VIdent_identity.storage_notification","disabled",element.checked); 230 mAttr("VIdent_identity.storage_getOneOnly","disabled",element.checked); 231 mAttr("VIdent_identity.storageExtras_returnReciept","disabled",element.checked); 232 mAttr("VIdent_identity.storageExtras_characterEncoding","disabled",element.checked); 233 mAttr("VIdent_identity.storageExtras_messageFormat","disabled",element.checked); 234 mAttr("VIdent_identity.storageExtras_sMime_messageEncryption","disabled",element.checked); 235 mAttr("VIdent_identity.storageExtras_sMime_messageSignature","disabled",element.checked); 236 mAttr("VIdent_identity.storageExtras_openPGP_messageEncryption","disabled",element.checked); 237 mAttr("VIdent_identity.storageExtras_openPGP_messageSignature","disabled",element.checked); 238 mAttr("VIdent_identity.storageExtras_openPGP_PGPMIME","disabled",element.checked); 239 mAttr("storageOut","featureDisabled",element.checked); 240 mAttr("storageUp","featureDisabled",element.checked); 241 mAttr("storageUpDown","featureDisabled",element.checked); 242 vI_prefDialog.base.constraints(); 251 243 } 252 244 }, … … 276 268 vI_prefDialog.base.smartReplyHideSignature(); 277 269 vI_prefDialog.base.storageConstraint(document.getElementById("VIdent_identity.storage")); 278 vI_prefDialog.base. idSelectionConstraint();270 vI_prefDialog.base.constraints(); 279 271 if (vI_storageExtrasHelper.seamonkey_to_old()) 280 272 document.getElementById("storageTab2").setAttribute("hidden", "true") -
chrome/content/v_identity/vI_prefDialog.xul
re7fe3d r039e6e 89 89 oncommand="document.getElementById('prefTabbox').selectedIndex = 1;" 90 90 tooltiptext="&vI_prefDialog.tabbox.tab1.label;" /> 91 <vbox><spacer flex="1"/><image class="arrow" id="to Selection" /><spacer flex="1"/></vbox>91 <vbox><spacer flex="1"/><image class="arrow" id="toCompose" /><spacer flex="1"/></vbox> 92 92 <radio pane="source" id="composeDialog" 93 93 oncommand="document.getElementById('prefTabbox').selectedIndex = 2;" 94 94 tooltiptext="&vI_prefDialog.tabbox.tab2.label;" /> 95 <vbox><spacer flex="1"/><image class="arrow" id="toSe lection" /><spacer flex="1"/></vbox>95 <vbox><spacer flex="1"/><image class="arrow" id="toSend" /><spacer flex="1"/></vbox> 96 96 <radio pane="source" id="emailOut" 97 97 oncommand="document.getElementById('prefTabbox').selectedIndex = 3;" … … 162 162 <checkbox id="VIdent_identity.smart_draft" label="&vI_prefDialog.smartDraft.label;" 163 163 tooltiptext="&vI_prefDialog.smartDraft.tooltiptext;" prefstring="smart_draft" 164 oncommand="vI_prefDialog.base. idSelectionConstraint();" />164 oncommand="vI_prefDialog.base.constraints();" /> 165 165 </groupbox> 166 166 <groupbox> … … 221 221 <hbox> 222 222 <description class="widthX">&vI_prefDialog.smartReply.defaultFullname.label;</description> 223 <vbox><spacer flex="1"/><textbox id="VIdent_identity.smart_reply_defaultFullName" flex="1"223 <vbox><spacer flex="1"/><textbox id="VIdent_identity.smart_reply_defaultFullName" 224 224 prefstring="smart_reply_defaultFullName" size="20" /><spacer flex="1"/></vbox> 225 225 </hbox> -
chrome/skin/classic/v_identity/v_identity.css
re7fe3d r039e6e 49 49 50 50 radio#sourceEmail { -moz-image-region: rect(0px, 338px, 52px, 280px) } 51 radio#sourceEmail[feature ="off"] { -moz-image-region: rect(104px, 338px, 156px, 280px) }51 radio#sourceEmail[featureDisabled="true"] { -moz-image-region: rect(104px, 338px, 156px, 280px) } 52 52 radio#sourceEmail:hover { -moz-image-region: rect(52px, 338px, 104px, 280px) } 53 53 radio#selection { -moz-image-region: rect(0px, 168px, 52px, 112px) } 54 radio#selection[feature ="off"] { -moz-image-region: rect(104px, 168px, 156px, 112px) }54 radio#selection[featureDisabled="true"] { -moz-image-region: rect(104px, 168px, 156px, 112px) } 55 55 radio#selection:hover { -moz-image-region: rect(52px, 168px, 104px, 112px) } 56 56 radio#composeDialog { -moz-image-region: rect(0px, 112px, 52px, 56px) } 57 radio#composeDialog[feature ="off"] { -moz-image-region: rect(104px, 112px, 156px, 56px) }57 radio#composeDialog[featureDisabled="true"] { -moz-image-region: rect(104px, 112px, 156px, 56px) } 58 58 radio#composeDialog:hover { -moz-image-region: rect(52px, 112px, 104px, 56px) } 59 59 radio#emailOut { -moz-image-region: rect(0px, 56px, 52px, 0px) } 60 radio#emailOut[feature ="off"] { -moz-image-region: rect(104px, 56px, 156px, 0px) }60 radio#emailOut[featureDisabled="true"] { -moz-image-region: rect(104px, 56px, 156px, 0px) } 61 61 radio#emailOut:hover { -moz-image-region: rect(52px, 56px, 104px, 0px) } 62 62 radio#storageOut { -moz-image-region: rect(0px, 280px, 52px, 224px) } 63 radio#storageOut[feature ="off"] { -moz-image-region: rect(104px, 280px, 156px, 224px) }63 radio#storageOut[featureDisabled="true"] { -moz-image-region: rect(104px, 280px, 156px, 224px) } 64 64 radio#storageOut:hover { -moz-image-region: rect(52px, 280px, 104px, 224px) } 65 65 radio#options { -moz-image-region: rect(0px, 393px, 52px, 335px) } 66 radio#options[feature ="off"] { -moz-image-region: rect(104px, 393px, 156px, 335px) }66 radio#options[featureDisabled="true"] { -moz-image-region: rect(104px, 393px, 156px, 335px) } 67 67 radio#options:hover { -moz-image-region: rect(52px, 393px, 104px, 335px) } 68 68 … … 71 71 } 72 72 73 image#toSelection 74 image#toSelection[feature ="off"] { -moz-image-region: rect(30px, 64px, 60px, 47px) }73 image#toSelection, image#toCompose, image#toSend { -moz-image-region: rect(0px, 64px, 30px, 47px) } 74 image#toSelection[featureDisabled="true"], image#toCompose[featureDisabled="true"], image#toSend[featureDisabled="true"] { -moz-image-region: rect(30px, 64px, 60px, 47px) } 75 75 image#storageUpDown { -moz-image-region: rect(0px, 30px, 30px, -1px) } 76 image#storageUpDown[feature ="off"] { -moz-image-region: rect(30px, 30px, 60px, -1px) }76 image#storageUpDown[featureDisabled="true"] { -moz-image-region: rect(30px, 30px, 60px, -1px) } 77 77 image#storageUp { -moz-image-region: rect(0px, 48px, 30px, 30px) } 78 image#storageUp[feature ="off"] { -moz-image-region: rect(30px, 48px, 60px, 30px) }78 image#storageUp[featureDisabled="true"] { -moz-image-region: rect(30px, 48px, 60px, 30px) } 79 79 80 80
Note: See TracChangeset
for help on using the changeset viewer.