<?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:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  orient="vertical"
  onload="onLoad();"
  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"/>

  <box orient="horizontal">
    <text class="label" value="&filtersForPrefix.label;"/>
    <menulist oncommand="onServerClick(event);" id="serverMenu">
      <menupopup rdf:datasources="rdf:msgaccountmanager"
                 rdf:containment="http://home.netscape.com/NC-rdf#child"
                 ref="msgaccounts:/">
        <template>
          <menuitem uri="..." data="..." value="rdf:http://home.netscape.com/NC-rdf#Name"/>
        </template>
      </menupopup>
    </menulist>
    <text class="label" value="&filtersForPostfix.label;"/>
  </box>
  <box orient="horizontal" >
    <box orient="vertical" style="width:100%;" >
    <text value="&filterHeader.label;"/>
    <box orient="horizontal" style="min-height: 200px; min-width: 200px">
    <tree id="filterTree" class="inset" flex="1"
       onselect="onFilterSelect(event);"
       rdf:datasources="rdf:msgfilters rdf:msgaccountmanager "
       rdf:containment="http://home.netscape.com/NC-rdf#child">
          <template>
          <rule>
            <treechildren flex="1">
            <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="85" rdf:resource="http://home.netscape.com/NC-rdf#Name" id="nameColumn"/>
        <treecol style="width: 0px" flex="15" id="activeColumn"/>
      </treecolgroup>

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

>
    <box orient="vertical">
      <spring flex="3"/>
      <scrollbarbutton type="increment" oncommand="onUp(event)">
        <image src="chrome://global/skin/scroll-up.gif"/>
      </scrollbarbutton>
      <spring flex="1"/>
      <scrollbarbutton type="decrement" oncommand="onDown(event)">
        <image src="chrome://global/skin/scroll-down.gif"/>
      </scrollbarbutton>
      <spring flex="3"/>
    </box>
    </box>
    </box>
    <box orient="vertical">
      <button id="newButton" value="&newButton.label;" onclick="onNewFilter();"/>
      <button id="editButton" value="&editButton.label;" onclick="onEditFilter();"/>
      <button id="deleteButton" value="&deleteButton.label;" onclick="onDeleteFilter();"/>
    </box>
  </box>
<!--
  take out for PR2
  <box orient="horizontal">
    <button value="&runFiltersNow.label;" width="0em"/>
  </box>
-->
<!--  <button onclick="DumpDOM(document.getElementById('filterTree'));" value="dump"/> -->
  <separator class="groove"/>
  <box id="okCancelButtons"/>

</window>
