mail/base/content/subscribe.xul
author Marco Zehe <marco.zehe@googlemail.com>
Fri, 24 Apr 2009 10:35:24 +0100
changeset 2468 b7fd81f51c6e895f742fedf44f8d7600ffe55057
parent 340 4ad411cb6f20c17bd85ef217d0eb6139922157dc
child 3959 21e93a577fa3f5cc7e257da7096c4ed5265e0c19
permissions -rw-r--r--
Bug 482440 - "Provide aria-controls attribute on searchtextbox widgets" [r+sr=dmose]

<?xml version="1.0"?> 

# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998-1999
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****

<?xml-stylesheet href="chrome://messenger/skin/subscribe.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/messenger.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"
        title="&subscribeDialog.title;"
        style="width: 44em; height: 33em;"
        persist="width height screenX screenY"
        onload="SubscribeOnLoad()"
        onunload="SubscribeOnUnload()"
        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/x-javascript" src="chrome://messenger/content/mailWindow.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/subscribe.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/widgetglue.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 oncommand="onServerClick(event.target._folder);" id="serverMenu" flex="1">
                <menupopup type="folder" mode="subscribe" expandFolders="false"/>
              </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"
                       oncommand="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"
                          datasources="rdf:null"
                          flags="dont-build-content"
                          disableKeyNavigation="true"
                          statedatasource="rdf:null"
                          onkeypress="onSubscribeTreeKeyPress(event);"
                          onclick="SubscribeOnClick(event);"> 
                      <template>
                        <rule>
                          <conditions>
                            <content uri="?container"/> 
                              <member container="?container" child="?member"/>
                            </conditions>
              
                            <bindings>
                              <binding subject="?member"
                                      predicate="http://home.netscape.com/NC-rdf#LeafName"
                                      object="?LeafName"/>
                              <binding subject="?member"
                                      predicate="http://home.netscape.com/NC-rdf#ServerType"
                                      object="?ServerType"/>
                              <binding subject="?member"
                                      predicate="http://home.netscape.com/NC-rdf#Subscribed"
                                      object="?Subscribed"/>
                              <binding subject="?member"
                                      predicate="http://home.netscape.com/NC-rdf#Subscribable"
                                      object="?Subscribable"/>
                              <binding subject="?member"
                                      predicate="http://home.netscape.com/NC-rdf#TotalMessages"
                                      object="?TotalMessages"/>
                            </bindings>

                            <action>
                              <treechildren>
                                <treeitem uri="?member">
                                  <treerow>
                                    <treecell label="?LeafName"
                                              properties="ServerType-?ServerType Subscribable-?Subscribable"/>
                                    <treecell properties="Subscribed-?Subscribed Subscribable-?Subscribable"/>
                                  </treerow>
                                </treeitem>
                              </treechildren>
                            </action>
                        </rule>
                      </template>
    
                      <treecols id="theSubscribeColumns">
                        <treecol id="nameColumn" primary="true"
                                 sort="?LeafName" flex="10" hideheader="true"/>
                        <splitter class="tree-splitter"/>
                        <treecol id="subscribedColumn"  
                                 sort="?Subscribed" flex="1" hideheader="true"/>
                      </treecols>
                    </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"
                        sort="?LeafName" flex="10" hideheader="true"/>
                        <splitter class="tree-splitter"/>
                        <treecol id="subscribedColumn2"
                         sort="?Subscribed" 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="cmd_stop" label="&stopButton.label;"
                          accesskey="&stopButton.accesskey;" 
                          oncommand="Stop()"/>
                  <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">
             <progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
           </statusbarpanel>
         </hbox>
         <hbox/>
      </row>
    </rows>
  </grid>
</dialog>