<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--

  The contents of this file are subject to the Netscape Public License
  Version 1.1 (the "NPL"); you may not use this file except in
  compliance with the NPL.  You may obtain a copy of the NPL at
  http://www.mozilla.org/NPL/

  Software distributed under the NPL is distributed on an "AS IS" basis,
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  for the specific language governing rights and limitations under the
  NPL.

  The Initial Developer of this code under the NPL is Netscape
  Communications Corporation.  Portions created by Netscape are
  Copyright (C) 1999 Netscape Communications Corporation.  All Rights
  Reserved.

-->

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

<!DOCTYPE window SYSTEM "chrome://sidebar/locale/customize.dtd" >

<window
  xmlns:html="http://www.w3.org/TR/REC-html40"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  onload="Init();" 
  class="color-dialog"
  title="&sidebar.customize.title.label;"
  windowtype="sidebar:customize"
  align="vertical">

  <html:script src="chrome://sidebar/content/customize.js" />

  <box id="header" type="largeheader" value="&sidebar.customize.title.label;"/>

  <box id="contentarea" flex="1">
    <box orient="vertical" flex="1">
      <text value="&sidebar.customize.additional.label;"/>
      <tree id="other-panels" flex="1"
        datasources="rdf:null"
        indent="true" class="inset"
        multiple="true">
  
        <template>
          <treechildren>
            <treeitem uri="rdf:*"
              title="rdf:http://home.netscape.com/NC-rdf#title"
              content="rdf:http://home.netscape.com/NC-rdf#content"
              link="rdf:http://home.netscape.com/NC-rdf#link"
              haslink="rdf:http://home.netscape.com/NC-rdf#haslink"
              open="rdf:http://home.netscape.com/NC-rdf#open"
              persist="open">
              <treerow>
                <treecell indent="true" 
                  value="rdf:http://home.netscape.com/NC-rdf#title"/>
              </treerow>
            </treeitem>
          </treechildren>
        </template>
         <treecol />
        <treechildren onclick="SelectChangeForOtherPanels(event, event.target.parentNode.parentNode)" />
      </tree>

      <!-- xxxslamm Need to add descriptive panel text here -->
      <box class="button-group">
        <button id="add_button" oncommand="AddPanel()"
          value="&sidebar.customize.add.label;"
          disabled="true"/>

        <button id="preview_button" oncommand="PreviewPanel()"
          value="&sidebar.customize.preview.label;"
          disabled="true"/>
      </box>
    </box> 
    
    <separator orient="vertical"/>    

    <!-- The panels that the user currently has chosen -->
    <box orient="vertical" flex="1">
      <text value="&sidebar.customize.current.label;"/>
      <tree id="current-panels" onclick="SelectChangeForCurrentPanels();"
        datasources="rdf:null" class="inset" flex="1"
        multiple="true">

        <template>
          <treechildren>
            <treeitem uri="rdf:*"
              title="rdf:http://home.netscape.com/NC-rdf#title"
              customize="rdf:http://home.netscape.com/NC-rdf#customize"
              content="rdf:http://home.netscape.com/NC-rdf#content">
              <treerow>
                <treecell
                  value="rdf:http://home.netscape.com/NC-rdf#title" />
              </treerow>
            </treeitem>
          </treechildren>
        </template>
        <treecol />
         <!-- We explicitly create a 'treechildren' so we can refer
              to it from the script -->
        <treechildren id="current-panels-root"/> 
      </tree>
      <box class="button-group">
        <button id="customize-button" oncommand="CustomizePanel();" 
          value="&sidebar.customize.customize.label;" />
        <button id="remove-button" onclick="RemovePanel()"
          value="&sidebar.customize.remove.label;" />
      </box>      
    </box>

    <separator orient="vertical" class="thin"/>

    <!-- The 'reorder' buttons -->
    <box id="reorder" align="vertical" autostretch="never">
      <spring flex="1"/>
      <button oncommand="MoveUp();" id="up" class="up small" />
      <button oncommand="MoveDown();" id="down" class="down small" />
      <spring flex="1"/>
    </box> 

  </box>

  <box id="saveCancelButtons">
  	<spring flex="1"/>
	<button oncommand="Save();" id="save_button" value="&sidebar.customize.save.label;" />
	<button oncommand="window.close();" value="&sidebar.customize.cancel.label;" />
	<spring flex="1"/>
  </box>

</window>

