<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" i18n:domain="tinymce">
<head>
  <title i18n:translate="ploneimage_dlg_dialog_title"></title>
  <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
  <script type="text/javascript" src="../../utils/mctabs.js"></script>
  <script type="text/javascript" src="../../utils/form_utils.js"></script>
  <script type="text/javascript" src="js/ploneimage.js"></script>
  <link rel="stylesheet" type="text/css" href="css/ploneimage.css" />

</head>
<body id="ploneimage" style="display: none"
  tal:define="portal_url context/portal_url; portal_tinymce context/portal_tinymce;">
  <div class="dialog-wrapper" id="content">
    <fieldset id="general_panel">
      <legend i18n:translate="ploneimage_dlg_dialog_title"></legend>
      <div id="internalpath" class="formHelp"></div>
      <form>

        <fieldset class="column columnlibraries">
          <legend i18n:domain="plone.tinymce" i18n:translate="">Libraries</legend>
                <ul class="configlets">
                    <li id="home">
              <a href="javascript:ImageDialog.displayPanel('internal_panel'); ImageDialog.getFolderListing(tinyMCEPopup.editor.settings.navigation_root_url, 'tinymce-jsonimagefolderlisting');">
                  <img alt="" tal:attributes="src string:$portal_url/logoIcon.gif"/> <span i18n:domain="plone.tinymce" i18n:translate="">Home</span>
              </a>
            </li>
                    <li>
              <a href="javascript:ImageDialog.displayPanel('internal_panel'); ImageDialog.getCurrentFolderListing();">
                  <img alt="" tal:attributes="src string:$portal_url/site_icon.gif"/> <span i18n:domain="plone.tinymce" i18n:translate="">Current Folder</span>
              </a>
            </li>
                    <!--li>
              <a href="javascript:ImageDialog.displayPanel('internal_panel');">
                  <img alt="" tal:attributes="src string:$portal_url/popup_calendar.gif"/> Recent Items
              </a>
            </li-->
                </ul>
                <div class="field">
                  <label for="searchtext" i18n:domain="plone.tinymce" i18n:translate="">Search</label>
                  <div class="widget">
                    <input type="text" name="searchtext" id="searchtext" value="" onkeyup="ImageDialog.checkSearch(event);" size="12"/>
                    <input type="button" value="Search" i18n:domain="plone.tinymce" i18n:attributes="value" class="searchButton" onclick="ImageDialog.getFolderListing(tinyMCEPopup.editor.settings.navigation_root_url, 'tinymce-jsonimagesearch');"/>
                  </div>
                </div>
        </fieldset>

        <fieldset id="internal_panel" class="subPanel column">
          <legend i18n:translate="ploneimage_dlg_image_list"></legend>
          <div class="field">
            <div class="uponelevel"><a id="uponelevel" class="link-parent" href="javascript:void(0)" i18n:domain="plone.tinymce" i18n:translate="">Up one level</a></div>
            <div id="internallinkcontainer" class="widget radioscrolllist input-border">
            </div>
            <input type="button" id="upload" class="context" name="upload" value="Upload file" i18n:domain="plone.tinymce" i18n:attributes="value" onclick="ImageDialog.displayPanel('upload_panel');" />
          </div>
        </fieldset>

        <fieldset id="internal_details_panel" class="subPanel column">
          <legend i18n:domain="plone.tinymce" i18n:translate="">Details</legend>
          <div class="field">
            <label i18n:translate="ploneimage_dlg_preview"></label>
            <div class="widget">
              <div id="previewimagecontainer">
              </div>
            </div>
          </div>

          <div class="field">
            <label id="descriptionlabel" for="description" i18n:translate="ploneimage_dlg_alt"></label>
            <div class="widget">
              <input id="description_href" name="description_href" type="hidden" value="" />
              <input id="description" name="description" type="text" value="" size="20" />
            </div>
          </div>

          <div class="field">
            <label id="alignlabel" for="align" i18n:translate="ploneimage_dlg_align"></label>
            <div class="widget">
              <select id="classes" name="classes">
                <option value="image-inline" i18n:domain="plone.tinymce" i18n:translate="">Inline</option>
                <option value="image-left" i18n:translate="ploneimage_dlg_align_left"></option>
                <option value="image-right" i18n:translate="ploneimage_dlg_align_right"></option>
              </select>
            </div>
          </div>

          <div class="field">
            <div class="widget">
              <input type="checkbox" name="caption" id="caption"/> <label for="caption" i18n:domain="plone.tinymce" i18n:translate="">Caption</label>
            </div>
          </div>

          <div class="field">
            <label id="dimensionslabel" for="dimensions" i18n:translate="ploneimage_dlg_dimensions"></label>
            <div class="widget">
              <select id="dimensions" name="dimensions">
                <option tal:repeat="item portal_tinymce/getImageScales" tal:attributes="value item/value"
                  tal:content="item/title" />
              </select>
            </div>
          </div>
        </fieldset>
      </form>

      <fieldset id="upload_panel" class="subPanel column">
        <legend i18n:domain="plone.tinymce" i18n:translate="">Upload file</legend>
        <form name="upload_form" id="upload_form" method="post" target="upload_iframe" enctype="multipart/form-data">
          <div class="field">
            <label for="uploadfile" i18n:domain="plone.tinymce" i18n:translate="">File</label>
            <div class="widget">
              <input type="file" name="uploadfile" id="uploadfile" size="15" />
            </div>
          </div>

          <div class="field">
            <label for="uploadtitle" i18n:translate="ploneimage_dlg_title"></label>
            <div class="widget">
              <input type="text" name="uploadtitle" id="uploadtitle" value="" size="25" />
            </div>
          </div>

          <div class="field">
            <label for="uploaddescription" i18n:domain="plone.tinymce" i18n:translate="">Description</label>
            <div class="widget">
              <textarea wrap="soft" cols="10" rows="6" id="uploaddescription" name="uploaddescription"></textarea>
            </div>
          </div>

          <input type="button" id="uploadbutton" class="context" name="uploadbutton" value="Upload" i18n:domain="plone.tinymce" i18n:attributes="value" onclick="document.forms[1].submit();"/>
        </form>
        <iframe width="0" scrolling="off" height="0" frameborder="0" id="upload_iframe" name="upload_iframe" src="javascript:"></iframe>
      </fieldset>
    </fieldset>

    <div class="visualClear"><!-- --></div>

      <form onsubmit="ImageDialog.insert();return false;" action="#">
      <div class="mceActionPanel formControls">
        <span class="actionButtons">
          <input type="submit" id="insert" class="context" name="insert" i18n:attributes="value common_insert" value="Insert"/>
          <input type="button" id="cancel" class="standalone" name="cancel" i18n:attributes="value common_cancel" onclick="tinyMCEPopup.close();" value="Cancel"/>
        </span>
      </div>
    </form>
  </div>
</body>
</html>
