mailnews/import/content/fieldMapImport.xul
author Geoff Lankow <geoff@darktrojan.net>
Wed, 18 Jul 2018 20:59:35 +1200
changeset 24298 a7d0257d9621817b6e6fc3094ebeec93097bc44d
parent 24288 eaad7c4f5df4ea20b6f3d36124c415347e2a8112
child 26093 5dbc2aa48128a220935511736d120bbd99e2f8f4
permissions -rw-r--r--
Bug 1475817 - Part 11: Convert simple <listbox> to <richlistbox> in mailnews/import. r=Paenglab,jorgk

<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
#ifdef MOZ_THUNDERBIRD
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
#else
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
#endif
<?xml-stylesheet href="chrome://messenger/skin/dialogs.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/content/fieldMapImport.css" type="text/css"?>

<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/fieldMapImport.dtd">

<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        buttons="accept,cancel"
        title="&fieldMapImport.title;"
        style="&fieldMapImport.size;"
        ondialogaccept="FieldImportOKButton();"
        onload="OnLoadFieldMapImport();">

  <script type="application/javascript" src="chrome://messenger/content/fieldMapImport.js"/>
  <script><![CDATA[
      function resizeColumns() {
        let list = document.getElementById("fieldList");
        let cols = list.getElementsByTagName("treecol");
        list.style.setProperty("--column1width", cols[0].boxObject.width + "px");
        list.style.setProperty("--column2width", cols[1].boxObject.width + "px");
      }
      addEventListener("load", resizeColumns, { once: true });
      addEventListener("resize", resizeColumns);
  ]]></script>

  <hbox align="center">
    <label value="&fieldMapImport.recordNumber;"/>
    <label id="recordNumber"/>
    <spacer flex="1"/>
    <button id="previous" oncommand="Browse(-1);"
            label="&fieldMapImport.previous.label;"
            accesskey="&fieldMapImport.previous.accesskey;"/>
    <button id="next" oncommand="Browse(1);"
            label="&fieldMapImport.next.label;"
            accesskey="&fieldMapImport.next.accesskey;"/>
  </hbox>

  <hbox align="center">
    <checkbox id="skipFirstRecord"
              label="&fieldMapImport.skipFirstRecord.label;"
              accesskey="&fieldMapImport.skipFirstRecord.accessKey;"/>
  </hbox>

  <separator class="thin"/>
  <label control="fieldList">&fieldMapImport.text;</label>
  <separator class="thin"/>

  <!-- field list -->
  <hbox flex="1">
    <richlistbox id="fieldList"
                 class="theme-listbox"
                 flex="1"
                 onselect="disableMoveButtons();">
      <treecols>
        <treecol flex="3"/>
        <treecol flex="7" id="fieldNameHeader" label="&fieldMapImport.fieldListTitle;"/>
        <treecol flex="13" id="sampleDataHeader" label="&fieldMapImport.dataTitle;"/>
      </treecols>
    </richlistbox>

    <vbox>
      <spacer flex="1"/>
      <button id="upButton" class="up" label="&fieldMapImport.up.label;"
              accesskey="&fieldMapImport.up.accesskey;"
              oncommand="moveItem(true);"/>
      <button id="downButton" class="down" label="&fieldMapImport.down.label;"
              accesskey="&fieldMapImport.down.accesskey;"
              oncommand="moveItem(false);"/>
      <spacer flex="1"/>
    </vbox>
  </hbox>

</dialog>