Merge de configuração de painel de controle e ajustes na geração do cadeno

parent c1ed1712
<%@ include file="/init.jsp" %>
<%
boolean errArquivo = false;
boolean errVazio = false;
boolean errDataNula = false;
boolean errHorarioLimite = false;
String cssErro = "control-group error";
if(request.getAttribute("erroArquivo") != null){
errArquivo = (Boolean) request.getAttribute("erroArquivo");
}
if(request.getAttribute("erroVazio") != null){
errVazio = (Boolean) request.getAttribute("erroVazio");
}
if(request.getAttribute("erroDataNula") != null){
errDataNula = (Boolean) request.getAttribute("erroDataNula");
}
if(request.getAttribute("erroHorarioLimite") != null){
errHorarioLimite = (Boolean) request.getAttribute("erroHorarioLimite");
}
%>
<liferay-theme:defineObjects />
<portlet:defineObjects />
<liferay-portlet:actionURL var="submitActionURL">
<liferay-portlet:param name="<%=ActionRequest.ACTION_NAME%>" value='geraCaderno' />
<liferay-portlet:param name="navigation" value="gerar"/>
<liferay-portlet:param name="mvcPath" value="/view.jsp"/>
</liferay-portlet:actionURL>
<portlet:renderURL var="viewUrl">
<portlet:param name="navigation" value="gerar"/>
<portlet:param name="mvcPath" value="/view.jsp"/>
<portlet:param name="jspPath" value="/view.jsp"/>
</portlet:renderURL>
<liferay-ui:error key="erroListagemNula" message="No existem matrias cadastradas para os parmetros utilizados." />
<aui:form id="<portlet:namespace />formDO" name="<portlet:namespace />formDO" method="POST" action="<%= submitActionURL%>" data-senna-off="true">
<div class="sheet sheet-lg" style="margin-top: 24px">
<liferay-ui:header title="Gerar Caderno"/>
<div style="font-size: 12px; line-height: 12px; color: #A3AFBF; margin-bottom: 15px; margin-top: -10px;"><liferay-ui:message key="*campos obrigatrios"/></div>
<div id="campo-situacao" class="campo">
<label><liferay-ui:message key="admin.form.editar.situacao"/></label>
<div class="form-group">
<div style="width: 31%;">
<aui:select name="situacao" id="situacao" label="">
<aui:option value="4">Validada</aui:option>
<aui:option value="6">Aprovada</aui:option>
<aui:option value="8">Divulgada</aui:option>
</aui:select>
</div>
</div>
<liferay-ui:error key="erroTipoMat" message="Uma Situao deve ser selecionada." />
</div>
<div class='campo <%=errDataNula || errHorarioLimite ? cssErro : "" %>' >
<label><liferay-ui:message key="admin.form.agendamento.data.divulgacao"/></label>
<div class="form-group">
<div class='input-group date' id='datepickeragendamento' style="width: 31%;">
<input class="form-control" name="<portlet:namespace/>dataP" id="<portlet:namespace/>dataP" onpaste="return false;" ondrop="return false;"/>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
<liferay-ui:error key="erroDataNula" message="Uma data deve ser selecionada." />
</div>
<aui:button-row>
<aui:button type="reset" id="limparFormDO" name="limparFormDO" value="Limpar" />
<aui:button type="submit" id="enviarFormDO" name="enviarFormDO" value="Gerar Caderno" />
<aui:button type="button" id="jobForm" name="jobForm" class="oculto" style="display: none" value="no aperte" />
</aui:button-row>
</div>
</aui:form>
<portlet:resourceURL var="ocultoJob"><portlet:param name="parameter" value="jobOculto" /></portlet:resourceURL>
<portlet:resourceURL var="testAjaxResourceUrl"></portlet:resourceURL>
<script type="text/javascript">
var urlAjax = "<%=testAjaxResourceUrl%>";
var urlOculto = "<%=ocultoJob%>";
</script>
\ No newline at end of file
......@@ -64,6 +64,8 @@ Export-Package: mprj.doerj.caderno.constants
@xalan-metainf-*.jar,\
@xalan-serializer-*.jar,\
@serializer-*.jar,\
@xhtmlrenderer-3.0.0.jar,\
@itext-2.1.7.jar,\
@jaxb-runtime-*.jar
......@@ -119,6 +121,7 @@ Import-Package: \
!org.joda.*,\
!org.plutext.jaxb.svg11.*,\
!org.tukaani.*,\
!org.bouncycastle.*,\
!org.w3c.*,\
*
......@@ -97,6 +97,8 @@ dependencies {
compileOnly group: 'org.docx4j.org.apache', name: 'xalan-interpretive', version: '8.0.0'
compileOnly group: 'org.docx4j.org.apache', name: 'xalan-metainf', version: '8.0.0'
compileOnly group: 'com.lowagie', name: 'itext', version: '2.1.7'
cssBuilder group: "com.liferay", name: "com.liferay.css.builder", version: "3.0.2"
}
......@@ -107,6 +109,6 @@ repositories {
}
liferay{
liferayHome="C:/Projetos/mprj/opt/deploy"
liferayHome="C:/liferay-mprj-fixpack6/deploy"
deployDir=file("${liferayHome}/")
}
\ No newline at end of file
......@@ -251,13 +251,13 @@ public class CadernoUtil {
return conteudoHtml;
}
public static WordprocessingMLPackage ConverterHTML(String stringFromFile,String orgao,String titulo, ActionRequest actionRequest){
public WordprocessingMLPackage ConverterHTML(String stringFromFile,String orgao,String titulo, ActionRequest actionRequest){
PortletContext context = actionRequest.getPortletSession().getPortletContext();
String baseURL = "file:///" + context.getRealPath("/template");
//String baseURL = "file:///C:/Users/diogo.souza/Documents/Caderno DO";
XRLog.setLoggingEnabled(false);
//String baseURL = "file:///" + context.getRealPath("/template");
String baseURL = "file:///" + getClass().getResourceAsStream("/META-INF/resources/template");
//XRLog.setLoggingEnabled(false);
String unescaped = stringFromFile;
// Create an empty docx package
......
......@@ -77,9 +77,9 @@ public class GeraCaderno {
JSONObject cabecalho = new JSONObject(listaConteudos.getJSONObject(0).toString());
String edicao = "EDIÇÃO TESTE";
String edicao = "EDIO TESTE";
String disponibilizacao = util.gerarDataCabecalho(dataDivulgacao);
String publicacao = "PUBLICAÇÃO TESTE";
String publicacao = "PUBLICAO TESTE";
......@@ -196,7 +196,7 @@ public class GeraCaderno {
conteudo=util.tratarString(conteudo,"conteudo");
//AINDA N�O FOI IMPLEMENTADO wordCurrentPackage = util.ConverterHTML(conteudo,orgao,titulo,actionRequest);
wordCurrentPackage = util.ConverterHTML(conteudo,orgao,titulo,actionRequest);
currentDocumentPart = wordCurrentPackage.getMainDocumentPart();
acumuladoPackage.getMainDocumentPart().getContent().addAll(currentDocumentPart.getContent());
......
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