<?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-2000 Netscape Communications Corporation. All
   Rights Reserved.
   
   Contributor(s): 
  -->

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

<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-editing.dtd">

<window xmlns:html="http://www.w3.org/TR/REC-html40"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        class="color-dialog"
        orient="vertical" 
        onload="parent.initPanel('chrome://communicator/content/pref/pref-editing.xul');">

  <script lanugage="JavaScript">
  <![CDATA[
    _elementIDs = ["editorAuthor", "textData", "linkData", "aLinkData", "fLinkData", "backgroundData", "useCustomColors", "backroundImageField"];
  ]]>
  </script>

  <script language="JavaScript" src="chrome://communicator/content/pref/pref-composer.js"></script>
  <script language="JavaScript" src="chrome://global/content/strres.js"></script>
  <script language="JavaScript" src="chrome://communicator/content/pref/prefutilities.js"></script>
        
  <box class="box-smallheader" title="&lHeader;"/>

  <titledbox orient="vertical">
    <title><text value="&authorName.label;"/></title>
    <textfield id="editorAuthor" flex="1"
               pref="true" preftype="string" prefstring="editor.author"
               prefattribute="value"/>
  </titledbox>

  <titledbox orient="vertical">
    <title><text value="&pageColorHeader;"/></title> 

    <box>
      <box orient="vertical">
        <radiogroup id="useCustomColors" orient="vertical" autostretch="never"  
                    pref="true" preftype="int" prefstring="editor.use_custom_default_colors"
                    prefattribute="data">
          <radio group="useCustomColors" data="0" value="&useNavigator.label;" accesskey="&useNavigator.accesskey;" oncommand="useNavigatorColors();"/>
          <radio group="useCustomColors" data="1" value="&useCustomColors.label;" accesskey="&useCustomColors.accesskey;" oncommand="useCustomColors()"/>
        </radiogroup>
       <grid class="indent">
          <columns>
            <column flex="1"/>
            <column/>
          </columns>
          <rows>
            <row>
              <text class="label" id="textLabel" value="&NormalText.label;&colon.char;" accesskey="&NormalText.accesskey;" for="textMenu"/>
              <menu id="textMenu" allowevents="true" class="colorpicker">
                <html:div id="textDiv" style="width:30px; background-color:white"/>
                <titledbutton class="popup" align="right"/>
                <menupopup id="textPopup">
                  <colorpicker allowevents="true" id="textPicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'normaltext', false);"/>
                </menupopup>
              </menu>
              <data id="textData" pref="true" preftype="color" prefstring="editor.text_color" prefattribute="value" wsm_attributes="value"/>
            </row>
  
            <row>
              <text class="label" id="linkLabel" value="&LinkText.label;&colon.char;" accesskey="&LinkText.accesskey;" for="linkMenu"/>
              <menu id="linkMenu" allowevents="true" class="colorpicker">
                <html:div id="linkDiv" style="width:30px; background-color:white"/>
                <titledbutton class="popup" align="right"/>
                <menupopup id="linkPopup">
                  <colorpicker allowevents="true" id="linkPicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'linktext', false);"/>
                </menupopup>
              </menu>
              <data id="linkData" pref="true" preftype="color" prefstring="editor.link_color" prefattribute="value" wsm_attributes="value"/>
            </row>
  
            <row>
              <text class="label" id="aLinkLabel" value="&ActiveLinkText.label;&colon.char;" accesskey="&ActiveLinkText.accesskey;" for="aLinkMenu"/>
              <menu id="aLinkMenu" allowevents="true" class="colorpicker">
                <html:div id="aLinkDiv" style="width:30px; background-color:white"/>
                <titledbutton class="popup" align="right"/>
                <menupopup id="aLinkPopup">
                  <colorpicker allowevents="true" id="aLinkPicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'activelinktext', false);"/>
                </menupopup>
              </menu>
              <data id="aLinkData" pref="true" preftype="color" prefstring="editor.active_link_color" prefattribute="value" wsm_attributes="value"/>
            </row>
            <row>
              <text class="label" id="fLinkLabel" value="&FollowedLinkText.label;&colon.char;" accesskey="&FollowedLinkText.accesskey;" for="fLinkMenu"/>
              <menu id="fLinkMenu" allowevents="true" class="colorpicker">
                <html:div id="fLinkDiv" style="width:30px; background-color:white"/>
                <titledbutton class="popup" align="right"/>
                <menupopup id="fLinkPopup">
                  <colorpicker allowevents="true" id="fLinkPicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'followedlinktext', false);"/>
                </menupopup>
              </menu>
              <data id="fLinkData" pref="true" preftype="color" prefstring="editor.followed_link_color" prefattribute="value" wsm_attributes="value"/>
            </row>
            <row>
              <text class="label" id="backgroundLabel" value="&BackgroundColor.label;&colon.char;" accesskey="&BackgroundColor.accesskey;" for="backgroundMenu"/>
              <menu id="backgroundMenu" allowevents="true" class="colorpicker">
                <html:div id="backgroundDiv" style="width:30px; background-color:white"/>
                <titledbutton class="popup" align="right"/>
                <menupopup id="backgroundPopup">
                  <colorpicker allowevents="true" id="backgroundPicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'backgroundcolor', true);"/>
                </menupopup>
              </menu>
              <data id="backgroundData" pref="true" preftype="color" prefstring="editor.background_color" prefattribute="value" wsm_attributes="value"/>
            </row>
          </rows>
        </grid>        
      </box>
        
      <separator orient="vertical"/>
      
      <box orient="vertical" flex="1">
        <box />
        <separator orient="vertical"/>
        
        <box class="inset" id="backgroundcolor" orient="vertical" flex="1">
          <separator/>
          <text class="label" id="normaltext" value="&NormalText.label;"/>
          <separator class="thin"/>
          <text class="label" id="linktext" value="&LinkText.label;"/>
          <separator class="thin"/>
          <text class="label" id="activelinktext" value="&ActiveLinkText.label;"/>
          <separator class="thin"/>
          <text class="label" id="followedlinktext" value="&FollowedLinkText.label;"/>
          <separator/>
        </box>
      </box>
      
    </box>                       

    <separator class="thin"/>

    <!-- a good idea here might be to load this image into the bg of the preview
         area if it is available (locally, or network connection is open) -->    
    <text class="label" value="&defaultBackgroundImage.label;" accesskey="&defaultBackgroundImage.accesskey;"/>
    <box autostretch="never">
      <textfield id="backroundImageField" flex="1" 
                 pref="true" preftype="string"
                 prefstring="editor.default_background_image" 
                 prefattribute="value"/>
      <button class="dialog" value="&chooseFile.label;" accesskey="&chooseFile.accesskey;" oncommand="prefNavSelectFile('backroundImageField','choosefile',true);"/>
    </box>

 	</titledbox>
    
</window>

