Changeset 77e90a


Ignore:
Timestamp:
Nov 16, 2007, 7:38:02 PM (14 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
8b504d
Parents:
03c0d1
Message:

added folder-selection for Drafts and Templates (not completely implemented)

Location:
chrome/content/v_identity
Files:
2 edited

Legend:

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

    r03c0d1 r77e90a  
    3737                "VIdent_identity.fccFolderPickerMode",
    3838                "VIdent_identity.fccFolder",
     39                "VIdent_identity.draftFolderPickerMode",
     40                "VIdent_identity.draftFolder",
     41                "VIdent_identity.stationeryFolderPickerMode",
     42                "VIdent_identity.stationeryFolder",
    3943                "VIdent_identity.copySMIMESettings",
    4044                "VIdent_identity.copyEnigmailSettings",
     
    110114                    vI_prefDialog.preferences.setBoolPref(
    111115                        element.getAttribute("prefstring"), element.checked);
    112                 else if (eltType == "textbox")
     116                else if (eltType == "textbox") {
    113117                    if (element.getAttribute("preftype") == "int")
    114118                        vI_prefDialog.preferences.setIntPref(
     
    116120                    else vI_prefDialog.preferences.setCharPref(
    117121                            element.getAttribute("prefstring"), element.value);
     122                    //~ alert(elementID + " " + element.getAttribute("prefstring") + " " + parseInt(element.value))
     123                }
    118124            }
    119125        },
     
    239245    init : function() {
    240246        vI_prefDialog.base.init();
    241         SetGlobalRadioElemChoices();
    242         SetFolderDisplay(gFccRadioElemChoice, gFccRadioElemChoiceLocked, "VIdent_fcc",
    243             fccAccountPickerId, "VIdent_identity.fccFolder", fccFolderPickerId);
    244         setupFccItems();
    245         SetSpecialFolderNamesWithDelims();
     247        onInitCopiesAndFolders()
    246248
    247249        var appID = null;
     
    285287    savePrefs : function() {
    286288        // Copy all changes to Elements
    287         SaveFolderSettings( gFccRadioElemChoice, "VIdent_doFcc",
    288             gFccFolderWithDelim, fccAccountPickerId, fccFolderPickerId,
    289             "VIdent_identity.fccFolder", "VIdent_identity.fccFolderPickerMode" );
     289        onSaveCopiesAndFolders()
    290290        vI_prefDialog.base.savePrefs();
    291291    },
     
    300300}
    301301
    302 
    303 /* following code is copied and adapted from thunderbird sources */
     302/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     303 * ***** BEGIN LICENSE BLOCK *****
     304 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
     305 *
     306 * The contents of this file are subject to the Mozilla Public License Version
     307 * 1.1 (the "License"); you may not use this file except in compliance with
     308 * the License. You may obtain a copy of the License at
     309 * http://www.mozilla.org/MPL/
     310 *
     311 * Software distributed under the License is distributed on an "AS IS" basis,
     312 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     313 * for the specific language governing rights and limitations under the
     314 * License.
     315 *
     316 * The Original Code is Mozilla Communicator client code, released
     317 * March 31, 1998.
     318 *
     319 * The Initial Developer of the Original Code is
     320 * Netscape Communications Corporation.
     321 * Portions created by the Initial Developer are Copyright (C) 1998-1999
     322 * the Initial Developer. All Rights Reserved.
     323 *
     324 * Contributor(s):
     325 *
     326 * Alternatively, the contents of this file may be used under the terms of
     327 * either of the GNU General Public License Version 2 or later (the "GPL"),
     328 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     329 * in which case the provisions of the GPL or the LGPL are applicable instead
     330 * of those above. If you wish to allow use of your version of this file only
     331 * under the terms of either the GPL or the LGPL, and not to allow others to
     332 * use your version of this file under the terms of the MPL, indicate your
     333 * decision by deleting the provisions above and replace them with the notice
     334 * and other provisions required by the GPL or the LGPL. If you do not delete
     335 * the provisions above, a recipient may use your version of this file under
     336 * the terms of any one of the MPL, the GPL or the LGPL.
     337 *
     338 * ***** END LICENSE BLOCK ***** */
     339
     340var gFccRadioElemChoice, gDraftsRadioElemChoice, gTmplRadioElemChoice;
     341var gFccRadioElemChoiceLocked, gDraftsRadioElemChoiceLocked, gTmplRadioElemChoiceLocked;
     342var gDefaultPickerMode = "3";
     343
     344var gFccFolderWithDelim, gDraftsFolderWithDelim, gTemplatesFolderWithDelim;
     345
     346// Picker IDs
     347var fccAccountPickerId = "msgFccAccountPicker";
     348var fccFolderPickerId = "msgFccFolderPicker";
     349var draftsAccountPickerId = "msgDraftsAccountPicker";
     350var draftsFolderPickerId = "msgDraftsFolderPicker";
     351var tmplAccountPickerId = "msgStationeryAccountPicker";
     352var tmplFolderPickerId = "msgStationeryFolderPicker";
     353
     354function onInitCopiesAndFolders()
     355{
     356    SetGlobalRadioElemChoices();
     357                     
     358    SetFolderDisplay(gFccRadioElemChoice, gFccRadioElemChoiceLocked,
     359                     "VIdent_fcc",
     360                     fccAccountPickerId,
     361                     "VIdent_identity.fccFolder",
     362                     fccFolderPickerId);
     363
     364    SetFolderDisplay(gDraftsRadioElemChoice, gDraftsRadioElemChoiceLocked,
     365                     "VIdent_draft",
     366                     draftsAccountPickerId,
     367                     "VIdent_identity.draftFolder",
     368                     draftsFolderPickerId);
     369
     370    SetFolderDisplay(gTmplRadioElemChoice, gTmplRadioElemChoiceLocked,
     371                     "VIdent_tmpl",
     372                     tmplAccountPickerId,
     373                     "VIdent_identity.stationeryFolder",
     374                     tmplFolderPickerId);
     375   
     376    setupFccItems();
     377
     378    SetSpecialFolderNamesWithDelims();
     379}
    304380
    305381// Initialize the picker mode choices (account/folder picker) into global vars
    306 function SetGlobalRadioElemChoices() {
     382function SetGlobalRadioElemChoices()
     383{
    307384    var pickerModeElement = document.getElementById("VIdent_identity.fccFolderPickerMode");
    308385    gFccRadioElemChoice = pickerModeElement.getAttribute("value");
    309386    gFccRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
    310     if (!gFccRadioElemChoice) {
    311       gFccRadioElemChoice = gDefaultPickerMode
    312       var formElement = document.getElementById("VIdent_identity.fccFolder");
    313       formElement.setAttribute("value",gDefaultFccFolder);
    314       SetFolderPicker(gDefaultFccFolder, "msgFccAccountPicker");
    315       document.getElementById("VIdent_identity.doFcc").checked = true;
    316       //~ dump("## vI_prefDialog: restored default state\n");
    317       }
    318 }
    319 
    320 var gFccRadioElemChoice;
    321 var gFccRadioElemChoiceLocked;
    322 var gDefaultPickerMode = "3";
    323 var gDefaultFccFolder = "";
    324 
    325 var gFccFolderWithDelim;
    326 
    327 
    328 // Picker IDs
    329 var fccAccountPickerId = "msgFccAccountPicker";
    330 var fccFolderPickerId = "msgFccFolderPicker";
    331 
    332 // Need to append special folders when account picker is selected.
    333 // Create a set of global special folder vars to be suffixed to the
    334 // server URI of the selected account.
    335 function SetSpecialFolderNamesWithDelims()
    336 {
    337     var folderDelim = "/";
    338     /* we use internal names known to everyone like "Sent", "Templates" and "Drafts" */
    339 
    340     gFccFolderWithDelim = folderDelim + "Sent";
    341 }
    342 
    343 
    344 // additional variables usually provided by parent pages
    345 var gMessengerBundle;
    346 gMessengerBundle = document.getElementById("bundle_messenger");
     387    if (!gFccRadioElemChoice) gFccRadioElemChoice = gDefaultPickerMode;
     388
     389    pickerModeElement = document.getElementById("VIdent_identity.draftFolderPickerMode");
     390    gDraftsRadioElemChoice = pickerModeElement.getAttribute("value");
     391    gDraftsRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
     392    if (!gDraftsRadioElemChoice) gDraftsRadioElemChoice = gDefaultPickerMode;
     393
     394    pickerModeElement = document.getElementById("VIdent_identity.stationeryFolderPickerMode");
     395    gTmplRadioElemChoice = pickerModeElement.getAttribute("value");
     396    gTmplRadioElemChoiceLocked = pickerModeElement.getAttribute("disabled");
     397    if (!gTmplRadioElemChoice) gTmplRadioElemChoice = gDefaultPickerMode;
     398   
     399    //~ alert(gFccRadioElemChoice + " " + gDraftsRadioElemChoice + " " + gTmplRadioElemChoice)
     400}
    347401
    348402/*
     
    361415        pickerMode = gDefaultPickerMode;
    362416
    363     //~ dump("## vI_prefDialog: try to set folder display\n");
    364417    var selectAccountRadioId = radioElemPrefix + "_selectAccount";
    365418    var selectAccountRadioElem = document.getElementById(selectAccountRadioId);
     
    369422    var folderPicker = document.getElementById(folderPickerId);
    370423    var rg = selectAccountRadioElem.radioGroup;
    371     //~ dump("## vI_prefDialog: try to set folder display - switch by picker mode " + pickerMode + "\n");
    372    
    373    
     424    var folderPickedElement = document.getElementById(folderPickedField);
     425    var uri = folderPickedElement.getAttribute("value");
     426    // Get message folder from the given uri. Second argument (false) siginifies
     427    // that there is no need to check for the existence of special folders as
     428    // these folders are created on demand at runtime in case of imap accounts.
     429    // For POP3 accounts, special folders are created at the account creation time.
     430    var msgFolder = GetMsgFolderFromUri(uri, false);
     431    if (msgFolder) SetFolderPicker(msgFolder.server.serverURI, accountPickerId);
     432    else SetFolderPicker("", accountPickerId);
     433    InitFolderDisplay(folderPickedField, folderPickerId);
    374434    switch (pickerMode)
    375435    {
    376436        case "0" :
    377437            rg.selectedItem = selectAccountRadioElem;
    378 
    379             var folderPickedElement = document.getElementById(folderPickedField);
    380             var uri = folderPickedElement.getAttribute("value");
    381             // Get message folder from the given uri. Second argument (false) siginifies
    382             // that there is no need to check for the existence of special folders as
    383             // these folders are created on demand at runtime in case of imap accounts.
    384             // For POP3 accounts, special folders are created at the account creation time.
    385             var msgFolder = GetMsgFolderFromUri(uri, false);
    386         SetFolderPicker(msgFolder.server.serverURI, accountPickerId);
    387         document.getElementById(accountPickerId).removeAttribute("disabled");
    388         document.getElementById(folderPickerId).setAttribute("disabled", "true");
    389             break;
     438            SetPickerEnabling(accountPickerId, folderPickerId);
     439            break;
     440
    390441        case "1"  :
    391442            rg.selectedItem = selectFolderRadioElem;
    392                
    393             InitFolderDisplay(folderPickedField, folderPickerId);
    394         document.getElementById(folderPickerId).removeAttribute("disabled");
    395         document.getElementById(accountPickerId).setAttribute("disabled", "true");
     443            SetPickerEnabling(folderPickerId, accountPickerId);
    396444            break;
    397445    case "2"  :
     
    405453        document.getElementById(accountPickerId).setAttribute("disabled", "true");
    406454            break;
    407        default :
    408         document.getElementById(folderPickerId).setAttribute("disabled", "true");
    409         document.getElementById(accountPickerId).setAttribute("disabled", "true");
     455
     456        default :
     457            alert("Error in setting initial folder display on pickers\n");
    410458            break;
    411459    }
     460
    412461    // Check to see if we need to lock page elements. Disable radio buttons
    413462    // and account/folder pickers when locked.
     
    415464      selectAccountRadioElem.setAttribute("disabled","true");
    416465      selectFolderRadioElem.setAttribute("disabled","true");
    417       document.getElementById(radioElemPrefix + "_Settings_Of_Default").setAttribute("disabled", "true");
    418       document.getElementById(radioElemPrefix + "_Settings_Of_Account").setAttribute("disabled", "true");
    419466      accountPicker.setAttribute("disabled","true");
    420467      folderPicker.setAttribute("disabled","true");
    421468    }
     469}
     470
     471// Initialize the folder display based on prefs values
     472function InitFolderDisplay(fieldname, pickerId) {
     473    var formElement = document.getElementById(fieldname);
     474    var uri = formElement.getAttribute("value");
     475    SetFolderPicker(uri,pickerId);
     476}
     477
     478// Capture any menulist changes
     479function noteSelectionChange(radioItemId)
     480{
     481    var checkedElem = document.getElementById(radioItemId);
     482    var modeValue  = checkedElem.getAttribute("value");
     483    var radioGroup = checkedElem.radioGroup.getAttribute("id");
     484    switch (radioGroup)
     485    {
     486        case "VIdent_doFcc" :
     487            gFccRadioElemChoice = modeValue;
     488            break;
    422489   
     490        case "VIdent_messageDrafts" :
     491            gDraftsRadioElemChoice = modeValue;
     492            break;
     493
     494        case "VIdent_messageTemplates" :
     495            gTmplRadioElemChoice = modeValue;
     496            break;
     497
     498        default :
     499            alert("Error capturing menulist changes. " + radioGroup + "\n");
     500            break;
     501    }
     502}
     503
     504// Need to append special folders when account picker is selected.
     505// Create a set of global special folder vars to be suffixed to the
     506// server URI of the selected account.
     507function SetSpecialFolderNamesWithDelims()
     508{
     509    var folderDelim = "/";
     510    /* we use internal names known to everyone like "Sent", "Templates" and "Drafts" */
     511
     512    gFccFolderWithDelim = folderDelim + "Sent";
     513    gDraftsFolderWithDelim = folderDelim + "Drafts";
     514    gTemplatesFolderWithDelim = folderDelim + "Templates";
     515}
     516
     517function onSaveCopiesAndFolders()
     518{
     519    SaveFolderSettings( gFccRadioElemChoice,
     520                        "doFcc",
     521                        gFccFolderWithDelim,
     522                        fccAccountPickerId,
     523                        fccFolderPickerId,
     524                        "VIdent_identity.fccFolder",
     525                        "VIdent_identity.fccFolderPickerMode" );
     526
     527    SaveFolderSettings( gDraftsRadioElemChoice,
     528                        "messageDrafts",
     529                        gDraftsFolderWithDelim,
     530                        draftsAccountPickerId,
     531                        draftsFolderPickerId,
     532                        "VIdent_identity.draftFolder",
     533                        "VIdent_identity.draftFolderPickerMode" );
     534
     535    SaveFolderSettings( gTmplRadioElemChoice,
     536                        "messageTemplates",
     537                        gTemplatesFolderWithDelim,
     538                        tmplAccountPickerId,
     539                        tmplFolderPickerId,
     540                        "VIdent_identity.stationeryFolder",
     541                        "VIdent_identity.stationeryFolderPickerMode" );
    423542}
    424543
     
    436555    var picker;
    437556
    438     //~ dump("## vI_prefDialog: SaveFolderSettings " + radioElemChoice + "\n");
    439 
    440557    switch (radioElemChoice)
    441558    {
     
    444561            uri = picker.getAttribute("uri");
    445562            if (uri) {
    446         //~ dump("## vI_prefDialog: trying to save picker settings (0) " + uri + folderSuffix + "\n");
    447563                // Create  Folder URI
    448564                uri = uri + folderSuffix;
     
    475591    var uri = picker.getAttribute("uri");
    476592   
    477         //~ dump("## vI_prefDialog: trying to save Uri from Picker (1) " + uri + "\n");
    478593    var formElement = document.getElementById(fieldName);
    479594    formElement.setAttribute("value",uri);
    480 }
    481 
    482 // Initialize the folder display based on prefs values
    483 function InitFolderDisplay(fieldname, pickerId) {
    484     var formElement = document.getElementById(fieldname);
    485     var uri = formElement.getAttribute("value");
    486     SetFolderPicker(uri,pickerId);
    487595}
    488596
     
    490598function setupFccItems()
    491599{
    492     //~ dump("## vI_prefDialog: SetupFccItems\n");
    493600    var broadcaster = document.getElementById("VIdent_broadcaster_doFcc");
    494     if (document.getElementById("VIdent_identity.doFcc").checked) {
     601
     602    var checked = document.getElementById("VIdent_identity.doFcc").checked;
     603    if (checked) {
    495604        broadcaster.removeAttribute("disabled");
    496         SetupFccPickerState(document.getElementById("VIdent_identity.fccFolderPickerMode").value);
    497     }
     605        SetupFccPickerState(gFccRadioElemChoice,
     606                            fccAccountPickerId,
     607                            fccFolderPickerId);
     608      }
    498609    else
    499610        broadcaster.setAttribute("disabled", "true");
     
    501612
    502613// Set up picker settings for Sent Folder
    503 function SetupFccPickerState(pickerMode)
    504 {
    505     var pickerModeElement = document.getElementById("VIdent_identity.fccFolderPickerMode");
    506     var gFccRadioElemChoice = pickerModeElement.getAttribute("value");
    507     var gFccRadioElemChoiceLocked = document.getElementById("VIdent_identity.fccFolderPickerMode").getAttribute("disabled");
    508    
    509     //~ dump("## vI_prefDialog: pickermode: " + pickerMode + "\n");
     614function SetupFccPickerState(pickerMode, accountPickerId, folderPickerId)
     615{
    510616    switch (pickerMode) {
    511617        case "0" :
    512             if (!gFccRadioElemChoiceLocked) {
    513               document.getElementById("msgFccAccountPicker").removeAttribute("disabled");
    514           document.getElementById("msgFccFolderPicker").setAttribute("disabled", "true"); }
    515         var activeRadioElem = document.getElementById("VIdent_fcc_selectAccount");
    516         activeRadioElem.radioGroup.selectedItem = activeRadioElem;
     618            if (!gFccRadioElemChoiceLocked)
     619              SetPickerEnabling(accountPickerId, folderPickerId);
     620            SetRadioButtons("VIdent_fcc_selectAccount", "VIdent_fcc_selectFolder");
    517621            break;
    518622   
    519623        case "1" :
    520             if (!gFccRadioElemChoiceLocked) {
    521               document.getElementById("msgFccFolderPicker").removeAttribute("disabled");
    522           document.getElementById("msgFccAccountPicker").setAttribute("disabled", "true"); }
    523         var activeRadioElem = document.getElementById("VIdent_fcc_selectFolder");
    524         activeRadioElem.radioGroup.selectedItem = activeRadioElem;
     624            if (!gFccRadioElemChoiceLocked)
     625              SetPickerEnabling(folderPickerId, accountPickerId);
     626            SetRadioButtons("VIdent_fcc_selectFolder", "VIdent_fcc_selectAccount");
    525627            break;
    526628
    527629        default :
    528           document.getElementById("msgFccFolderPicker").setAttribute("disabled", "true");
    529           document.getElementById("msgFccAccountPicker").setAttribute("disabled", "true");
     630          document.getElementById(folderPickerId).setAttribute("disabled", "true");
     631          document.getElementById(accountPickerId).setAttribute("disabled", "true");
    530632            break;
    531633    }
     634}
     635
     636// Enable and disable pickers based on the radio element clicked
     637function SetPickerEnabling(enablePickerId, disablePickerId)
     638{
     639    var activePicker = document.getElementById(enablePickerId);
     640    activePicker.removeAttribute("disabled");
     641
     642    var inactivePicker = document.getElementById(disablePickerId);
     643    inactivePicker.setAttribute("disabled", "true");
    532644}
    533645
     
    535647function setPickersState(enablePickerId, disablePickerId, event)
    536648{
    537     document.getElementById(enablePickerId).removeAttribute("disabled");
    538     document.getElementById(disablePickerId).setAttribute("disabled", "true");
     649    SetPickerEnabling(enablePickerId, disablePickerId);
    539650
    540651    var selectedElementUri;
    541652    var radioElemValue = event.target.value;
    542    
    543     var AccManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
    544     selectedElementUri = AccManager.localFoldersServer.serverURI;
    545    
     653
    546654    switch (event.target.id) {
    547         case "VIdent_fcc_selectAccount" :
    548             gFccRadioElemChoice = radioElemValue;
    549         document.getElementById(enablePickerId).removeAttribute("disabled");
    550         break;
     655    case "VIdent_fcc_Settings_Of_Account":
     656    case "VIdent_fcc_Settings_Of_Default":
     657        document.getElementById(enablePickerId).setAttribute("disabled", "true");
     658        case "VIdent_fcc_selectAccount":
    551659        case "VIdent_fcc_selectFolder" :
    552660            gFccRadioElemChoice = radioElemValue;   
    553             selectedElementUri += gFccFolderWithDelim;
    554         document.getElementById(enablePickerId).removeAttribute("disabled");
     661            break;
     662    case "VIdent_draft_Settings_Of_Account":
     663    case "VIdent_draft_Settings_Of_Default":
     664        document.getElementById(enablePickerId).setAttribute("disabled", "true");
     665        case "VIdent_draft_selectAccount":
     666        case "VIdent_draft_selectFolder" :
     667            gDraftsRadioElemChoice = radioElemValue;   
     668            break;
     669    case "VIdent_tmpl_Settings_Of_Account":
     670    case "VIdent_tmpl_Settings_Of_Default":
     671        document.getElementById(enablePickerId).setAttribute("disabled", "true");
     672        case "VIdent_tmpl_selectFolder" :
     673        case "VIdent_tmpl_selectAccount":
     674            gTmplRadioElemChoice = radioElemValue;   
    555675            break;
    556676        default :
    557         gFccRadioElemChoice = radioElemValue;
    558         selectedElementUri = "";
    559         document.getElementById(enablePickerId).setAttribute("disabled", "true");
    560             break;
     677            alert("Error in setting picker state. " + event.target.id + "\n");
     678            return;
    561679    }
    562680   
    563     SetFolderPicker(selectedElementUri, enablePickerId);
    564 }
    565 
    566 // Capture any menulist changes
    567 function noteSelectionChange(radioItemId)
    568 {
    569     var checkedElem = document.getElementById(radioItemId);
    570     var modeValue  = checkedElem.getAttribute("value");
    571     var radioGroup = checkedElem.radioGroup.getAttribute("id");
    572     //~ dump("## vI_prefDialog: Fcc-value changed\n");
    573     gFccRadioElemChoice = modeValue;
    574 }
     681    //~ SetFolderPicker(selectedElementUri, enablePickerId);
     682}
     683
     684// This routine is to restore the correct radio element
     685// state when the fcc self checkbox broadcasts the change
     686function SetRadioButtons(selectPickerId, unselectPickerId)
     687{
     688    var activeRadioElem = document.getElementById(selectPickerId);
     689    activeRadioElem.radioGroup.selectedItem = activeRadioElem;
     690}
  • chrome/content/v_identity/vI_prefDialog.xul

    r03c0d1 r77e90a  
    6161
    6262<textbox hidden="true" id="VIdent_identity.fccFolder"
    63                 prefstring="fcc_folder"/>
     63                prefstring="fccFolder"/>
    6464<textbox hidden="true" id="VIdent_identity.fccFolderPickerMode"
    65                 prefstring="fcc_folder_picker_mode"/>
     65                prefstring="fccFolderPickerMode"/>
     66<textbox hidden="true" id="VIdent_identity.draftFolder"
     67                prefstring="draftFolder"/>
     68<textbox hidden="true" id="VIdent_identity.draftFolderPickerMode"
     69                prefstring="draftFolderPickerMode"/>
     70<textbox hidden="true" id="VIdent_identity.stationeryFolder"
     71                prefstring="stationeryFolder"/>
     72<textbox hidden="true" id="VIdent_identity.stationeryFolderPickerMode"
     73                prefstring="stationeryFolderPickerMode"/>
    6674
    6775<hbox>
     
    123131            <tab label="&vident.prefs.vIdentityTab.valueTab.label;" />
    124132            <tab label="&vident.prefs.vIdentityTab.fccTab.label;" />
     133            <tab label="&vident.prefs.vIdentityTab.draftsTab.label;" />
     134            <tab label="&vident.prefs.vIdentityTab.tmplTab.label;" />
    125135        </tabs>
    126136        <tabpanels>
    127             <tabpanel orient="vertical">
     137        <tabpanel orient="vertical">
    128138            <groupbox>
    129139            <caption label="&vident.prefs.vIdentityTab.valueTab.caption;"/>
     
    143153                prefstring="autoReplyToSelf"/>
    144154            </groupbox>
    145             </tabpanel>
    146             <tabpanel orient="vertical">
    147         <groupbox>
    148         <caption label="&vident.prefs.vIdentityTab.fccTab.caption;"/>
    149         <hbox align="center">
    150             <checkbox id="VIdent_identity.doFcc" label="&fccMailFolder.label;"
    151                 accesskey="&fccMailFolder.accesskey;"
    152                 oncommand="setupFccItems();" prefstring="doFcc"/>
    153         </hbox>
    154         <radiogroup id="VIdent_doFcc">
    155         <grid class="specialFolderPickerGrid">
    156             <columns>
    157                 <column flex="1"/>
    158                 <column flex="2"/>
    159             </columns>
    160             <rows>
    161                 <radio id="VIdent_fcc_Settings_Of_Account"
    162                     value="3" label="&vident.prefs.vidFccAccount.label;"
    163                     oncommand="setPickersState('msgFccFolderPicker', 'msgFccAccountPicker', event)"
    164                     observes="VIdent_broadcaster_doFcc"/>
    165                 <radio id="VIdent_fcc_Settings_Of_Default"
    166                     value="2" label="&vident.prefs.vidFccDefault.label;"
    167                     oncommand="setPickersState('msgFccFolderPicker', 'msgFccAccountPicker', event)"
    168                     observes="VIdent_broadcaster_doFcc"/>
    169                 <row align="center">
    170                     <radio id="VIdent_fcc_selectAccount"
    171                         value="0" label="&sentFolderOn.label;"
    172                         accesskey="&sentFolderOn.accesskey;"
    173                         oncommand="setPickersState('msgFccAccountPicker', 'msgFccFolderPicker', event)"
    174                         observes="VIdent_broadcaster_doFcc"/>
    175                     <menulist id="msgFccAccountPicker"
    176                         oncommand="noteSelectionChange('VIdent_fcc_selectAccount')"
    177                         flex="1" observes="VIdent_broadcaster_doFcc"/>
    178                 </row>
    179                 <row align="center">
    180                     <radio id="VIdent_fcc_selectFolder"
    181                         value="1" label="&sentInOtherFolder.label;"
    182                         accesskey="&sentInOtherFolder.accesskey;"
     155        </tabpanel>
     156        <tabpanel orient="vertical">
     157            <groupbox>
     158            <caption label="&vident.prefs.vIdentityTab.fccTab.caption;"/>
     159            <hbox align="center">
     160                <checkbox id="VIdent_identity.doFcc" label="&fccMailFolder.label;"
     161                    accesskey="&fccMailFolder.accesskey;"
     162                    oncommand="setupFccItems();" prefstring="doFcc"/>
     163            </hbox>
     164            <radiogroup id="VIdent_doFcc">
     165            <grid class="specialFolderPickerGrid">
     166                <columns>
     167                    <column flex="1"/>
     168                    <column flex="2"/>
     169                </columns>
     170                <rows>
     171                    <radio id="VIdent_fcc_Settings_Of_Account"
     172                        value="3" label="&vident.prefs.vidFccAccount.label;"
    183173                        oncommand="setPickersState('msgFccFolderPicker', 'msgFccAccountPicker', event)"
    184174                        observes="VIdent_broadcaster_doFcc"/>
    185                     <menulist id="msgFccFolderPicker"
    186                         oncommand="noteSelectionChange('VIdent_fcc_selectFolder')"
    187                         flex="1" observes="VIdent_broadcaster_doFcc"/>
    188                 </row>
    189             </rows>
    190         </grid>
    191         </radiogroup>
    192 
    193         </groupbox>
     175                    <radio id="VIdent_fcc_Settings_Of_Default"
     176                        value="2" label="&vident.prefs.vidFccDefault.label;"
     177                        oncommand="setPickersState('msgFccFolderPicker', 'msgFccAccountPicker', event)"
     178                        observes="VIdent_broadcaster_doFcc"/>
     179                    <row align="center">
     180                        <radio id="VIdent_fcc_selectAccount"
     181                            value="0" label="&sentFolderOn.label;"
     182                            accesskey="&sentFolderOn.accesskey;"
     183                            oncommand="setPickersState('msgFccAccountPicker', 'msgFccFolderPicker', event)"
     184                            observes="VIdent_broadcaster_doFcc"/>
     185                        <menulist id="msgFccAccountPicker"
     186                            oncommand="noteSelectionChange('VIdent_fcc_selectAccount')"
     187                            flex="1" observes="VIdent_broadcaster_doFcc"/>
     188                    </row>
     189                    <row align="center">
     190                        <radio id="VIdent_fcc_selectFolder"
     191                            value="1" label="&sentInOtherFolder.label;"
     192                            accesskey="&sentInOtherFolder.accesskey;"
     193                            oncommand="setPickersState('msgFccFolderPicker', 'msgFccAccountPicker', event)"
     194                            observes="VIdent_broadcaster_doFcc"/>
     195                        <menulist id="msgFccFolderPicker"
     196                            oncommand="noteSelectionChange('VIdent_fcc_selectFolder')"
     197                            flex="1" observes="VIdent_broadcaster_doFcc"/>
     198                    </row>
     199                </rows>
     200            </grid>
     201            </radiogroup>
     202
     203            </groupbox>
     204        </tabpanel>
     205        <tabpanel orient="vertical">
     206            <groupbox>
     207            <caption />
     208            <radiogroup id="VIdent_messageDrafts">
     209            <grid class="specialFolderPickerGrid">
     210                <columns>
     211                    <column flex="1"/>
     212                    <column flex="2"/>
     213                </columns>
     214                <rows>
     215                    <radio id="VIdent_draft_Settings_Of_Account"
     216                        value="3" label="&vident.prefs.vidFccAccount.label;"
     217                        oncommand="setPickersState('msgDraftsFolderPicker', 'msgDraftsAccountPicker', event)" />
     218                    <radio id="VIdent_draft_Settings_Of_Default"
     219                        value="2" label="&vident.prefs.vidFccDefault.label;"
     220                        oncommand="setPickersState('msgDraftsFolderPicker', 'msgDraftsAccountPicker', event)" />
     221                    <row align="center">
     222                        <radio id="VIdent_draft_selectAccount"
     223                            value="0" label="&draftsFolderOn.label;"
     224                            accesskey="&draftsFolderOn.accesskey;"
     225                            oncommand="setPickersState('msgDraftsAccountPicker', 'msgDraftsFolderPicker', event)" />
     226                        <menulist id="msgDraftsAccountPicker"
     227                            oncommand="noteSelectionChange('VIdent_draft_selectAccount')" />
     228                    </row>
     229                    <row align="center">
     230                        <radio id="VIdent_draft_selectFolder"
     231                            value="1" label="&draftInOtherFolder.label;"
     232                            accesskey="&draftInOtherFolder.accesskey;"
     233                            oncommand="setPickersState('msgDraftsFolderPicker', 'msgDraftsAccountPicker', event)" />
     234                        <menulist id="msgDraftsFolderPicker"
     235                            oncommand="noteSelectionChange('VIdent_draft_selectFolder')"
     236                            flex="1" />
     237                    </row>
     238                </rows>
     239            </grid>
     240            </radiogroup>
     241
     242            </groupbox>
     243        </tabpanel>
     244        <tabpanel orient="vertical">
     245            <groupbox>
     246            <caption />
     247            <radiogroup id="VIdent_messageTemplates">
     248            <grid class="specialFolderPickerGrid">
     249                <columns>
     250                    <column flex="1"/>
     251                    <column flex="2"/>
     252                </columns>
     253                <rows>
     254                    <radio id="VIdent_tmpl_Settings_Of_Account"
     255                        value="3" label="&vident.prefs.vidFccAccount.label;"
     256                        oncommand="setPickersState('msgStationeryFolderPicker', 'msgStationeryAccountPicker', event)" />
     257                    <radio id="VIdent_fcc_Settings_Of_Default"
     258                        value="2" label="&vident.prefs.vidFccDefault.label;"
     259                        oncommand="setPickersState('msgStationeryFolderPicker', 'msgStationeryAccountPicker', event)" />
     260                    <row align="center">
     261                        <radio id="VIdent_tmpl_selectAccount"
     262                            value="0" label="&templatesFolderOn.label;"
     263                            accesskey="&templatesFolderOn.accesskey;"
     264                            oncommand="setPickersState('msgStationeryAccountPicker', 'msgStationeryFolderPicker', event)" />
     265                        <menulist id="msgStationeryAccountPicker"
     266                            oncommand="noteSelectionChange('VIdent_tmpl_selectAccount')"
     267                            flex="1" />
     268                    </row>
     269                    <row align="center">
     270                        <radio id="VIdent_tmpl_selectFolder"
     271                            value="1" label="&templateInOtherFolder.label;"
     272                            accesskey="&templateInOtherFolder.accesskey;"
     273                            oncommand="setPickersState('msgStationeryFolderPicker', 'msgStationeryAccountPicker', event)" />
     274                        <menulist id="msgStationeryFolderPicker"
     275                            oncommand="noteSelectionChange('VIdent_tmpl_selectFolder')"
     276                            flex="1" />
     277                    </row>
     278                </rows>
     279            </grid>
     280            </radiogroup>
     281
     282            </groupbox>
    194283        </tabpanel>
    195284        </tabpanels>
Note: See TracChangeset for help on using the changeset viewer.