<?xml version="1.0"?>

<!DOCTYPE page [
  <!ENTITY % dtd1 SYSTEM "chrome://inspector/locale/inspector.dtd"> %dtd1;
  <!ENTITY % dtd2 SYSTEM "chrome://inspector/locale/viewers/domNode.dtd"> %dtd2;
  <!ENTITY % dtd3 SYSTEM "chrome://inspector/content/util.dtd"> %dtd3;
]>

<?xul-overlay href="chrome://inspector/content/editingOverlay.xul"?>

<?xml-stylesheet href="chrome://inspector/skin/viewers/domNode/domNode.css"?>

<page id="winNodeDefault"
      style="padding: 10px"
      xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  
  <!--============================= SCRIPTS ============================= -->

  <script type="application/x-javascript" src="chrome://inspector/content/utils.js"/>
  <script type="application/x-javascript" src="chrome://inspector/content/viewers/domNode/domNode.js"/>
  <script type="application/x-javascript" src="chrome://inspector/content/jsutil/xpcom/XPCU.js"/>
  <script type="application/x-javascript" src="chrome://inspector/content/jsutil/events/ObserverManager.js"/>

  <!--============================= CONTENT ============================== -->

  <commandset id="cmdsEditing"/>  
  
  <popupset id="psPopups">
    <popup id="ppAttrContext">
      <menuitem id="mnEditCut"/>
      <menuitem id="mnEditCopy"/>
      <menuitem id="mnEditPaste"/>
      <menuseparator/>
      <menuitem id="mnEditEdit"/>
      <menuitem id="mnEditInsert"/>
      <menuitem id="mnEditDelete"/>
    </popup>
  </popupset>
 
  <deck id="dkContent" flex="1">
    <vbox id="bxElement">
      <grid id="olNodeInfo">
        <columns>
          <column/>
          <column flex="1"/>
        </columns>
        <rows>
          <row>
            <label value="&localName.label;"
                   control="tx_localName"
                   class="olNodeInfoLabel"/>
            <textbox id="tx_localName" readonly="true" class="plain"/>
          </row>
          <row>
            <label value="&namespaceURI.label;"
                   control="tx_namespace"
                   class="olNodeInfoLabel"/>
            <textbox id="tx_namespace" readonly="true" class="plain"/>
          </row>
          <row>
            <label value="&nodeType.label;"
                   control="tx_nodeType"
                   class="olNodeInfoLabel"/>
            <textbox id="tx_nodeType" readonly="true" class="plain"/>
          </row>
        </rows>
      </grid>
    
      <tree id="olAttr"
            class="plain"
            flex="1"
            enableColumnDrag="true"
            contextmenu="ppAttrContext"
            onselect="viewer.pane.panelset.updateAllCommands()">
        <treecols>
          <!-- These labels don't need to be localized since they are defined
                 by DOM APIs -->
          <treecol id="colNodeName"
                   label="nodeName"
                   persist="width,hidden,ordinal"
                   flex="1"/>
          <splitter class="tree-splitter"/>
          <treecol id="colLocalName"
                   hidden="true"
                   label="localName"
                   persist="width,hidden,ordinal"
                   flex="1"/>
          <splitter class="tree-splitter"/>
          <treecol id="colPrefix"
                   hidden="true"
                   label="prefix"
                   persist="width,hidden,ordinal"
                   flex="1"/>
          <splitter class="tree-splitter"/>
          <treecol id="colNamespaceURI"
                   hidden="true"
                   label="namespaceURI"
                   persist="width,hidden,ordinal"
                   flex="1"/>
          <splitter class="tree-splitter"/>
          <treecol id="colNodeValue"
                   label="nodeValue"
                   persist="width,hidden,ordinal"
                   flex="1"/>
        </treecols>
        <treechildren id="olAttrBody"
                      alternatingbackground="true"
        />
      </tree>

    </vbox>

    <vbox id="bxText">
      <textbox id="txbTextNodeValue" multiline="true" flex="1"
               onchange="viewer.pane.panelset.execCommand('cmdEditNodeValue');"/>
    </vbox>
  </deck>
</page>
