Changeset 435a0f


Ignore:
Timestamp:
Nov 16, 2011, 11:02:59 PM (8 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
4eb23a
Parents:
3e14f2
Message:

rearranged storageExtras -> identityDataExtras to cleanup and enable usage in MessengerDialog?

Files:
10 added
1 deleted
27 edited
2 moved

Legend:

Unmodified
Added
Removed
  • chrome.manifest

    r3e14f2 r435a0f  
    1919
    2020overlay chrome://messenger/content/mailWindowOverlay.xul            chrome://v_identity/content/vI_getHeader.xul
    21 overlay chrome://v_identity/content/vI_rdfDataTree.xul  chrome://v_identity/content/vI_storageExtrasDataTreeOverlay.xul
    22 overlay chrome://v_identity/content/vI_rdfDataEditor.xul    chrome://v_identity/content/vI_storageExtrasDataEditorOverlay.xul
    23 overlay chrome://messenger/content/am-smtp.xul chrome://v_identity/content/accountManagerOverlays/vI_am-smtpOverlay.xul
    24 overlay chrome://messenger/content/AccountManager.xul chrome://v_identity/content/accountManagerOverlays/vI_am-Overlay.xul
     21
     22overlay chrome://v_identity/content/vI_rdfDataTree.xul      chrome://v_identity/content/vI_rdfDataTree_dataExtrasOverlay.xul
     23overlay chrome://v_identity/content/vI_rdfDataEditor.xul    chrome://v_identity/content/vI_rdfDataEditor_dataExtrasOverlay.xul
     24
     25overlay chrome://messenger/content/am-smtp.xul          chrome://v_identity/content/accountManagerOverlays/vI_am-smtpOverlay.xul
     26overlay chrome://messenger/content/AccountManager.xul   chrome://v_identity/content/accountManagerOverlays/vI_am-Overlay.xul
  • content/bindings/v_identity.xml

    r3e14f2 r435a0f  
    352352        virtualIdentityExtension.MyLog.debug("\n** v_identity.xml msgIdentityCloneElem.doCommand() \n")
    353353        // copy selected Menu-Value from clone to orig.
    354         virtualIdentityExtension.MyLog.debug("** v_identity.xmlcopy selected Menu-Value from clone to orig. Searching for id=" + this.selectedMenuItem.identityData.id.key + " \n")
     354        virtualIdentityExtension.MyLog.debug("** v_identity.xml copy selected Menu-Value from clone to orig. Searching for id=" + this.selectedMenuItem.identityData.id.key + " \n")
    355355        if ( this.selectedMenuItem.identityData.id.key != null ) {
    356356            var MenuItems = this._msgIdentityPopupElem.childNodes
     
    549549    <property name="identityData">
    550550        <getter><![CDATA[
    551         this._identityDataStorage.extras.readValues(); // update with current data
     551        this._identityDataStorage.extras.getValuesFromEnvironment(); // update with current data
    552552        return this._identityDataStorage;
    553553        ]]></getter>
     
    567567                if (!this._identityDataStorage.smtp.key) this._identityDataStorage.smtp.key = oldIdentityData.smtp.key;
    568568                if (!this._identityDataStorage.id.key) this._identityDataStorage.id.key = oldIdentityData.id.key;
    569                 this._identityDataStorage.extras.setValues();
     569                this._identityDataStorage.extras.setValuesToEnvironment();
    570570                if (this._identityDataStorage.existingID) this.vid = false;
    571571                else this.checkForVirtualIdentity();
  • content/prefDialog/vI_prefDialog.xul

    r3e14f2 r435a0f  
    4949
    5050<dialog id="vI_prefDialog">
    51 
    52 <script type="application/x-javascript"
    53             src="chrome://v_identity/content/vI_storageExtras.js" />
    54 <script type="application/x-javascript"
    55             src="chrome://v_identity/content/modules/vI_rdfDatasource.js" />
    5651
    5752<stringbundleset id="stringbundleset">
  • content/vI_Dialog.xul

    r3e14f2 r435a0f  
    4949    <description id="vI_Dialog_recLabel" />
    5050    <description id="vI_Dialog_recipient" />
    51     <browser id="vI_Dialog_browser" type="content" class="vI_htmlTextBox"
     51    <browser id="vI_Dialog_browser" type="chrome" class="vI_htmlTextBox"
    5252         documentStyle="background-color: -moz-dialog; font: -moz-dialog;"
    5353         cssSource="vI_DialogBrowser.css" flex="1" disablehistory="true" />
  • content/vI_rdfDataEditor.js

    r3e14f2 r435a0f  
    2727
    2828Components.utils.import("resource://v_identity/vI_identityData.js", virtualIdentityExtension);
     29let Log = vI.setupLogging("virtualIdentity.rdfDataEditor");
    2930
    3031var rdfDataEditor = {
     
    9192       
    9293        // set extra values
    93         rdfDataEditor.__identityData.extras.setEditorValues();
    94         vI.storageExtrasHelper.hideUnusedEditorFields();
     94        Log.debug("set Values to Environment\n");
     95        rdfDataEditor.__identityData.extras.setValuesToEnvironment();
     96        Log.debug("init nearly done\n");
     97        this.hideUnusedEditorFields();
     98        Log.debug("init done\n");
    9599    },
    96100   
    97     blurEvent : function(elementId) {
     101    hideUnusedEditorFields : function() {
     102      var allHidden = true;
     103      var hide = (document.getElementById("vI_storageExtras_hideUnusedEditorFields").getAttribute("checked") == "true")
     104      let preferences = Components.classes["@mozilla.org/preferences-service;1"]
     105        .getService(Components.interfaces.nsIPrefService)
     106        .getBranch("extensions.virtualIdentity.");
     107      rdfDataEditor.__identityData.extras.loopThroughExtras(
     108        function(extra) {
     109          var hidden = hide && !preferences.getBoolPref(extra.option);
     110          document.getElementById("vI_" + extra.option).setAttribute("hidden", hidden)
     111          document.getElementById("vI_" + extra.option + "_store").setAttribute("hidden", hidden)
     112          if (!hidden) allHidden = false
     113        } );
     114      document.getElementById("storeValue").setAttribute("hidden", allHidden)
     115      // resize the window to the content
     116      window.sizeToContent();
     117    },
     118
     119    identityExtras_adapt: function(sourceId, targetId) {
     120      var checked = document.getElementById(sourceId).getAttribute("checked");
     121      if (targetId) var target = document.getElementById(targetId)
     122      else var target = document.getElementById(sourceId.replace(/_store/,""))
     123      if (checked == "true") target.removeAttribute("disabled")
     124      else target.setAttribute("disabled", "true");
     125    },
     126 
     127    blurEvent : function(elementId) {
    98128        var elem = document.getElementById(elementId);
    99129        var localIdentityData = new vI.identityData(elem.value, null, null, null, null, null, null);
     
    102132   
    103133    accept : function() {
    104         var localIdentityData = new vI.identityData(document.getElementById("sender").value, null,
     134        Log.debug("accept\n");
     135        var localIdentityData = new vI.identityData(document.getElementById("sender").value, null,
    105136            document.getElementById("identity_list").selectedItem.getAttribute("value"),
    106137            document.getElementById("smtp_server_list").selectedItem.getAttribute("key"));
    107         localIdentityData.extras.readEditorValues();
    108 
    109         rdfDataEditor.__rdfDatasource.updateRDF(
     138        Log.debug("before getValuesFromEnvironment\n");
     139        localIdentityData.extras.getValuesFromEnvironment();
     140        Log.debug("after getValuesFromEnvironment\n");
     141        rdfDataEditor.__rdfDatasource.updateRDF(
    110142                document.getElementById("recipient").value,
    111143                document.getElementById("type_menu").selectedItem.getAttribute("key"),
    112144                localIdentityData,
    113145                true, true, rdfDataEditor.__recipient, rdfDataEditor.__type);
    114        
     146        Log.debug("updateRDF done " + localIdentityData.extras.status() + "\n");
    115147        return document.getElementById("type_menu").selectedItem.getAttribute("key");
    116148    }
  • content/vI_rdfDataEditor.xul

    r3e14f2 r435a0f  
    3737
    3838<script type="application/x-javascript" src="chrome://v_identity/content/vI_rdfDataEditor.js" />
    39 <script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_identityData.js" />
    40 <script type="application/x-javascript" src="chrome://v_identity/content/vI_storageExtras.js" />
    4139<script type="application/x-javascript" src="chrome://v_identity/content/vI_storage.js" />
    42 <script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_helper.js" />
    4340<script type="application/x-javascript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
    4441
  • content/vI_rdfDataEditor_dataExtrasOverlay.xul

    r3e14f2 r435a0f  
    3636          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
    3737
    38 <script type="application/x-javascript" src="chrome://v_identity/content/vI_storageExtras.js" />
    3938<script type="application/x-javascript" src="chrome://global/content/charsetOverlay.js"/>
    40 
    41 
    4239    <vbox id="vI_rdfDataEditorContent">
    4340    <groupbox>
     
    4845        <spacer width="10px" />
    4946        <checkbox id="vI_storageExtras_hideUnusedEditorFields" label="&vI_storageExtrasDataEditorOverlay.hideUnused.label;"
    50             oncommand="virtualIdentityExtension.storageExtrasHelper.hideUnusedEditorFields();"
     47            oncommand="virtualIdentityExtension.rdfDataEditor.hideUnusedEditorFields();"
    5148            persist="checked" />
    5249    </caption>
     
    5451    <!-- storageExtras_returnReciept -->
    5552        <hbox>
    56         <checkbox id="vI_storageExtras_returnReciept_store" oncommand="virtualIdentityExtension.storageExtras_adapt(this.id, null);" />
    57         <checkbox id="vI_storageExtras_returnReciept" label="&vI_storageExtrasDataEditorOverlay.reciept.label;"/>
     53        <checkbox id="vI_storageExtras_returnReciept_store" oncommand="virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, null);" />
     54        <checkbox id="vI_storageExtras_returnReciept" label="&vI_storageExtrasDataEditorOverlay.receipt.label;"/>
    5855        </hbox>
    5956    <!-- storageExtras_fcc -->
    6057        <hbox>
    61         <checkbox id="vI_storageExtras_fcc_store" oncommand="virtualIdentityExtension.storageExtras_adapt(this.id, null);" />
     58        <checkbox id="vI_storageExtras_fcc_store" oncommand="virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, null);" />
    6259        <checkbox id="vI_storageExtras_fcc" label="&vI_storageExtrasDataEditorOverlay.fcc.label;"/>
    6360        </hbox>
     
    6562        <hbox>
    6663        <checkbox id="vI_storageExtras_characterEncoding_store"
    67             oncommand="virtualIdentityExtension.storageExtras_adapt(this.id, 'maileditCharsetMenuLabel');virtualIdentityExtension.storageExtras_adapt(this.id, 'maileditCharsetMenu');" />
     64            oncommand="virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, 'maileditCharsetMenuLabel');virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, 'maileditCharsetMenu');" />
    6865        <hbox id="vI_storageExtras_characterEncoding">
    6966            <vbox><spacer flex="1"/>
     
    9087        <hbox>
    9188        <checkbox id="vI_storageExtras_messageFormat_store"
    92             oncommand="virtualIdentityExtension.storageExtras_adapt(this.id, 'outputFormatMenuLabel');virtualIdentityExtension.storageExtras_adapt(this.id, 'outputFormatMenu');" />
     89            oncommand="virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, 'outputFormatMenuLabel');virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, 'outputFormatMenu');" />
    9390        <hbox id="vI_storageExtras_messageFormat">
    9491            <vbox><spacer flex="1"/>
     
    108105    <!-- storageExtras_sMime_messageEncryption -->
    109106        <hbox>
    110         <checkbox id="vI_storageExtras_sMime_messageEncryption_store" oncommand="virtualIdentityExtension.storageExtras_adapt(this.id, null)" />
     107        <checkbox id="vI_storageExtras_sMime_messageEncryption_store" oncommand="virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, null)" />
    111108        <checkbox id="vI_storageExtras_sMime_messageEncryption"
    112109            label="&vI_storageExtrasDataEditorOverlay.sMimeEnc.label;"/>
     
    114111    <!-- storageExtras_sMime_messageSignature -->
    115112        <hbox>
    116         <checkbox id="vI_storageExtras_sMime_messageSignature_store" oncommand="virtualIdentityExtension.storageExtras_adapt(this.id, null)" />
     113        <checkbox id="vI_storageExtras_sMime_messageSignature_store" oncommand="virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, null)" />
    117114        <checkbox id="vI_storageExtras_sMime_messageSignature"
    118115            label="&vI_storageExtrasDataEditorOverlay.sMimeSig.label;"/>
     
    120117    <!-- storageExtras_openPGP_messageEncryption -->
    121118        <hbox>
    122         <checkbox id="vI_storageExtras_openPGP_messageEncryption_store" oncommand="virtualIdentityExtension.storageExtras_adapt(this.id, null)" />
     119        <checkbox id="vI_storageExtras_openPGP_messageEncryption_store" oncommand="virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, null)" />
    123120        <checkbox id="vI_storageExtras_openPGP_messageEncryption"
    124121            label="&vI_storageExtrasDataEditorOverlay.PGPEnc.label;"/>
     
    126123    <!-- storageExtras_openPGP_messageSignature -->
    127124        <hbox>
    128         <checkbox id="vI_storageExtras_openPGP_messageSignature_store" oncommand="virtualIdentityExtension.storageExtras_adapt(this.id, null)" />
     125        <checkbox id="vI_storageExtras_openPGP_messageSignature_store" oncommand="virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, null)" />
    129126        <checkbox id="vI_storageExtras_openPGP_messageSignature"
    130127            label="&vI_storageExtrasDataEditorOverlay.PGPSig.label;"/>
     
    132129    <!-- storageExtras_openPGP_PGPMIME -->
    133130        <hbox>
    134         <checkbox id="vI_storageExtras_openPGP_PGPMIME_store" oncommand="virtualIdentityExtension.storageExtras_adapt(this.id, null)" />
     131        <checkbox id="vI_storageExtras_openPGP_PGPMIME_store" oncommand="virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, null)" />
    135132        <checkbox id="vI_storageExtras_openPGP_PGPMIME"
    136133            label="&vI_storageExtrasDataEditorOverlay.PGPMIME.label;"/>
  • content/vI_rdfDataTree.xul

    r3e14f2 r435a0f  
    6161        title="&vI_rdfDataTree.dlgTitle.label;">
    6262
    63 <script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_helper.js" />
    64 <script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_identityData.js" />
    65 <script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_rdfDatasource.js" />
    6663<script type="application/x-javascript" src="chrome://v_identity/content/vI_rdfDataTree.js" />
    6764<script type="application/x-javascript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
  • content/vI_rdfDataTree_dataExtrasOverlay.xul

    r3e14f2 r435a0f  
    3434        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
    3535
    36 <script type="application/x-javascript" src="chrome://v_identity/content/vI_storageExtras.js" />
    37 
    3836    <treecols id="rdfDataTreeCols_email">
    3937        <splitter class="tree-splitter" />
    40         <treecol id="recieptCol_email" label="&vI_storageExtrasDataTreeOverlay.recieptCol.label;" flex="2"
     38        <treecol id="receiptCol_email" label="&vI_storageExtrasDataTreeOverlay.receiptCol.label;" flex="2"
    4139            class="sortDirectionIndicator" hidden="true"
    4240            persist="hidden width ordinal sortDirection"/>
     
    7775    <treecols id="rdfDataTreeCols_maillist">
    7876        <splitter class="tree-splitter" />
    79         <treecol id="recieptCol_maillist" label="&vI_storageExtrasDataTreeOverlay.recieptCol.label;" flex="2"
     77        <treecol id="receiptCol_maillist" label="&vI_storageExtrasDataTreeOverlay.receiptCol.label;" flex="2"
    8078            class="sortDirectionIndicator" hidden="true"
    8179            persist="hidden width ordinal sortDirection"/>
     
    116114    <treecols id="rdfDataTreeCols_newsgroup">
    117115        <splitter class="tree-splitter" />
    118         <treecol id="recieptCol_newsgroup" label="&vI_storageExtrasDataTreeOverlay.recieptCol.label;" flex="2"
     116        <treecol id="receiptCol_newsgroup" label="&vI_storageExtrasDataTreeOverlay.receiptCol.label;" flex="2"
    119117            class="sortDirectionIndicator" hidden="true"
    120118            persist="hidden width ordinal sortDirection"/>
     
    156154    <treecols id="rdfDataTreeCols_filter">
    157155        <splitter class="tree-splitter" />
    158         <treecol id="recieptCol_filter" label="&vI_storageExtrasDataTreeOverlay.recieptCol.label;" flex="2"
     156        <treecol id="receiptCol_filter" label="&vI_storageExtrasDataTreeOverlay.receiptCol.label;" flex="2"
    159157            class="sortDirectionIndicator" hidden="true"
    160158            persist="hidden width ordinal sortDirection"/>
  • content/vI_storage.js

    r3e14f2 r435a0f  
    168168        if (!storage.firstUsedInputElement) storage.firstUsedInputElement = inputElement;
    169169       
    170         var selectedMenuItem;
     170        var newMenuItem = null;
    171171        if (storageResult.result != "equal") {
    172172            for (var j = 0; j < storageResult.identityCollection.number; j++) {
    173173                Log.debug("updateVIdentityFromStorage adding: " + storageResult.identityCollection.identityDataCollection[j].combinedName + "\n");
    174                 selectedMenuItem = document.getElementById("virtualIdentityExtension_msgIdentityClone").addIdentityToCloneMenu(storageResult.identityCollection.identityDataCollection[j])
     174                let menuItem = document.getElementById("virtualIdentityExtension_msgIdentityClone")
     175                  .addIdentityToCloneMenu(storageResult.identityCollection.identityDataCollection[j])
     176                if (!newMenuItem) newMenuItem = menuItem;
    175177            }
    176178        }
    177179        if (storageResult.result == "accept") {
    178180            Log.debug("updateVIdentityFromStorage selecting: " + storageResult.identityCollection.identityDataCollection[0].combinedName + "\n");
    179             document.getElementById("virtualIdentityExtension_msgIdentityClone").selectedMenuItem = selectedMenuItem;
     181            document.getElementById("virtualIdentityExtension_msgIdentityClone").selectedMenuItem = newMenuItem;
    180182            if (document.getElementById("virtualIdentityExtension_msgIdentityClone").vid)
    181183                vI.StorageNotification.info(vI.main.elements.strings.getString("vident.smartIdentity.vIStorageUsage") + ".");
  • content/vI_upgrade.xul

    r3e14f2 r435a0f  
    4545<script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_helper.js" />
    4646<script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_rdfDatasource.js" />   
    47 <script type="application/x-javascript" src="chrome://v_identity/content/vI_storageExtras.js" />
    4847
    4948<stringbundle id="virtualIdentityExtension_TextBoxBundle" src="chrome://v_identity/locale/vI_upgrade.properties" />
  • content/v_identity.xul

    r3e14f2 r435a0f  
    4747<script type="application/x-javascript" src="chrome://v_identity/content/vI_statusmenu.js" />
    4848<script type="application/x-javascript" src="chrome://v_identity/content/vI_storage.js"/>
    49 <script type="application/x-javascript" src="chrome://v_identity/content/vI_storageExtras.js"/>
    5049
    5150  <stringbundleset id="stringbundleset">
    5251    <stringbundle id="virtualIdentityExtension_vIdentBundle" src="chrome://v_identity/locale/v_identity.properties" />
    53     <stringbundle id="virtualIdentityExtension_vIStorageExtrasBundle" src="chrome://v_identity/locale/vI_storageExtras.properties" />
    5452  </stringbundleset>
    5553
  • locale/cs-CZ/vI_storageExtras.dtd

    r3e14f2 r435a0f  
    1717<!ENTITY vI_storageExtras.caption.label "další uloşená nastavení">
    1818
    19 <!ENTITY vI_storageExtrasDataTreeOverlay.recieptCol.label "Potvrzení o přečtení">
     19<!ENTITY vI_storageExtrasDataTreeOverlay.receiptCol.label "Potvrzení o přečtení">
    2020<!ENTITY vI_storageExtrasDataTreeOverlay.fccCol.label "FCC">
    2121<!ENTITY vI_storageExtrasDataTreeOverlay.charEncCol.label "Znaková sada">
     
    2828
    2929<!ENTITY vI_storageExtrasDataEditorOverlay.hideUnused.label "skrÜt neaktivní pole">
    30 <!ENTITY vI_storageExtrasDataEditorOverlay.reciept.label "Potvrzení o přečtení">
     30<!ENTITY vI_storageExtrasDataEditorOverlay.receipt.label "Potvrzení o přečtení">
    3131<!ENTITY vI_storageExtrasDataEditorOverlay.fcc.label "FCC">
    3232<!ENTITY vI_storageExtrasDataEditorOverlay.charEnc.label "Znaková sada">
  • locale/cs-CZ/vI_storageExtras.properties

    r3e14f2 r435a0f  
    1 vident.identityData.extras.reciept=Potvrzení o přečtení
     1vident.identityData.extras.receipt=Potvrzení o přečtení
    22vident.identityData.extras.fcc=FCC
    33vident.identityData.extras.charEnc=Znaková sada
  • locale/de-DE/vI_storageExtras.dtd

    r3e14f2 r435a0f  
    1717<!ENTITY vI_storageExtras.caption.label "zusÀtzlich gespeicherte Einstellungen">
    1818
    19 <!ENTITY vI_storageExtrasDataTreeOverlay.recieptCol.label "EmpfangsbestÀtigung">
     19<!ENTITY vI_storageExtrasDataTreeOverlay.receiptCol.label "EmpfangsbestÀtigung">
    2020<!ENTITY vI_storageExtrasDataTreeOverlay.fccCol.label "FCC Sende-Kopie">
    2121<!ENTITY vI_storageExtrasDataTreeOverlay.charEncCol.label "Zeichensatz">
     
    2828
    2929<!ENTITY vI_storageExtrasDataEditorOverlay.hideUnused.label "verstecke unbenutzte Felder">
    30 <!ENTITY vI_storageExtrasDataEditorOverlay.reciept.label "EmpfangsbestÀtigung">
     30<!ENTITY vI_storageExtrasDataEditorOverlay.receipt.label "EmpfangsbestÀtigung">
    3131<!ENTITY vI_storageExtrasDataEditorOverlay.fcc.label "FCC Sende-Kopie">
    3232<!ENTITY vI_storageExtrasDataEditorOverlay.charEnc.label "Zeichensatz">
  • locale/de-DE/vI_storageExtras.properties

    r3e14f2 r435a0f  
    1 vident.identityData.extras.reciept=EmpfangsbestÀtigung
     1vident.identityData.extras.receipt=EmpfangsbestÀtigung
    22vident.identityData.extras.fcc=FCC Sende-Kopie
    33vident.identityData.extras.charEnc=Zeichensatz
  • locale/en-US/vI_storageExtras.dtd

    r3e14f2 r435a0f  
    1717<!ENTITY vI_storageExtras.caption.label "additionally stored settings">
    1818
    19 <!ENTITY vI_storageExtrasDataTreeOverlay.recieptCol.label "Return Receipt">
     19<!ENTITY vI_storageExtrasDataTreeOverlay.receiptCol.label "Return Receipt">
    2020<!ENTITY vI_storageExtrasDataTreeOverlay.fccCol.label "FCC">
    2121<!ENTITY vI_storageExtrasDataTreeOverlay.charEncCol.label "Character Encoding">
     
    2828
    2929<!ENTITY vI_storageExtrasDataEditorOverlay.hideUnused.label "hide inactive fields">
    30 <!ENTITY vI_storageExtrasDataEditorOverlay.reciept.label "Return Receipt">
     30<!ENTITY vI_storageExtrasDataEditorOverlay.receipt.label "Return Receipt">
    3131<!ENTITY vI_storageExtrasDataEditorOverlay.fcc.label "FCC">
    3232<!ENTITY vI_storageExtrasDataEditorOverlay.charEnc.label "Character Encoding">
  • locale/en-US/vI_storageExtras.properties

    r3e14f2 r435a0f  
    1 vident.identityData.extras.reciept=Return Receipt
     1vident.identityData.extras.receipt=Return Receipt
    22vident.identityData.extras.fcc=FCC
    33vident.identityData.extras.charEnc=Character Encoding
  • locale/es-ES/vI_storageExtras.dtd

    r3e14f2 r435a0f  
    1717<!ENTITY vI_storageExtras.caption.label "opciones adicionales del almacén">
    1818
    19 <!ENTITY vI_storageExtrasDataTreeOverlay.recieptCol.label "Acuse de recibo">
     19<!ENTITY vI_storageExtrasDataTreeOverlay.receiptCol.label "Acuse de recibo">
    2020<!ENTITY vI_storageExtrasDataTreeOverlay.fccCol.label "FCC">
    2121<!ENTITY vI_storageExtrasDataTreeOverlay.charEncCol.label "Codificación de caracteres">
     
    2828
    2929<!ENTITY vI_storageExtrasDataEditorOverlay.hideUnused.label "ocultar los campos inactivos">
    30 <!ENTITY vI_storageExtrasDataEditorOverlay.reciept.label "Acuse de recibo">
     30<!ENTITY vI_storageExtrasDataEditorOverlay.receipt.label "Acuse de recibo">
    3131<!ENTITY vI_storageExtrasDataEditorOverlay.fcc.label "FCC">
    3232<!ENTITY vI_storageExtrasDataEditorOverlay.charEnc.label "Codificación de caracteres">
  • locale/es-ES/vI_storageExtras.properties

    r3e14f2 r435a0f  
    1 vident.identityData.extras.reciept=Acuse de recibo
     1vident.identityData.extras.receipt=Acuse de recibo
    22vident.identityData.extras.fcc=FCC
    33vident.identityData.extras.charEnc=Codificación de caracteres
  • locale/fr/vI_storageExtras.dtd

    r3e14f2 r435a0f  
    1717<!ENTITY vI_storageExtras.caption.label "paramÚtres supplémentaires stockés">
    1818
    19 <!ENTITY vI_storageExtrasDataTreeOverlay.recieptCol.label "Accusé de réception">
     19<!ENTITY vI_storageExtrasDataTreeOverlay.receiptCol.label "Accusé de réception">
    2020<!ENTITY vI_storageExtrasDataTreeOverlay.fccCol.label "FS">
    2121<!ENTITY vI_storageExtrasDataTreeOverlay.charEncCol.label "Chiffrement des caractÚres">
     
    2828
    2929<!ENTITY vI_storageExtrasDataEditorOverlay.hideUnused.label "cacher les champs inactifs">
    30 <!ENTITY vI_storageExtrasDataEditorOverlay.reciept.label "Accusé de réception">
     30<!ENTITY vI_storageExtrasDataEditorOverlay.receipt.label "Accusé de réception">
    3131<!ENTITY vI_storageExtrasDataEditorOverlay.fcc.label "FS">
    3232<!ENTITY vI_storageExtrasDataEditorOverlay.charEnc.label "Chiffrement des caractÚres">
  • locale/fr/vI_storageExtras.properties

    r3e14f2 r435a0f  
    1 vident.identityData.extras.reciept=Accusé de réception
     1vident.identityData.extras.receipt=Accusé de réception
    22vident.identityData.extras.fcc=FS
    33vident.identityData.extras.charEnc=Encodage des caractÚres
  • locale/nl/vI_storageExtras.dtd

    r3e14f2 r435a0f  
    1717<!ENTITY vI_storageExtras.caption.label "Aanvullende opgeslagen instellingen">
    1818
    19 <!ENTITY vI_storageExtrasDataTreeOverlay.recieptCol.label "Ontvangstbevestiging">
     19<!ENTITY vI_storageExtrasDataTreeOverlay.receiptCol.label "Ontvangstbevestiging">
    2020<!ENTITY vI_storageExtrasDataTreeOverlay.fccCol.label "FCC">
    2121<!ENTITY vI_storageExtrasDataTreeOverlay.charEncCol.label "Codering">
     
    2828
    2929<!ENTITY vI_storageExtrasDataEditorOverlay.hideUnused.label "Inactieve velden verbergen">
    30 <!ENTITY vI_storageExtrasDataEditorOverlay.reciept.label "Ontvangstbevestiging">
     30<!ENTITY vI_storageExtrasDataEditorOverlay.receipt.label "Ontvangstbevestiging">
    3131<!ENTITY vI_storageExtrasDataEditorOverlay.fcc.label "FCC">
    3232<!ENTITY vI_storageExtrasDataEditorOverlay.charEnc.label "Codering">
  • locale/nl/vI_storageExtras.properties

    r3e14f2 r435a0f  
    1 vident.identityData.extras.reciept=Ontvangstbevestiging
     1vident.identityData.extras.receipt=Ontvangstbevestiging
    22vident.identityData.extras.fcc=FCC
    33vident.identityData.extras.charEnc=Codering
  • locale/ru-RU/vI_storageExtras.dtd

    r3e14f2 r435a0f  
    2020раМеМОя">
    2121
    22 <!ENTITY vI_storageExtrasDataTreeOverlay.recieptCol.label "СПстПяМОе увеЎПЌлеМОя П пПлучеМОО">
     22<!ENTITY vI_storageExtrasDataTreeOverlay.receiptCol.label "СПстПяМОе увеЎПЌлеМОя П пПлучеМОО">
    2323<!ENTITY vI_storageExtrasDataTreeOverlay.fccCol.label "СПстПяМОе FCC (File Carbon Copy)">
    2424<!ENTITY vI_storageExtrasDataTreeOverlay.charEncCol.label "ВыбраММая кПЎОрПвка сППбщеМОй">
     
    3131
    3232<!ENTITY vI_storageExtrasDataEditorOverlay.hideUnused.label "Скрыть МеактОвМые пПля">
    33 <!ENTITY vI_storageExtrasDataEditorOverlay.reciept.label "СПстПяМОе увеЎПЌлеМОя П пПлучеМОО">
     33<!ENTITY vI_storageExtrasDataEditorOverlay.receipt.label "СПстПяМОе увеЎПЌлеМОя П пПлучеМОО">
    3434<!ENTITY vI_storageExtrasDataEditorOverlay.fcc.label "СПстПяМОе FCC (File Carbon Copy)">
    3535<!ENTITY vI_storageExtrasDataEditorOverlay.charEnc.label "ВыбраММая кПЎОрПвка сППбщеМОй">
  • locale/ru-RU/vI_storageExtras.properties

    r3e14f2 r435a0f  
    1 vident.identityData.extras.reciept=СПстПяМОе увеЎПЌлеМОя П пПлучеМОО
     1vident.identityData.extras.receipt=СПстПяМОе увеЎПЌлеМОя П пПлучеМОО
    22vident.identityData.extras.fcc=FCC
    33vident.identityData.extras.charEnc=ВыбраММая кПЎОрПвка сППбщеМОй
  • modules/vI_identityData.js

    r3e14f2 r435a0f  
    2323 * ***** END LICENSE BLOCK ***** */
    2424
    25 var EXPORTED_SYMBOLS = ["identityData", "identityCollection", "DEFAULT_SMTP_TAG", "NO_SMTP_TAG"]
     25var EXPORTED_SYMBOLS = ["identityCollection", "identityData", "identityDataExtras", "DEFAULT_SMTP_TAG", "NO_SMTP_TAG"]
    2626
    2727const DEFAULT_SMTP_TAG = "vI_useDefaultSMTP"
     
    3030Components.utils.import("resource://v_identity/vI_log.js");
    3131let Log = setupLogging("virtualIdentity.identityData");
     32Components.utils.import("resource://v_identity/vI_identityDataExtras.js");
     33Components.utils.import("resource://v_identity/identityDataExtras/returnReceipt.js");
     34Components.utils.import("resource://v_identity/identityDataExtras/fccSwitch.js");
     35Components.utils.import("resource://v_identity/identityDataExtras/messageFormat.js");
     36Components.utils.import("resource://v_identity/identityDataExtras/characterEncoding.js");
     37Components.utils.import("resource://v_identity/identityDataExtras/sMimeEncryption.js");
     38Components.utils.import("resource://v_identity/identityDataExtras/sMimeSignature.js");
     39Components.utils.import("resource://v_identity/identityDataExtras/PGPEncryption.js");
     40Components.utils.import("resource://v_identity/identityDataExtras/PGPSignature.js");
     41Components.utils.import("resource://v_identity/identityDataExtras/PGPMIME.js");
    3242
    3343function identityData(email, fullName, id, smtp, extras, sideDescription, existingID) {
     
    3848    this.smtp = new smtpObj(smtp);
    3949    if (extras) this.extras = extras;
    40 //  else if (typeof(vI.storageExtras)=='function') this.extras = new vI.storageExtras();
     50    else this.extras = new identityDataExtras();
    4151    this.comp = {   // holds the results of the last comparison for later creation of a compareMatrix
    4252        compareID : null,
  • modules/vI_log.js

    r3e14f2 r435a0f  
    129129      self.currentWindow.clearTimeout(self.timer);
    130130    self.timer = null;
    131     obj_notificationBox = self.currentWindow.document.getElementById("virtualIdentityExtension_vINotification");
     131    let obj_notificationBox = self.currentWindow.document.getElementById("virtualIdentityExtension_vINotification");
    132132    if (obj_notificationBox)
    133133      obj_notificationBox.removeAllNotifications(true);
     
    135135
    136136  addNote: function(note) {
    137     obj_notificationBox = this.currentWindow.document.getElementById("virtualIdentityExtension_vINotification");
     137    let obj_notificationBox = this.currentWindow.document.getElementById("virtualIdentityExtension_vINotification");
    138138    if (!obj_notificationBox)
    139139      return;
    140     var oldNotification = obj_notificationBox.currentNotification
    141     var newLabel = (oldNotification)?oldNotification.label + note:note;
     140    let oldNotification = obj_notificationBox.currentNotification
     141    let newLabel = (oldNotification)?oldNotification.label + note:note;
    142142    this.clearNote(this);
    143143    obj_notificationBox.appendNotification(newLabel, "", "chrome://messenger/skin/icons/flag.png");
     
    156156    .getMostRecentWindow(null);
    157157  // height will be cut off from messagepane (in 3pane window)
    158   var objMessagepane = currentWindow.document.getElementById("messagepane");
    159   var maxHeight = (objMessagepane)?parseInt(objMessagepane.boxObject.height / 2)+1:null;
     158  let objMessagepane = currentWindow.document.getElementById("messagepane");
     159  let maxHeight = (objMessagepane)?parseInt(objMessagepane.boxObject.height / 2)+1:null;
    160160  if (maxHeight < 60) maxHeight = 60; // set a minimum size, if to small scrollbars are hidden
    161     var tooBig = (maxHeight)?(elem.inputField.scrollHeight > maxHeight):false;
    162     var newHeight = (tooBig)?maxHeight:elem.inputField.scrollHeight;
     161    let tooBig = (maxHeight)?(elem.inputField.scrollHeight > maxHeight):false;
     162    let newHeight = (tooBig)?maxHeight:elem.inputField.scrollHeight;
    163163    elem.height = newHeight;
    164164  // give the box a frame if it is to big
     
    205205  let frame = e ? e.stack : Components.stack;
    206206  while (frame) {
    207     MyLog.debug("\n"+frame);
     207    MyLog.debug("\n"+frame+"\n");
    208208    frame = frame.caller;
    209209  }
  • modules/vI_rdfDatasource.js

    r3e14f2 r435a0f  
    3131Components.utils.import("resource://gre/modules/Services.jsm");
    3232
     33function get3PaneWindow() {
     34  return Components.classes['@mozilla.org/appshell/window-mediator;1']
     35    .getService(Components.interfaces.nsIWindowMediator)
     36    .getMostRecentWindow("mail:3pane");
     37};
     38
    3339function rdfDatasource(rdfFileName, dontRegisterObserver) {
    3440    this._rdfFileName = rdfFileName;
    3541    if (this._rdfFileName) this.init();
    3642    if (!dontRegisterObserver) this.AccountManagerObserver.register();
    37     let window = Components.classes['@mozilla.org/appshell/window-mediator;1']
    38         .getService(Components.interfaces.nsIWindowMediator)
    39         .getMostRecentWindow("mail:3pane");
    40     this._extVersion = window.virtualIdentityExtension.extensionVersion;
     43    this._extVersion = get3PaneWindow().virtualIdentityExtension.extensionVersion;
    4144}
    4245
     
    418421        if (mismatchIDs.length > 0) {
    419422            Log.debug(" found mismatches on id(s).\n");
    420            
    421             window.openDialog("chrome://v_identity/content/vI_rdfAccountMismatchDialog.xul",0,
     423            get3PaneWindow().openDialog("chrome://v_identity/content/vI_rdfAccountMismatchDialog.xul",0,
    422424                    "chrome, dialog, modal, alwaysRaised, resizable=yes", "identity", mismatchIDs,
    423425                    /* callback chance: */ this).focus();
     
    494496        if (mismatchSMTPs.length > 0) {
    495497            Log.debug(" found mismatches on smtp(s).\n");
    496             window.openDialog("chrome://v_identity/content/vI_rdfAccountMismatchDialog.xul",0,
     498            get3PaneWindow().openDialog("chrome://v_identity/content/vI_rdfAccountMismatchDialog.xul",0,
    497499                    "chrome, dialog, modal, alwaysRaised, resizable=yes", "smtp", mismatchSMTPs,
    498500                    /* callback: */ this).focus();
     
    551553        var filePicker = Components.classes["@mozilla.org/filepicker;1"]
    552554            .createInstance(Components.interfaces.nsIFilePicker);
    553         filePicker.init(window, "", Components.interfaces.nsIFilePicker.modeSave);
     555        filePicker.init(get3PaneWindow(), "", Components.interfaces.nsIFilePicker.modeSave);
    554556        filePicker.appendFilters(Components.interfaces.nsIFilePicker.filterAll | Components.interfaces.nsIFilePicker.filterText );
    555557        filePicker.appendFilter("RDF Files","*.rdf");
     
    593595        this._unsetRDFValue(resource, "name", this._getRDFValue(resource, "name"))
    594596       
    595         var extras = null;
    596 //         var extras = (typeof(vI.storageExtras)=='function')?new vI.storageExtras(this, resource):null;
    597         if (extras) extras.loopForRDF(this, resource, "unset");
     597        let self = this;
     598        var extras = new identityDataExtras(self, resource)
     599        extras.loopThroughExtras(
     600          function (extra) {
     601            extra.value = self._unsetRDFValue(resource, extra.field, extra.value) });
     602       
    598603        this.getContainer(recType).RemoveElement(resource, true);
    599604    },
     
    624629            var smtp = this._getRDFValue(resource, "smtp")
    625630            if (!smtp) smtp = NO_SMTP_TAG;
    626             var extras = null;
    627 //          var extras = (typeof(vI.storageExtras)=='function')?new vI.storageExtras(this, resource):null;
    628            
    629             var localIdentityData = new identityData(email, fullName, id, smtp, extras)
     631            let self = this;
     632            var localIdentityData = new identityData(email, fullName, id, smtp, new identityDataExtras(self, resource))
    630633            addNewDatum (resource, name, localIdentityData, idData)
    631634        }
     
    743746        Log.debug("email='" + email +
    744747            "' fullName='" + fullName + "' id='" + id + "' smtp='" + smtp + "'\n");
    745         var extras = null;
    746 //      var extras = (typeof(vI.storageExtras)=='function')?new vI.storageExtras(this, resource):null;
    747         var extras_status = " not used";
    748 //         var extras_status = (typeof(vI.storageExtras)=='function')?extras.status():" not used";
    749         Log.debug("extras:" + extras_status + "\n");
    750        
    751         var localIdentityData = new identityData(email, fullName, id, smtp, extras)
     748        let self = this;
     749        var localIdentityData = new identityData(email, fullName, id, smtp, new identityDataExtras(self, resource))
    752750        return localIdentityData;
    753751    },
     
    813811        this._setRDFValue(resource, "name", recDescription);
    814812 
    815         if (localIdentityData.extras) localIdentityData.extras.loopForRDF(this, resource, "set");
    816        
     813        if (localIdentityData.extras) {
     814          let self = this;
     815          localIdentityData.extras.loopThroughExtras(
     816            function (extra) {
     817              extra.value = self._setRDFValue(resource, extra.field, extra.value) });
     818          Log.debug("extras: " + localIdentityData.extras.status() + "\n");
     819        }
     820       
    817821        Log.debug("updateRDF add " + resource.ValueUTF8 + " at position " + position + ".\n");
    818822        if (position != -1) this.getContainer(recType).InsertElementAt(resource, position, true);
     
    821825
    822826    _setRDFValue : function (resource, field, value) {
    823 //      Log.debug("_setRDFValue " + resource.ValueUTF8 + " " + field + " " + value + ".\n");
     827        Log.debug("_setRDFValue " + resource.ValueUTF8 + " " + field + " " + value + ".\n");
    824828        if (!value) return value; // return if some value was not set.
    825829//      Log.debug("_setRDFValue " + this._rdfService + " " + this._rdfDataSource + "\n");
     
    986990    __askWarning : function(warning) {
    987991        var retVar = { returnValue: null };
    988         var answer = window.openDialog("chrome://v_identity/content/vI_Dialog.xul","",
     992        var answer = get3PaneWindow().openDialog("chrome://v_identity/content/vI_Dialog.xul","",
    989993                    "chrome, dialog, modal, alwaysRaised, resizable=yes",
    990994                     warning, retVar)
     
    11011105            .createInstance(Components.interfaces.nsIFilePicker);
    11021106
    1103         filePicker.init(window, "", Components.interfaces.nsIFilePicker.modeOpen);
     1107        filePicker.init(get3PaneWindow(), "", Components.interfaces.nsIFilePicker.modeOpen);
    11041108        filePicker.appendFilter("RDF Files","*.rdf");
    11051109        filePicker.appendFilters(Components.interfaces.nsIFilePicker.filterText | Components.interfaces.nsIFilePicker.filterAll );
     
    11491153                    var smtp = this._rdfImportDataSource._getRDFValue(resource, "smtp")
    11501154                    smtp = (smtp && smtp != DEFAULT_SMTP_TAG)?relevantSMTPs[smtp].smtp:smtp
    1151                     var extras = null;
    1152 //                     var extras = (typeof(vI.storageExtras)=='function')?new vI.storageExtras(this._rdfImportDataSource, resource):null;
    1153                     var localIdentityData = new identityData(email, fullName, id, smtp, extras)
     1155                    var localIdentityData = new identityData(email, fullName, id, smtp, new identityDataExtras(this._rdfImportDataSource, resource))
    11541156                   
    11551157                    this._rdfDataSource.updateRDF(name, treeType, localIdentityData, false, false, null, null)
Note: See TracChangeset for help on using the changeset viewer.