170 lines
4.6 KiB
HTML
170 lines
4.6 KiB
HTML
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:f="http://xmlns.jcp.org/jsf/core"
|
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
|
|
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
|
|
xmlns:marty="http://xmlns.jcp.org/jsf/composite/marty"
|
|
xmlns:i="http://xmlns.jcp.org/jsf/composite/imixs"
|
|
template="/layout/template.xhtml">
|
|
|
|
|
|
|
|
<f:metadata>
|
|
<f:viewAction action="#{documentController.onLoad()}" />
|
|
</f:metadata>
|
|
|
|
<ui:define name="content">
|
|
|
|
<f:view>
|
|
<h:form id="textblock_form_id" pt:autocomplete="on" enctype="multipart/form-data">
|
|
|
|
<div class="imixs-form">
|
|
<div class="imixs-header">
|
|
<h1>
|
|
<h:outputText value="#{message['textblock.title']}: " />
|
|
<h:outputText
|
|
value="#{documentController.document.item['txtname']} " />
|
|
</h1>
|
|
</div>
|
|
|
|
<div class="imixs-body">
|
|
|
|
<div class="imixs-form-panel">
|
|
<div class="imixs-form-section-2">
|
|
|
|
<dl>
|
|
<dt>
|
|
ID:<span class="imixs-required"> * <h:message
|
|
for="_subject" /></span>
|
|
</dt>
|
|
|
|
<dd>
|
|
<h:inputText required="true" id="txtname_id"
|
|
value="#{documentController.document.item['txtName']}" />
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<dl>
|
|
<dt>Type:</dt>
|
|
<dd>
|
|
<h:selectOneRadio class="dsp_mode" onclick="layoutEditor();"
|
|
value="#{documentController.document.item['txtmode']}">
|
|
|
|
<f:selectItem itemLabel="HTML" itemValue="HTML"></f:selectItem>
|
|
<f:selectItem itemLabel="TEXT" itemValue="TEXT"></f:selectItem>
|
|
<f:selectItem
|
|
itemLabel="#{message['form.attachments.files']}"
|
|
itemValue="FILE"></f:selectItem>
|
|
<f:ajax render="html_input text_input" onevent="layoutEditor" />
|
|
|
|
</h:selectOneRadio>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
<h:panelGroup layout="block" styleClass="imixs-form-section"
|
|
id="contentIputID">
|
|
<dl>
|
|
<dt>#{message['form.minutes.description']}:</dt>
|
|
<dd>
|
|
|
|
<h:panelGroup styleClass="textblock-html-input" id="text_input">
|
|
<h:inputTextarea class="imixs-editor-basic" rendered="#{documentController.document.item['txtmode'] eq 'HTML'}"
|
|
value="#{documentController.document.item['txtcontent']}" />
|
|
</h:panelGroup>
|
|
|
|
<h:panelGroup styleClass="textblock-text-input" id="html_input">
|
|
<h:inputTextarea rendered="#{documentController.document.item['txtmode'] ne 'HTML'}"
|
|
value="#{documentController.document.item['txtcontent']}" />
|
|
</h:panelGroup>
|
|
|
|
<div class="textblock-file-input" style="width: 50%;">
|
|
<i:imixsFileUpload showattachments="true"
|
|
workitem="#{documentController.document}"
|
|
context_url="#{facesContext.externalContext.requestContextPath}/api/snapshot/#{documentController.document.item['$uniqueid']}" />
|
|
|
|
|
|
</div>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
</h:panelGroup>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="imixs-footer">
|
|
<h:commandButton
|
|
action="/pages/admin/textblocklist?faces-redirect=true"
|
|
actionListener="#{documentController.save()}"
|
|
value="#{message.save}" />
|
|
|
|
<h:commandButton value="#{message.close}" immediate="true"
|
|
action="/pages/admin/textblocklist?faces-redirect=true"
|
|
actionListener="#{documentController.close()}" />
|
|
</div>
|
|
|
|
</div>
|
|
</h:form>
|
|
|
|
|
|
|
|
|
|
<!-- Init script -->
|
|
<script type="text/javascript">
|
|
/*<![CDATA[*/
|
|
|
|
$(document).ready(function() {
|
|
layoutEditor();
|
|
});
|
|
// method to refresh create buttons
|
|
function xxxxlayoutEditor(e) {
|
|
|
|
}
|
|
// method to refresh editor
|
|
function layoutEditor(e) {
|
|
if (e && e.status == 'success') {
|
|
// Test
|
|
if (tinyMCE) {
|
|
tinymce.remove("textarea.imixs-editor-basic");
|
|
}
|
|
imixsOfficeMain.layoutOfficeEditor();
|
|
}
|
|
|
|
|
|
var selValue = $("input[type='radio']:checked", ".dsp_mode")
|
|
.val();
|
|
if (selValue === "HTML") {
|
|
$(".textblock-text-input").hide();
|
|
$(".textblock-file-input").hide();
|
|
$(".textblock-html-input").show();
|
|
}
|
|
if (selValue === "TEXT") {
|
|
$(".textblock-text-input").show();
|
|
$(".textblock-file-input").hide();
|
|
$(".textblock-html-input").hide();
|
|
}
|
|
if (selValue === "FILE") {
|
|
$(".textblock-text-input").hide();
|
|
$(".textblock-file-input").show();
|
|
$(".textblock-html-input").hide();
|
|
}
|
|
}
|
|
|
|
/*]]>*/
|
|
</script>
|
|
|
|
</f:view>
|
|
</ui:define>
|
|
|
|
|
|
|
|
</ui:composition>
|
|
|