<?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/" 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/TR/REC-html40"
    onload = "Startup()"
    align="vertical">

  <!-- Methods common to all editor dialogs -->
  <html:script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js"/>
  <!-- global dialog functions -->
  <html:script language="JavaScript" src="chrome://editor/content/EdAdvancedEdit.js"/>
  <!-- element page functions -->
  <html:script language="JavaScript" src="chrome://editor/content/EdAEHTMLAttributes.js"/>
  <html:script language="JavaScript" src="chrome://editor/content/EdAECSSAttributes.js"/>
  <html:script language="JavaScript" src="chrome://editor/content/EdAEJSEAttributes.js"/>

  <html:script language="JavaScript" src="chrome://global/content/dialogOverlay.js" />
	<html: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 align="horizontal">
    <html:label>&currentattributesfor.label;</html:label>
    <html:div flex="100%" id="tagLabel"/>
  </box>
  <spring class="spacer"/>
  <tabcontrol align="vertical" flex="100%">
    <tabbox>
      <tab selected="true" value="&tabHTML.label;"/>
      <tab value="&tabCSS.label;"/>
      <tab value="&tabJSE.label;"/>
      <spring flex="1"/>
    </tabbox>
    <tabpanel align="horizontal" flex="100%">
      <!-- ============================================================== -->
      <!--                        HTML Attributes                         -->
      <!-- ============================================================== -->
        <box class="tabpanel" flex="100%" align="vertical">
          <tree id="HTMLATree" 
            class="AttributesTree inset" 
            flex="100%" 
            context="attlistPopup">
            <treecol width="35%"/>
            <treecol width="65%" style="min-width: 30%"/>
            <treehead>
              <treerow>
                <treecell value="&tree.attributeHeader.label;"/>
                <treecell value="&tree.valueHeader.label;"/>
              </treerow>
            </treehead>
            <treechildren id="HTMLAList"/>
          </tree>
          <box align="vertical">
            <spring class="spacer"/>
            <titledbox orient="vertical">
              <title><text value="&AddHTMLAttributeLabel.label;"/></title>
              <box align="horizontal">
                <html:label for="AddHTMLAttributeNameInput"> &AttName.label;</html:label>
                <html:input type="text" flex="100%" id="AddHTMLAttributeNameInput" onkeyup="doHTMLEnabling(event.which)" onmouseup="doHTMLEnabling(event.which)"/>
                <spring class="spacer"/>
                <html:label for="AddHTMLAttributeValueInput"> &AttValue.label;</html:label>
          	    <html:input type="text" flex="100%" id="AddHTMLAttributeValueInput" onkeyup="doHTMLEnabling(event.which)"/>
                <titledbutton class="push" id="AddHTMLAttribute" onclick="onAddHTMLAttribute(this)" value="&AddAttributeButton.label;" disabled="true"/>
              </box>
            </titledbox>
          </box>
        </box>
      <!-- ============================================================== -->
      <!--                         CSS Attributes                         -->
      <!-- ============================================================== -->
        <box class="tabpanel" flex="100%" align="vertical">
          <tree id="CSSATree" class="AttributesTree inset" flex="100%" context="attlistPopup">
            <treecol width="35%"/>
            <treecol width="65%" style="min-width: 30%"/>
            <treehead>
              <treerow>
                <treecell value="&tree.attributeHeader.label;"/>
                <treecell value="&tree.valueHeader.label;"/>
              </treerow>
            </treehead>
            <treechildren id="CSSAList"/>
          </tree>
          <box align="vertical">
            <spring class="spacer"/>
            <titledbox orient="vertical">
              <title><text value="&AddCSSAttributeLabel.label;"/></title>
              <box align="horizontal">
                <html:label for="AddCSSAttributeNameInput"> &AttName.label;</html:label>
                <html:input type="text" flex="100%" id="AddCSSAttributeNameInput" onkeyup="doCSSEnabling(event.which)" onmouseup="doHTMLEnabling(event.which)"/>
                <spring class="spacer"/>
                <html:label for="AddCSSAttributeValueInput"> &AttValue.label;</html:label>
          	    <html:input type="text" flex="100%" id="AddCSSAttributeValueInput" onkeyup="doCSSEnabling(event.which)"/>
                <titledbutton class="push" id="AddCSSAttribute" onclick="onAddCSSAttribute(this)" value="&AddAttributeButton.label;" disabled="true"/>
              </box>
            </titledbox>
          </box>
        </box>
      <!-- ============================================================== -->
      <!--                    JavaScript Event Handlers                   -->
      <!-- ============================================================== -->
        <box class="tabpanel" flex="100%" align="vertical">
          <tree id="JSEATree" class="AttributesTree inset" flex="100%" context="attlistPopup">
            <treecol width="35%"/>
            <treecol width="65%" style="min-width: 30%"/>
            <treehead>
              <treerow>
                <treecell value="&tree.attributeHeader.label;"/>
                <treecell value="&tree.valueHeader.label;"/>
              </treerow>
            </treehead>
            <treechildren id="JSEAList"/>
          </tree>
          <box align="vertical">
            <spring class="spacer"/>
            <titledbox orient="vertical">
              <title><text value="&AddJSEAttributeLabel.label;"/></title>
              <box align="horizontal">
                <html:label for="AddJSEAttributeNameInput"> &AttName.label;</html:label>
                <html:input type="text" flex="100%" id="AddJSEAttributeNameInput" onkeyup="doJSEEnabling(event.which)" onmouseup="doHTMLEnabling(event.which)"/>
                <spring class="spacer"/>
                <html:label for="AddJSEAttributeValueInput"> &AttValue.label;</html:label>
          	    <html:input type="text" flex="100%" id="AddJSEAttributeValueInput" onkeyup="doJSEEnabling(event.which)"/>
                <titledbutton class="push" id="AddJSEAttribute" onclick="onAddJSEAttribute(this)" value="&AddAttributeButton.label;" disabled="true"/>
              </box>
            </titledbox>
          </box>
        </box>
      <!-- ============================================================== -->
    </tabpanel>
  </tabcontrol>

  <box align="horizontal">
    <html:div style="margin-top: 0.5em"><titledbutton class="push" value="&HTMLReference.label;"/></html:div>
    <spring flex="100%"/>
    <!-- from global dialogOverlay -->
    <html:div style="margin-top: 0.5em">
      <box id="okCancelButtons"/> 
    </html:div>
  </box>
</window>
