<?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;"
    width="450" height="390"
    persist="width height"
    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="keyset"/>
    
  <!-- Methods common to all editor dialogs -->
  <script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js"/>
  <!-- global dialog functions -->
  <script language="JavaScript" src="chrome://editor/content/EdAdvancedEdit.js"/>
  <!-- element page functions -->
  <script language="JavaScript" src="chrome://editor/content/EdAEHTMLAttributes.js"/>
  <script language="JavaScript" src="chrome://editor/content/EdAECSSAttributes.js"/>
  <script language="JavaScript" src="chrome://editor/content/EdAEJSEAttributes.js"/>

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

  <popupset>
    <popup id="attlistPopup">
      <menuitem value="&context.RemoveAttribute.label;" oncommand="doRemoveAttribute(document.popupNode);"/>
      <menuitem value="&context.AddAttribute.label;" oncommand="doAddAttribute(document.popupNode);"/>
    </popup>
  </popupset>
  
  <broadcaster id="args" value=""/>

  <box autostretch="never">
    <text class="label" value="&currentattributesfor.label;"/>
    <text class="label header" id="tagLabel"/>
  </box>
  
  <separator class="thin"/>
  
  <tabcontrol orient="vertical" flex="1">
    <tabbox>
      <tab selected="true" value="&tabHTML.label;"/>
      <tab value="&tabCSS.label;"/>
      <tab value="&tabJSE.label;"/>
      <spring flex="1"/>
    </tabbox>
    <tabpanel flex="1">
      <!-- ============================================================== -->
      <!--                        HTML Attributes                         -->
      <!-- ============================================================== -->
        <box flex="1" orient="vertical">
          <tree id="HTMLATree" 
            class="AttributesTree inset" 
            flex="1" 
            context="attlistPopup">
            <treecols>
              <treecol flex="35" width="0"/>
              <treecol flex="65" width="0"/>
            </treecols>
            <treehead>
              <treerow>
                <treecell class="treecell-outset-header" value="&tree.attributeHeader.label;"/>
                <treecell class="treecell-outset-header" value="&tree.valueHeader.label;"/>
              </treerow>
            </treehead>
            <treechildren id="HTMLAList" flex="1"/>
          </tree>
          <box orient="vertical">
            <spring class="spacer"/>
            <titledbox orient="vertical">
              <title><text value="&AddHTMLAttributeLabel.label;"/></title>
              <box autostretch="never">
                <text class="label" for="AddHTMLAttributeNameInput" value="&AttName.label;"/>
                <textfield flex="1" id="AddHTMLAttributeNameInput" onkeyup="doHTMLEnabling(event.which)" onmouseup="doHTMLEnabling(event.which)"/>
                <text class="label" for="AddHTMLAttributeValueInput" value="&AttValue.label;"/>
          	    <textfield flex="1" id="AddHTMLAttributeValueInput" onkeyup="doHTMLEnabling(event.which)"/>
                <button class="dialog" id="AddHTMLAttribute" oncommand="onAddHTMLAttribute(this)" value="&AddAttributeButton.label;" disabled="true"/>
              </box>
            </titledbox>
          </box>
        </box>
      <!-- ============================================================== -->
      <!--                         CSS Attributes                         -->
      <!-- ============================================================== -->
        <box flex="1" orient="vertical">
          <tree id="CSSATree" class="AttributesTree inset" flex="1" context="attlistPopup">
            <treecolgroup>
              <treecol flex="35" width="0"/>
              <treecol flex="65" width="0"/>
            </treecolgroup>
            <treehead>
              <treerow>
                <treecell class="treecell-outset-header" value="&tree.attributeHeader.label;"/>
                <treecell class="treecell-outset-header" value="&tree.valueHeader.label;"/>
              </treerow>
            </treehead>
            <treechildren id="CSSAList" flex="1"/>
          </tree>
          <box orient="vertical">
            <spring class="spacer"/>
            <titledbox orient="vertical">
              <title><text value="&AddCSSAttributeLabel.label;"/></title>
              <box autostretch="never">
                <text class="label" for="AddCSSAttributeNameInput" value="&AttName.label;"/>
                <textfield flex="1" id="AddCSSAttributeNameInput" onkeyup="doCSSEnabling(event.which)" onmouseup="doHTMLEnabling(event.which)"/>
                <text class="label" for="AddCSSAttributeValueInput" value="&AttValue.label;"/>
          	    <textfield flex="1" id="AddCSSAttributeValueInput" onkeyup="doCSSEnabling(event.which)"/>
                <button class="dialog" id="AddCSSAttribute" oncommand="onAddCSSAttribute(this)" value="&AddAttributeButton.label;" disabled="true"/>
              </box>
            </titledbox>
          </box>
        </box>
      <!-- ============================================================== -->
      <!--                    JavaScript Event Handlers                   -->
      <!-- ============================================================== -->
        <box flex="1" orient="vertical">
          <tree id="JSEATree" class="AttributesTree inset" flex="1" context="attlistPopup">
            <treecolgroup>
              <treecol flex="35" width="0"/>
              <treecol flex="65" wdith="0"/>
            </treecolgroup>
            <treehead>
              <treerow>
                <treecell class="treecell-outset-header" value="&tree.attributeHeader.label;"/>
                <treecell class="treecell-outset-header" value="&tree.valueHeader.label;"/>
              </treerow>
            </treehead>
            <treechildren id="JSEAList" flex="1"/>
          </tree>
          <box orient="vertical">
            <spring class="spacer"/>
            <titledbox orient="vertical">
              <title><text value="&AddJSEAttributeLabel.label;"/></title>
              <box autostretch="never">
                <text class="label" for="AddJSEAttributeNameInput" value="&AttName.label;"/>
                <textfield type="text" flex="1" id="AddJSEAttributeNameInput" onkeyup="doJSEEnabling(event.which)" onmouseup="doHTMLEnabling(event.which)"/>
                <text class="label" for="AddJSEAttributeValueInput" value="&AttValue.label;"/>
          	    <textfield flex="1" id="AddJSEAttributeValueInput" onkeyup="doJSEEnabling(event.which)"/>
                <button class="dialog" id="AddJSEAttribute" oncommand="onAddJSEAttribute(this)" value="&AddAttributeButton.label;" disabled="true"/>
              </box>
            </titledbox>
          </box>
        </box>
      <!-- ============================================================== -->
    </tabpanel>
  </tabcontrol>

  <box id="okCancelButtonsRight"/> 

</window>
