Changeset dab21e


Ignore:
Timestamp:
Oct 7, 2009, 1:31:12 PM (10 years ago)
Author:
rene <rene@…>
Branches:
lite_0.1, multiEdit, ng_0.6, ng_0.6_help, ng_0.8, ng_0.9
Children:
1e4f6f
Parents:
5d50bb
Message:

repaired sMimeEncryption StorageExtras?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_storageExtras.js

    r5d50bb rdab21e  
    6969        new vI_storageExtras_characterEncoding(),
    7070        new vI_storageExtras_msgFormat(),
    71         new vI_storageExtras_sMime_messageEncryption(),
     71        new vI_storageExtras_checkbox(
     72            "sMimeEnc", "storageExtras_sMime_messageEncryption", "menu_securityEncryptRequire1",
     73                "(typeof(setSecuritySettings)=='function')?setSecuritySettings(1):null;",
     74                "identity.getIntAttribute('encryptionpolicy') == 2"),
    7275        new vI_storageExtras_checkbox(
    7376            "sMimeSig", "storageExtras_sMime_messageSignature", "menu_securitySign1",
     
    8790                "identity.getBoolAttribute('pgpMimeMode')")
    8891        ]
     92    if (document.getElementById("menu_securityNoEncryption1"))  // TB 2.x
     93        this.extras[4] = new vI_storageExtras_sMime_messageEncryption()
     94
    8995    if (callFunction) this.loopForRDF(callFunction, resource)
    9096}
     
    382388    // function to set or read the value from/to the MessageCompose Dialog
    383389    setValue : function() {
     390        vI_notificationBar.dump("## storageExtras_sMime_messageEncryption \n");
    384391        var doEncryptElem = document.getElementById("menu_securityEncryptRequire1");
    385         var noEncryptElem = document.getElementById("menu_securityNoEncryption1");
    386         if (noEncryptElem && this.value != "true") {            // TB 2.x
    387             noEncryptElem.setAttribute("checked", "true");
    388             noEncryptElem.doCommand();
    389         }
    390         else {                              // TB 3.x
    391             if (doEncryptElem.getAttribute("checked") != this.value)
    392                 doEncryptElem.doCommand(); // means toggleEncryptCommand()
    393         }
     392        if (this.value == null) return;
     393        if (this.value == "true") var element = document.getElementById("menu_securityEncryptRequire1")
     394        else var element = document.getElementById("menu_securityNoEncryption1")
     395        element.setAttribute("checked", "true");
     396        element.doCommand();
    394397    },
    395398    readValue : function() {
     
    464467        var element = document.getElementById(this.composeDialogElementID);
    465468        if (!this.value || !element) return;
     469        if (this.updateFunction) eval(this.updateFunction);
    466470        if ((element.getAttribute("checked") == "true") != (this.value == "true")) {
    467471            if (this.value == "true") element.setAttribute("checked","true");
Note: See TracChangeset for help on using the changeset viewer.