Commit a3be904c authored by michael.simon's avatar michael.simon
Browse files

use more code mirror editors for xml

parent 9d129639
......@@ -41,15 +41,15 @@
<bw:inputText id="scriptTypeField" label="#{messages.script_type}"
value="#{editScriptBean.entity.scriptType}" required="true" />
<h:outputText value="#{messages.script}:"/>
<p:outputPanel style="width: 600px;">
<pe:codeMirror id="codeMirror" mode="javascript" theme="eclipse"
value="#{editScriptBean.entity.script}" keyMap="default" lineNumbers="true"
matchBrackets="true"
extraKeys="{ 'Ctrl-Space': function(cm) {CodeMirror.showHint(cm, CodeMirror.hint.javascriptHint);}}" />
</p:outputPanel>
</p:panelGrid>
<p:outputPanel style="width: 740px; height: 400px; margin: 1em 0 1em 0;">
<pe:codeMirror id="codeMirror" mode="javascript" theme="eclipse"
value="#{editScriptBean.entity.script}" keyMap="default" lineNumbers="true"
matchBrackets="true"
extraKeys="{ 'Ctrl-Space': function(cm) {CodeMirror.showHint(cm, CodeMirror.hint.javascriptHint);}}" />
</p:outputPanel>
<p:commandButton id="save" action="#{editScriptBean.save}" value="#{messages.save}"/>
<p:commandButton id="cancel" action="#{editScriptBean.cancel}" value="#{messages.cancel}" immediate="true"/>
</p:panel>
......
......@@ -40,14 +40,14 @@
<h:outputText value="#{messages.script_type}:"/>
<h:outputText value="#{showScriptBean.entity.scriptType}"/>
<h:outputText value="#{messages.script}:"/>
<p:outputPanel style="width: 640px;">
<pe:codeMirror id="codeMirror" mode="javascript" theme="eclipse"
value="#{showScriptBean.entity.script}" keyMap="default" lineNumbers="true"
matchBrackets="true" readonly="true" lineWrapping="true" />
</p:outputPanel>
</p:panelGrid>
<p:outputPanel style="width: 740px; height: 400px; margin: 1em 0 1em 0;">
<pe:codeMirror id="codeMirror" mode="javascript" theme="eclipse"
value="#{showScriptBean.entity.script}" keyMap="default" lineNumbers="true"
matchBrackets="true" readonly="true" lineWrapping="true" />
</p:outputPanel>
<h:link outcome="edit-script.xhtml" value="#{messages.edit}">
<f:param name="scriptId" value="#{showScriptBean.entity.id}"/>
......
......@@ -5,7 +5,8 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:bw="http://www.scc.kit.edu/bwfacelets"
xmlns:p="http://primefaces.org/ui">
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<head>
<title></title>
</head>
......@@ -31,12 +32,14 @@
<h:outputText value="#{messages.id}:"/>
<h:outputText value="#{editSamlSpBean.entity.id}"/>
<h:outputLabel for="private_key" value="#{messages.entity_desc}:"/>
<p:inputTextarea id="private_key" rows="12" cols="80" autoResize="false"
value="#{editSamlSpBean.entity.entityDescriptor}"/>
</p:panelGrid>
<p:outputPanel style="width: 740px; height: 640px; margin: 1em 0 1em 0;" id="ent_desc">
<pe:codeMirror id="codeMirror" mode="xml" theme="eclipse"
value="#{editSamlSpBean.entity.entityDescriptor}" keyMap="default" lineNumbers="true" />
</p:outputPanel>
<p:commandButton id="save" action="#{editSamlSpBean.save}" value="#{messages.save}" update="errorMsg"/>
</p:panel>
......
......@@ -5,7 +5,8 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:bw="http://www.scc.kit.edu/bwfacelets"
xmlns:p="http://primefaces.org/ui">
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<head>
<title></title>
</head>
......@@ -173,13 +174,11 @@
<br/>
<div id="panelInline">
<p:panel header="#{messages.entity_descriptor}" collapsed="true" toggleable="true">
<div style="font-family: courier, monospace; font-size:10px; white-space: pre;">
<h:outputText value="#{showSpBean.entity.entityDescriptor}" />
</div>
</p:panel>
</div>
<p:outputPanel style="width: 740px; height: 640px; margin: 1em 0 1em 0;" id="ent_desc">
<pe:codeMirror id="codeMirror" mode="xml" theme="eclipse"
value="#{showSpBean.entity.entityDescriptor}" keyMap="default" lineNumbers="true"
readonly="true" lineWrapping="true" />
</p:outputPanel>
</h:form>
......
......@@ -291,4 +291,5 @@ div.serviceBlockLink {
.CodeMirror {
resize: both;
height: 100% !important;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment