mailnews/base/content/subscribe.xul
author Geoff Lankow <geoff@darktrojan.net>
Wed, 17 Oct 2018 00:07:38 +1300
changeset 33579 1f384411c0acacf6976d8f0b3bcd76e45073a230
parent 33562 0c7377410adfbee23c00cdf5d6f69b4f87e35ca1
child 33640 87943872543e306a510525a2a02502564ff49f18
permissions -rw-r--r--
Bug 1499240 - Fix failing test by listening for input event instead of command event. r=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/. -->

#ifndef MOZ_SUITE
<?xml-stylesheet href="chrome://messenger/content/bindings.css" type="text/css"?>
#endif
<?xml-stylesheet href="chrome://messenger/skin/subscribe.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/folderMenus.css" type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://messenger/locale/subscribe.dtd">

<dialog id="subscribeWindow"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:html="http://www.w3.org/1999/xhtml"
        title="&subscribeDialog.title;"
        style="width: 44em; height: 33em;"
        persist="width height screenX screenY"
        onload="SubscribeOnLoad()"
        onunload="SubscribeOnUnload()"
        windowtype="mailnews:subscribe"
        ondialogaccept="return subscribeOK();"
        ondialogcancel="return subscribeCancel();">

  <stringbundle id="bundle_subscribe" src="chrome://messenger/locale/subscribe.properties"/>
  <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>

  <script type="application/javascript"
          src="chrome://global/content/globalOverlay.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/mailWindow.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/subscribe.js"/>

  <grid flex="1" style="width: 40em; height: 25em;">
    <columns>
      <column flex="1"/>
      <column/>
    </columns>

    <rows>
      <row>
        <grid flex="1">
          <columns>
            <column/>
            <column flex="1"/>
          </columns>

          <rows>
            <row>
              <hbox pack="end" align="center">
                <label value="&server.label;" accesskey="&server.accesskey;" control="serverMenu"/>
              </hbox>
              <menulist id="serverMenu" flex="1" class="folderMenuItem">
                <menupopup type="folder" mode="subscribe" expandFolders="false"
                           oncommand="onServerClick(event.target._folder);"/>
              </menulist>
            </row>
            <row align="center">
              <label value="&namefield.label;" accesskey="&namefield.accesskey;"
                     id="namefieldlabel" control="namefield"/>
              <textbox id="namefield" flex="1" type="search" timeout="300"
                       aria-controls="subscribeTree"
                       oninput="Search();"/>
            </row>
          </rows>
        </grid>
        <spacer/>
      </row>
      <row>
        <separator class="thin"/>
        <spacer/>
      </row>
      <row flex="1">
        <tabbox>
          <tabs id="subscribeTabs">
            <tab id="currentListTab"
                 selected="true"
                 oncommand="ShowCurrentList()"/>
            <tab id="newGroupsTab"
                 label="&newGroupsTab.label;"
                 accesskey="&newGroupsTab.accesskey;"
                 oncommand="ShowNewGroupsList()"/>
          </tabs>
          <tabpanels flex="1">
            <tabpanel id="treepanel" flex="1" orient="vertical">
              <label id="subscribeLabel"/>
              <hbox flex="1">
                <deck id="subscribedeck" selectedIndex="0" flex="1">
                  <hbox id="normalview">
                    <tree id="subscribeTree"
                          treelines="true"
                          flex="1"
                          hidecolumnpicker="true"
                          seltype="multiple"
                          disableKeyNavigation="true"
                          onkeypress="onSubscribeTreeKeyPress(event);"
                          onclick="SubscribeOnClick(event);">
                      <treecols id="theSubscribeColumns">
                        <treecol id="nameColumn" primary="true" flex="10"
                                 hideheader="true" crop="center"/>
                        <splitter class="tree-splitter"/>
                        <treecol id="subscribedColumn" type="checkbox" flex="1"
                                 hideheader="true"/>
                      </treecols>
                      <treechildren id="subscribeTreeBody"/>
                    </tree>
                  </hbox>

                  <hbox id="searchview">
                    <tree id="searchTree" flex="1"
                          disableKeyNavigation="true"
                          hidecolumnpicker="true"
                          onkeypress="onSearchTreeKeyPress(event);"
                          onclick="SearchOnClick(event);">
                      <treecols>
                        <treecol id="nameColumn2" primary="true"
                                 flex="10" hideheader="true"
                                 sortDirection="ascending"/>
                        <splitter class="tree-splitter"/>
                        <treecol id="subscribedColumn2"
                                 flex="1" hideheader="true"/>
                      </treecols>
                      <treechildren id="searchTreeBody"/>
                    </tree>
                  </hbox>
                </deck>

                <vbox>
                  <button id="subscribe" label="&subscribeButton.label;"
                          accesskey="&subscribeButton.accesskey;"
                          oncommand="SetSubscribeState(true)"/>
                  <button id="unsubscribe" label="&unsubscribeButton.label;"
                          accesskey="&unsubscribeButton.accesskey;"
                          oncommand="SetSubscribeState(false)"/>
                  <button id="refreshButton" label="&refreshButton.label;"
                          accesskey="&refreshButton.accesskey;"
                          oncommand="Refresh()"/>
                  <button id="stopButton" label="&stopButton.label;"
                          accesskey="&stopButton.accesskey;"
                          oncommand="Stop()" disabled="true"/>
                  <spacer flex="1"/>
                </vbox>

              </hbox>
            </tabpanel>
          </tabpanels>
        </tabbox>
      </row>
      <row>
        <hbox id="statusContainerBox">
           <statusbarpanel id="statusText" crop="right" flex="1"/>
           <statusbarpanel class="statusbarpanel-progress" collapsed="true" id="statusbar-progresspanel">
             <html:progress class="progressmeter-statusbar" id="statusbar-icon" value="0" max="100"/>
           </statusbarpanel>
         </hbox>
         <hbox/>
      </row>
    </rows>
  </grid>
</dialog>