This is just some static backup of the original site, don't expect every link to work!

Changeset 643bca


Ignore:
Timestamp:
Sep 16, 2008, 8:52:53 PM (14 years ago)
Author:
rene <rene@…>
Branches:
lite_0.1, multiEdit, ng_0.6, ng_0.6_help, ng_0.8, ng_0.9
Children:
2f8c7f
Parents:
b3755b
Message:

collection of changes to 0.6 branch

Location:
chrome/content/v_identity
Files:
7 edited

Legend:

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

    rb3755b r643bca  
    3939    },
    4040
    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 
    5141    // read the chrome file (copied from http://forums.mozillazine.org/viewtopic.php?p=921150)
    5242    __getContents : function (aURL){
     
    7666   
    7767    __init : function () {
    78         if(!vI_htmlTextBox.Obj_TextBox) vI_htmlTextBox.Obj_TextBox = document.getElementById(vI_htmlTextBox.objectID);
    79 //      vI_htmlTextBox.Obj_TextBox.contentDocument
    80 //          .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;");
    8171
    8272        if (vI_htmlTextBox.cssSource) vI_htmlTextBox.__setCSS();
  • chrome/content/v_identity/vI_htmlTextBox.xml

    rb3755b r643bca  
    3737    <property name="outputString" >
    3838        <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
    3944        var text_list = val.split(/\n/)
    4045        for (var i = 0; i < text_list.length; i++) {
     
    5055        ]]></setter>
    5156    </property>
     57    <field name="_cssRead">false</field>
    5258    <property name="cssSource" >
    5359        <setter><![CDATA[
     60        if (!val) return;
    5461        var head = this.contentDocument.getElementsByTagName("HEAD").item(0);
    5562        var range = document.createRange();
     
    5865        var documentFragment = range.createContextualFragment("<style type='text/css'>" + css_text + "</style>");
    5966        head.appendChild(documentFragment);
     67        this._cssRead = true;
    6068        ]]></setter>
    6169    </property>
  • chrome/content/v_identity/vI_prefDialog.js

    rb3755b r643bca  
    281281            document.getElementById("fccReplyFollowsParentBox").setAttribute("hidden", "true");
    282282        }
    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//      }
    286286
    287287        vI_prefDialog.base.smartReplyConstraint(document.getElementById("VIdent_identity.smart_reply"));
  • chrome/content/v_identity/vI_storage.js

    rb3755b r643bca  
    9999    isExistingIdentity : function() {
    100100        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;
    121113                }
    122114            }
     
    433425        var warning = { title: null, recLabel : null, recipient : null, warning : null, css: null, query : null };
    434426        warning.title = vI.elements.strings.getString("vident." + warningCase + ".title")
    435         warning.recLabel = vI.elements.strings.getString("vident." + warningCase + ".recipient") +  " (" + recipient.recType + "):"
     427        warning.recLabel = vI.elements.strings.getString("vident." + warningCase + ".recipient") + " (" + recipient.recType + "):"
    436428        warning.recipient = recipient.recDesc;
    437429        warning.warning =
  • chrome/content/v_identity/vI_storageExtras.js

    rb3755b r643bca  
    6969
    7070function 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
    7277        new vI_storageExtras_checkbox(
    73             "reciept", "storageExtras_returnReciept", "returnReceiptMenu", null, null),
     78            "reciept", "storageExtras_returnReciept", "returnReceiptMenu", null, "identity.requestReturnReceipt;"),
    7479        new vI_storageExtras_characterEncoding(),
    7580        new vI_storageExtras_msgFormat(),
     
    7782        new vI_storageExtras_checkbox(
    7883            "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')"),
    8086        new vI_storageExtras_checkbox(
    8187            "PGPEnc", "storageExtras_openPGP_messageEncryption", "enigmail_encrypted_send",
    82                 (typeof(enigSetMenuSettings)=="function")?enigSetMenuSettings:null, ''),
     88                "(typeof(enigSetMenuSettings)=='function')?enigSetMenuSettings(''):null;",
     89                "identity.getIntAttribute('defaultEncryptionPolicy') > 0"),
    8390        new vI_storageExtras_checkbox(
    8491            "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')"),
    8694        new vI_storageExtras_checkbox(
    8795            "PGPMIME", "storageExtras_openPGP_PGPMIME", "enigmail_sendPGPMime",
    88                 (typeof(enigSetMenuSettings)=="function")?enigSetMenuSettings:null, '')]
     96                "(typeof(enigSetMenuSettings)=='function')?enigSetMenuSettings(''):null;",
     97                "identity.getBoolAttribute('pgpMimeMode')")
     98        ]
    8999    if (callFunction) this.loopForRDF(callFunction, resource)
    90100}
     
    112122        for( var i = 0; i < this.extras.length; i++ ) {
    113123            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)
    115125            }
    116126        }
     
    122132        for( var i = 0; i < this.extras.length; i++ ) {
    123133            if (this.extras[i].active) {
    124                 if (this.extras[i].getLabel(null))
     134                if (this.extras[i].valueHtml)
    125135                    string += "<tr>" +
    126136                    "<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>" +
    128138                    "</tr>"
    129139            }
     
    140150                    "<td class='col1 extras " + classEqual + "'>" + prefStrings.getString("vident.identityData.extras." + this.extras[i].field) + "</td>" +
    141151                    "<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>" +
    143153                    "</tr>"
    144154            }
     
    156166
    157167    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        }
    159173    },
    160174
     
    169183        if (vI_storageExtrasHelper.seamonkey_to_old()) return;
    170184        for( var i = 0; i < this.extras.length; i++ ) {
     185//          vI_notificationBar.dump("## vI_storageExtras preparing readValue "+ this.extras[i].field +"\n");
    171186            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");
    173188        }
    174189    },
     
    208223function vI_storageExtras_characterEncoding() {
    209224    this.active = vI_storageExtrasHelper.preferences.getBoolPref(this.option)
    210     this.comp = { value : null, compareValue : null, equal : null }
     225    this.comp = { compareValue : null, equal : null }
    211226}
    212227vI_storageExtras_characterEncoding.prototype = {
     
    216231    option : "storageExtras_characterEncoding",
    217232    comp : null,
    218    
    219     getLabel : function() {
     233
     234    get valueHtml() {
    220235        return this.value?gCharsetConvertManager
    221236                    .getCharsetTitle(gCharsetConvertManager.getCharsetAlias(this.value)):"";
    222237    },
    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);
    227245        return this.comp.equal;
    228246    },
     
    278296    comp : null,
    279297
    280     getLabel : function() {
     298    get valueHtml() {
    281299        return this.value?document.getElementById(this.value).label:"";
    282300    },
    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);
    287308        return this.comp.equal;
    288309    },
     
    329350    comp : null,
    330351
    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'>&nbsp;<label><label class='braille'>yes</label></div>"
    336             case "false":
    337                 return "<div class='bool'><label class='screen'>&nbsp;<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'>&nbsp;</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);
    346363        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"
    347369    },
    348370    // function to set or read the value from/to the MessageCompose Dialog
     
    374396}
    375397
    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
     399function 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
    379402    this.composeDialogElementID = composeDialogElementID;
    380403    this.updateFunction = updateFunction;
    381     this.updateFunctionParam1 = updateFunctionParam1;
     404    this.valueFromIdentityFunction = identityValue;
    382405    this.active = vI_storageExtrasHelper.preferences.getBoolPref(this.option) &&
    383406        document.getElementById(this.composeDialogElementID);
    384     this.comp = { value : null, compareValue : null, equal : null }
     407    this.comp = { compareValue : null, equal : null }
    385408}
    386409vI_storageExtras_checkbox.prototype = {
     
    392415    composeDialogElementID : null,
    393416    updateFunction : null, // some elements have to be updated before the can be read
    394     updateFunctionParam1 : null,
     417    valueFromIdentityFunction : null,
    395418   
    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'>&nbsp;<label><label class='braille'>yes</label></div>"
    401             case "false":
    402                 return "<div class='bool'><label class='screen'>&nbsp;<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'>&nbsp;</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);
    411430        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";
    412436    },
    413437    // function to set or read the value from/to the MessageCompose Dialog
     
    424448        var element = document.getElementById(this.composeDialogElementID)
    425449        if (!element) return;
    426         if (this.updateFunction) this.updateFunction(this.updateFunctionParam1);
     450        if (this.updateFunction) eval(this.updateFunction);
    427451        this.value = ((element.getAttribute("checked") == "true")?"true":"false")
    428452    },
  • chrome/content/v_identity/v_identity.js

    rb3755b r643bca  
    312312        vI.tempStorage.BaseIdentity = vI.elements.Obj_MsgIdentity.selectedItem;
    313313        vI.tempStorage.NewIdentity = document.createElement("menuitem");
    314         MenuItem.className = "identity-popup-item";
     314        vI.tempStorage.NewIdentity.className = "identity-popup-item";
    315315       
    316316        // 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);
    323323        vI.__setSelectedIdentity(vI.tempStorage.NewIdentity);
    324324    },
  • chrome/content/v_identity/v_identity.xml

    rb3755b r643bca  
    4646    <implementation>
    4747    <method name="addTooltip">
    48     <parameter name="identityData" />
    49     <parameter name="randID" />
     48    <parameter name="elem" />
     49    <parameter name="permanent" />
    5050            <body><![CDATA[
     51        vI_notificationBar.dump("** v_identity.xml: addTooltip.\n");
     52        var randID = elem.tooltipElem.getAttribute("tooltip");
    5153        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        }
    5358        var toolTip = document.createElement("tooltip");
    5459        toolTip.setAttribute("class", "identityDataTooltip");
    5560        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");
    5764        this.appendChild(toolTip);
    58         return randID;
     65        vI_notificationBar.dump("** v_identity.xml: addTooltip done.\n");
    5966        ]]></body>
    6067    </method>
     
    6976   
    7077    <binding id="vI_identityDataTooltip" extends="chrome://global/content/bindings/popup.xml#tooltip">
    71     <content onpopupshowing="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()"/>
    7380            <children />
    7481    </content>
     
    7683    <method name="popupshowing">
    7784            <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>"
    8797            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>   
    93108    <method name="resize">
    94109        <body><![CDATA[
     110        if (!this._identityInfo) return;
     111        vI_notificationBar.dump("** v_identity.xml: resize.\n");
    95112        var width = document.getElementById("msgIdentity_clone").boxObject.width * 0.7;
    96113        var height = this._tooltipBrowser.contentDocument.lastChild.scrollHeight + 5;
     
    98115        width = document.getElementById("msgIdentity_clone").boxObject.width * 0.75;
    99116        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> -->
    104123    <field name="_identityInfo">false</field>
    105     <field name="_initialized">false</field>
     124<!--    <field name="_initialized">false</field> -->
    106125    <field name="_tooltipBrowser">document.getAnonymousElementByAttribute(this, "anonid", "tooltipBrowser")</field>
    107126    </implementation>
     
    124143        this.description = this._identityDataStorage.sideDescription;
    125144       
    126         this.setAttribute("tooltip",
    127             document.getElementById("vI_tooltipPopupset")
    128             .addTooltip(this._identityDataStorage, this.getAttribute("tooltip")));
     145        document.getElementById("vI_tooltipPopupset").addTooltip(this, true);
    129146        ]]>
    130147    </constructor>
     
    132149            <body><![CDATA[
    133150        document.getElementById("vI_tooltipPopupset")
    134             .removeTooltip(this.getAttribute("tooltip"));
     151            .removeTooltip(this.tooltipElem.getAttribute("tooltip"));
    135152        ]]></body>
    136153    </method>
     
    141158    </destructor>
    142159    <property name="_identityData" onget="return this._identityDataStorage;" />
     160    <field name="tooltipElem">this</field>
    143161    <property name="vid" onget="return this.getAttribute('vid');" onset="this.setAttribute('vid', val); return val;" />
    144162    <property name="label" onget="return this.getAttribute('label');" onset="this.setAttribute('label', val); return val;" />
     
    267285        if (!inputTextbox.timeout) inputTextbox.setAttribute("type", "timed");
    268286        inputTextbox.setAttribute("timeout", "300")
     287       
     288        document.getElementById("vI_tooltipPopupset").addTooltip(this, false);
    269289        ]]>
    270290    </constructor>
     
    272292        <![CDATA[
    273293        document.getElementById("vI_tooltipPopupset")
    274             .removeTooltip(this.getAttribute("tooltip"));
     294            .removeTooltip(this.tooltipElem.getAttribute("tooltip"));
    275295        ]]>
    276296    </destructor>
     
    296316        vI_notificationBar.dump("** v_identity.xml: clone_Obj_MsgIdentity\n");
    297317       
    298         this.dontInitExtras = true;
    299318        var MenuItems = this._msgIdentityPopupElem.childNodes
    300319        for (var index = 0; index < MenuItems.length; index++) {
     
    315334        }
    316335        this._popupMenu_separator = true;
    317         this.dontInitExtras = false;
    318336       
    319337        vI_msgIdentityCloneTools.initReplyToFields(this.value);
     
    329347        }
    330348        this.selectedItem = null;
     349        this.identityData = null;
    331350        ]]></body>
    332351    </method>   
     
    437456        this.setAttribute("label", this.label);
    438457       
    439         this.tooltipElem.setAttribute("tooltip",
    440             document.getElementById("vI_tooltipPopupset")
    441             .addTooltip(this._identityDataStorage, this.tooltipElem.getAttribute("tooltip")));
    442 
    443458        var existingIdentity = this.checkForVirtualIdentity();
    444459        if (existingIdentity) this.selectedMenuItem = existingIdentity;
     
    462477        this.identityData.smtp = val;
    463478       
    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);
    467480
    468481        var existingIdentity = this.checkForVirtualIdentity();
     
    470483        ]]></setter>
    471484    </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>
    474492        <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        }
    502519        ]]></setter>
    503520    </property>
Note: See TracChangeset for help on using the changeset viewer.