<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape 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/NPL/

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 Netscape are
 Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->

<?xml-stylesheet href="chrome://messenger/skin/messenger.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>

<!DOCTYPE window SYSTEM "chrome://messenger/locale/FilterListDialog.dtd" >
<window class="dialog"
  xmlns:nc="http://home.netscape.com/NC-rdf#"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  orient="vertical"
  onload="onLoad();"
  style="width: 34em;"
  title="&window.title;">

  <script language="JavaScript" src="chrome://messenger/content/FilterListDialog.js"/>
  <script language="JavaScript" src="chrome://global/content/strres.js"/>

  <!-- <script src="resource:/res/samples/DumpDOM.js"/> -->

  <keyset id="keyset"/>

  <grid flex="1">
    <columns>
      <column flex="1"/>
      <column/>
      <column/>
    </columns>
    <rows>
      <row>
        <text class="label" value="&filtersForPrefix.label;"/>
        <box/>
        <box/>
      </row>
      <row>
        <menulist oncommand="onServerClick(event);" id="serverMenu">
          <menupopup datasources="rdf:msgaccountmanager"
                     containment="http://home.netscape.com/NC-rdf#child"
                     ref="msgaccounts:/">
            <template>
              <rule nc:SupportsFilters="true">
                <menuitem uri="..." data="..." value="rdf:http://home.netscape.com/NC-rdf#Name"/>
              </rule>
            </template>
          </menupopup>
        </menulist>
        <box/>
        <box/>
      </row>
      <row>
        <separator/>
        <box/>
        <box/>
      </row>
      <row>
        <box orient="vertical">
          <html>&filterHeader.label;</html>
          <tree id="filterTree" class="inset" flex="1"
                onselect="onFilterSelect(event);"
                datasources="rdf:msgfilters rdf:msgaccountmanager "
                containment="http://home.netscape.com/NC-rdf#child">

            <treehead>
              <treerow>
                <treecell class="treecell-header treecell-inset-header" 
                          persist="hidden width" value="&nameColumn.label;"/>
                <treecell class="treecell-header treecell-inset-header" 
                          persist="hidden width" value="&activeColumn.label;"/>
              </treerow>
            </treehead>

            <template>
              <rule>
                <treechildren>
                  <treeitem uri="..." open="true"
                            Enabled="rdf:http://home.netscape.com/NC-rdf#Enabled">
                    <treerow >
                      <treecell indent="true" value="rdf:http://home.netscape.com/NC-rdf#Name"/>
                      <treecell allowevents="true"
                                class="enabledcol treecell-image"
                                value="rdf:http://home.netscape.com/NC-rdf#Enabled"
                                onclick="onToggleEnabled(event);"/>
                    </treerow>
                  </treeitem>
                </treechildren>
              </rule>
            </template>
          
            <treecolgroup>
              <treecol style="width: 0px" flex="1" resource="http://home.netscape.com/NC-rdf#Name" id="nameColumn"/>
              <treecol id="activeColumn"/>
            </treecolgroup>
          
            <treechildren flex="1"/>
            
          </tree>
        </box>
        <box orient="vertical">
          <spring flex="1"/>
          <button class="reorder-up" oncommand="onUp(event);"/>
          <button class="reorder-down" oncommand="onDown(event);"/>
          <spring flex="1"/>
        </box>
        <box orient="vertical">
          <button id="newButton" value="&newButton.label;" oncommand="onNewFilter();"/>
          <button id="editButton" value="&editButton.label;" oncommand="onEditFilter();"/>
          <button id="deleteButton" value="&deleteButton.label;" oncommand="onDeleteFilter();"/>
          <spring flex="1"/>
          <!-- take out for PR2
            <button value="&runFiltersNow.label;" width="0em"/>
            <button oncommand="DumpDOM(document.getElementById('filterTree'));" value="dump"/>
          -->
        </box>
      </row>
    </rows>
  </grid>
     
  <separator/>

  <box id="okCancelButtonsRight"/>

</window>
