<%@ page import ="org.opencms.jsp.CmsJspActionElement, org.opencms.file.CmsObject, java.util.*, org.opencms.workplace.*, org.opencms.workplace.commons.*, org.opencms.workplace.editors.CmsDialogElements, org.opencms.workplace.tools.database.*, org.opencms.workplace.*, org.opencms.workplace.administration.*" %> <% // initialise Cms Action Element CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); // Collect the objects required to access the OpenCms VFS from the request CmsObject cmsObject = cms.getCmsObject(); String uri = cmsObject.getRequestContext().getUri(); String errorMessage = ""; // initialize the workplace class CmsHtmlImportReport wp = new CmsHtmlImportReport(pageContext, request, response); // initialize the import class CmsHtmlImport imp = new CmsHtmlImport( cms, request); //////////////////// start of switch statement switch (wp.getAction()) { case CmsHtmlImportReport.ACTION_CANCEL: //////////////////// ACTION: cancel button pressed wp.actionCloseDialog(); break; case CmsDialog.ACTION_CONFIRMED: case CmsDialog.ACTION_REPORT_BEGIN: case CmsDialog.ACTION_REPORT_UPDATE: case CmsDialog.ACTION_REPORT_END: //////////////////// ACTION: clear history boolean isValid = true; if (wp.getAction() == CmsDialog.ACTION_CONFIRMED) { try { imp.checkParameters(); } catch (Exception e) { isValid = false; errorMessage = e.getMessage(); } } if (isValid) { wp.setHtmlImport(imp); wp.actionReport(); break; } //////////////////// ACTION: show start dialog case CmsDialog.ACTION_DEFAULT: default: wp.setParamAction(CmsDialog.DIALOG_CONFIRMED); %> <%= wp.htmlStart("administration/index.html") %> <%= wp.bodyStart("onunload='top.closeTreeWin();'") %> <%= wp.dialogStart() %> <%= wp.dialogContentStart(wp.getParamTitle()) %>
<%= wp.paramsAsHidden() %> <% if(errorMessage.length()>0) { %> <%= wp.dialogBlockStart(null) %>
<%= errorMessage %>
<%= wp.dialogBlockEnd() %> <% } %>
<%= wp.key("htmlimport.input.source") %>:
<%= wp.key("htmlimport.input.destination") %>: <%=wp.button("javascript:top.openTreeWin('html_import1', false, 'main', 'destinationDir', document);", null, "folder", "button.search", 0)%>
<%= wp.key("htmlimport.input.imagegallery") %>: <%=wp.button("javascript:top.openTreeWin('copy', false, 'main', 'imageGallery', document);", null, "folder", "button.search", 0)%>
<%= wp.key("htmlimport.input.linkgallery") %>: <%=wp.button("javascript:top.openTreeWin('copy', false, 'main', 'linkGallery', document);", null, "folder", "button.search", 0)%>
<%= wp.key("htmlimport.input.downloadgallery") %>: <%=wp.button("javascript:top.openTreeWin('copy', false, 'main', 'downloadGallery', document);", null, "folder", "button.search", 0)%>
<%= wp.key("htmlimport.input.template") %>: <%= CmsHtmlImportBackoffice.getTemplates(cmsObject,imp.getTemplate()) %>
<%= wp.key("htmlimport.input.element") %>:
<%= wp.key("htmlimport.input.locale") %>: <%= CmsHtmlImportBackoffice.getLocales(imp.getLocale()) %>
<%= wp.key("htmlimport.input.encoding") %>:
<%= wp.key("htmlimport.input.startregexp") %>:
<%= wp.key("htmlimport.input.endregexp") %>:
<%= wp.key("htmlimport.input.overwrite") %>: value="checked" >
<%= wp.dialogContentEnd() %> <%= wp.dialogButtonsOkCancel() %>
<%= wp.dialogEnd() %> <%= wp.bodyEnd() %> <%= wp.htmlEnd() %> <% } //////////////////// end of switch statement %>