<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://bluegriffon/skin/insertImage.css" type="text/css"?>
<?xml-stylesheet href="chrome://bluegriffon/skin/bluegriffonDialogs.css" type="text/css"?>


<!DOCTYPE dialog SYSTEM "chrome://bluegriffon/locale/insertImage.dtd">

<dialog title="&window.title;"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    xmlns:html="http://www.w3.org/1999/xhtml"
    onload = "Startup()"
    buttons="accept,cancel"
    ondialogaccept="return onAccept();"
    persist="screenX screenY">

  <!-- Methods common to all editor dialogs -->
  <script type="application/x-javascript" src="chrome://bluegriffon/content/utils/dgid.js"/>
  <script type="application/x-javascript" src="chrome://bluegriffon/content/utils/global.js"/>
  <script type="application/x-javascript" src="chrome://bluegriffon/content/dialogs/insertImage.js"/>
  <script type="application/javascript" src="chrome://bluegriffon/content/js/beautify-html.js"/>

  <vbox>
    <groupbox>
      <caption label="&selectImageButton.label;"/>
      <label value="&imageLocation.label;"/>
      <hbox align="center">
        <textbox flex="1" id="imageURLTextbox"
                 oninput="LoadImage()"/>
        <filepickerbutton id="filepickerbutton"
                          control="imageURLTextbox"
                          mode="0"
                          filters="filterImages"
                          oncommand="LoadImage();MakeRelativeUrl();SetFocusToAlt()"
                          title="&selectImageButton.label;"/>
      </hbox>
      <hbox align="center">
        <checkbox id="relativeURLCheckbox"
                  disabled="true"
                  oncommand="ToggleRelativeOrAbsolute()"
                  label="&relativeURL.label;"/>
        <label value="&documentMustBeSaved.label;"
               disabled="true"
               id="relativeURLCheckboxWarning"/>
      </hbox>
    </groupbox>
    <grid>
      <columns><column/><column flex="1"/></columns>
      <rows>
        <row align="center">
          <label value="&title.label;"/>
          <textbox id="titleTextbox"/>
        </row>
        <row align="center">
          <label value="&alternateText.label;"/>
          <textbox id="alternateTextTextbox" oninput="UpdateButtons()"/>
        </row>
        <row align="center">
          <spacer/>
          <checkbox label="&emptyAltOk.checkbox;"
                    id="emptyAltOkCheckbox"
                    oncommand="UpdateButtons()"/>
        </row>
        <row align="center">
          <label value="&longdesc.label;"/>
          <textbox flex="1" id="longDescTextbox"/>
          <filepickerbutton id="filepickerLongDescbutton"
                            control="longDescTextbox"
                            mode="0"
                            filters="filterAll"
                            oncommand="MakeRelativeLongDescUrl();"
                            title="&selectLongDescButton.label;"/>
        </row>
      </rows>
    </grid>
  </vbox>

  <groupbox>
    <caption label="&preview.label;"/>
    <box id="previewImage" flex="1"/>
  </groupbox>

</dialog>
