<?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.
   - 
   - Contributor(s): 
   -   Ben "Count XULula" Goodger
  -->

<!-- first checkin of the year 2000!      -->
<!-- Ben Goodger, 12:50AM, 01/00/00 NZST  -->

<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>

<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!-- May not need this here -->
<!-- <?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?> -->

<!DOCTYPE window SYSTEM "chrome://editor/locale/EdAdvancedEdit.dtd">
<window class="dialog" title="&WindowTitle.label;"
    style="width: 40em;"
    xmlns ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    xmlns:html="http://www.w3.org/1999/xhtml"
    onload="Startup()"
    orient="vertical">

  <keyset id="dialogKeys"/>
  <popupset id="aTooltipSet" />
    
  <!-- Methods common to all editor dialogs -->
  <script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
  <!-- global dialog functions -->
  <script type="application/x-javascript" src="chrome://editor/content/EdAdvancedEdit.js"/>
  <!-- element page functions -->
  <script type="application/x-javascript" src="chrome://editor/content/EdAEHTMLAttributes.js"/>
  <script type="application/x-javascript" src="chrome://editor/content/EdAECSSAttributes.js"/>
  <script type="application/x-javascript" src="chrome://editor/content/EdAEJSEAttributes.js"/>

  <script type="application/x-javascript" src="chrome://global/content/dialogOverlay.js" />
  <script type="application/x-javascript" src="chrome://global/content/strres.js" />

  <broadcaster id="args" value=""/>

  <box autostretch="never">
    <text class="label" value="&currentattributesfor.label;"/>
    <text class="label header" id="tagLabel"/>
  </box>
  
  <separator class="thin"/>
  
  <tabbox orient="vertical" flex="1">
    <tabs>
      <tab label="&tabHTML.label;"/>
      <tab label="&tabCSS.label;"/>
      <tab label="&tabJSE.label;"/>
    </tabs>
    <tabpanels flex="1">
      <!-- ============================================================== -->
      <!--                        HTML Attributes                         -->
      <!-- ============================================================== -->
      <box flex="1" orient="vertical">
        <tree id="HTMLATree" 
          class="AttributesTree inset" 
          flex="1"
          tooltip="aTooltip" tooltiptext="Click on item to edit value"
          onselect="SelectTreeItem(this)">
          <treecols>
            <treecol flex="35" width="0"/>
            <splitter class="tree-splitter"/>
            <treecol flex="65" width="0"/>
          </treecols>
          <treehead>
            <treerow>
              <treecell class="treecell-header treecell-inset-header" label="&tree.attributeHeader.label;"
                tooltip="aTooltip" tooltiptext="Click on item to edit value"/>
              <treecell class="treecell-header treecell-inset-header" label="&tree.valueHeader.label;"
                tooltip="aTooltip" tooltiptext="Click on item to edit value"/>
            </treerow>
          </treehead>
          <treechildren id="HTMLAList" flex="1"/>
        </tree>
        <box valign="middle" autostretch="never" flex="1">
          <text class="label" value="&editAttribute.label;"/>
          <spring flex="1"/>
          <button class="dialog" label="&removeAttribute.label;" oncommand="RemoveAttribute('HTMLATree')"/>
        </box>
        <box orient="vertical">
          <spring class="spacer"/>
          <titledbox orient="vertical">
            <label value="&AddHTMLAttributeLabel.label;"/>
            <box autostretch="never">
              <text class="label" for="AddHTMLAttributeNameInput" value="&AttName.label;"/>
              <textbox flex="1" id="AddHTMLAttributeNameInput" oninput="doHTMLEnabling()" onkeyup="if (event.keyCode == 13) onAddHTMLAttribute();"/>
              <text class="label" for="AddHTMLAttributeValueInput" value="&AttValue.label;"/>
          	  <textbox flex="1" id="AddHTMLAttributeValueInput" oninput="doHTMLEnabling()" onkeyup="if (event.keyCode == 13) onAddHTMLAttribute();"/>
              <button class="dialog" id="AddHTMLAttribute" oncommand="onAddHTMLAttribute()" label="&AddAttributeButton.label;" disabled="true"/>
            </box>
          </titledbox>
        </box>
      </box>
      <!-- ============================================================== -->
      <!--                         CSS Attributes                         -->
      <!-- ============================================================== -->
      <box flex="1" orient="vertical">
        <tree id="CSSATree" class="AttributesTree inset" flex="1"
          onselect="SelectTreeItem(this)">
          <treecolgroup>
            <treecol flex="35" width="0"/>
            <splitter class="tree-splitter"/>
            <treecol flex="65" width="0"/>
          </treecolgroup>
          <treehead>
            <treerow>
              <treecell class="treecell-header treecell-inset-header" label="&tree.attributeHeader.label;"/>
              <treecell class="treecell-header treecell-inset-header" label="&tree.valueHeader.label;"/>
            </treerow>
          </treehead>
          <treechildren id="CSSAList" flex="1"/>
        </tree>
        <box valign="middle" autostretch="never" flex="1">
          <text class="label" value="&editAttribute.label;"/>
          <spring flex="1"/>
          <button class="dialog" label="&removeAttribute.label;" oncommand="RemoveAttribute('CSSATree')"/>
        </box>
        <box orient="vertical">
          <spring class="spacer"/>
          <titledbox orient="vertical">
            <label value="&AddCSSAttributeLabel.label;"/>
            <box autostretch="never">
              <text class="label" for="AddCSSAttributeNameInput" value="&AttName.label;"/>
              <textbox flex="1" id="AddCSSAttributeNameInput"  oninput="doCSSEnabling()" onkeyup="if (event.keyCode == 13) onAddCSSAttribute();"/>
              <text class="label" for="AddCSSAttributeValueInput" value="&AttValue.label;"/>
          	  <textbox flex="1" id="AddCSSAttributeValueInput" oninput="doCSSEnabling()" onkeyup="if (event.keyCode == 13) onAddCSSAttribute();"/>
              <button class="dialog" id="AddCSSAttribute" oncommand="onAddCSSAttribute()" label="&AddAttributeButton.label;" disabled="true"/>
            </box>
          </titledbox>
        </box>
      </box>
      <!-- ============================================================== -->
      <!--                    JavaScript Event Handlers                   -->
      <!-- ============================================================== -->
      <box flex="1" orient="vertical">
        <tree id="JSEATree" class="AttributesTree inset" flex="1"
          onselect="SelectTreeItem(this)">
          <treecolgroup>
            <treecol flex="35" width="0"/>
            <splitter class="tree-splitter"/>
            <treecol flex="65" wdith="0"/>
          </treecolgroup>
          <treehead>
            <treerow>
              <treecell class="treecell-header treecell-inset-header" label="&tree.attributeHeader.label;"/>
              <treecell class="treecell-header treecell-inset-header" label="&tree.valueHeader.label;"/>
            </treerow>
          </treehead>
          <treechildren id="JSEAList" flex="1"/>
        </tree>
        <box valign="middle" autostretch="never" flex="1">
          <text class="label" value="&editAttribute.label;"/>
          <spring flex="1"/>
          <button class="dialog" label="&removeAttribute.label;" oncommand="RemoveAttribute('JSEATree')"/>
        </box>
        <box orient="vertical">
          <spring class="spacer"/>
          <titledbox orient="vertical">
            <label value="&AddJSEAttributeLabel.label;"/>
            <box autostretch="never">
              <text class="label" for="AddJSEAttributeNameInput" value="&AttName.label;"/>
              <textbox flex="1" id="AddJSEAttributeNameInput" oninput="doJSEEnabling()" onkeyup="if (event.keyCode == 13) onAddJSAttribute();"/>
              <text class="label" for="AddJSEAttributeValueInput" value="&AttValue.label;"/>
          	  <textbox flex="1" id="AddJSEAttributeValueInput" oninput="doJSEEnabling()" onkeyup="if (event.keyCode == 13) onAddJSAttribute();"/>
              <button class="dialog" id="AddJSEAttribute" oncommand="onAddJSEAttribute()" label="&AddAttributeButton.label;" disabled="true"/>
            </box>
          </titledbox>
        </box>
      </box>
      <!-- ============================================================== -->
    </tabpanels>
  </tabbox>
  <spring class="spacer"/>
  <box id="okCancelButtonsRight"/> 

</window>
