Versão com ajustes nos paragrafos das materias

parent eb365d2f
/META-INF/
/content/
/mprj/ /mprj/
/META-INF/
...@@ -298,5 +298,6 @@ ...@@ -298,5 +298,6 @@
.datepicker { .datepicker {
width: 248px !important; width: 248px !important;
height: 335px !important; height: 290px !important;
} }
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<div class='campo <%=errDataNula || errHorarioLimite ? cssErro : "" %>' > <div class='campo <%=errDataNula || errHorarioLimite ? cssErro : "" %>' >
<label><liferay-ui:message key="admin.form.agendamento.data.divulgacao"/></label> <label><liferay-ui:message key="admin.form.agendamento.data.divulgacao"/></label>
<div class="form-group"> <div class="form-group">
<div class='input-group date' id='datepickeragendamento' style="width: 31%;"> <div class='input-group date' id='datepickeragendamento' style="width: 31%;max-height: 273px;">
<input class="form-control" name="<portlet:namespace/>dataP" id="<portlet:namespace/>dataP" onpaste="return false;" ondrop="return false;"/> <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="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span> <span class="glyphicon glyphicon-calendar"></span>
...@@ -72,12 +72,12 @@ ...@@ -72,12 +72,12 @@
</div> </div>
<liferay-ui:error key="erroDataNula" message="Uma data deve ser selecionada." /> <liferay-ui:error key="erroDataNula" message="Uma data deve ser selecionada." />
</div> </div>
<aui:button-row> <aui:button-row>
<aui:button type="reset" id="limparFormDO" name="limparFormDO" value="Limpar" /> <aui:button type="reset" id="limparFormDO" name="limparFormDO" value="Limpar" />
<aui:button type="submit" id="enviarFormDO" name="enviarFormDO" value="Gerar Caderno" /> <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 type="button" id="jobForm" name="jobForm" class="oculto" style="display: none" value="no aperte" />
</aui:button-row> </aui:button-row>
</div> </div>
</aui:form> </aui:form>
......
...@@ -137,8 +137,8 @@ public class MprjDoerjCadernoPortlet extends MVCPortlet { ...@@ -137,8 +137,8 @@ public class MprjDoerjCadernoPortlet extends MVCPortlet {
RestServices rest = new RestServices(); RestServices rest = new RestServices();
String dataDivulgacaoRest = dataDivulgacao.replace("/", ""); String dataDivulgacaoRest = dataDivulgacao.replace("/", "");
listaConteudos = rest.getRest(dataDivulgacaoRest,idStatus,actionRequest); listaConteudos = rest.getRest(dataDivulgacaoRest,idStatus,actionRequest);
SessionMessages.add(actionRequest, PortalUtil.getPortletId(actionRequest) + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_SUCCESS_MESSAGE); //SessionMessages.add(actionRequest, PortalUtil.getPortletId(actionRequest) + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_SUCCESS_MESSAGE);
SessionMessages.add(actionRequest, PortalUtil.getPortletId(actionRequest));
if(!mensagensDeErro(listaConteudos, dataDivulgacao, actionRequest)){ if(!mensagensDeErro(listaConteudos, dataDivulgacao, actionRequest)){
GeraCaderno caderno = new GeraCaderno(); GeraCaderno caderno = new GeraCaderno();
......
...@@ -4,6 +4,7 @@ import com.liferay.portal.kernel.exception.SystemException; ...@@ -4,6 +4,7 @@ import com.liferay.portal.kernel.exception.SystemException;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import java.util.Locale; import java.util.Locale;
...@@ -50,15 +51,18 @@ public class CadernoUtil { ...@@ -50,15 +51,18 @@ public class CadernoUtil {
textoHtml = tratarTagsHtml(textoHtml,"sup","manterTags"); textoHtml = tratarTagsHtml(textoHtml,"sup","manterTags");
textoHtml = tratarTagsHtml(textoHtml,"blockquote","manterTags"); textoHtml = tratarTagsHtml(textoHtml,"blockquote","manterTags");
textoHtml = textoHtml.replaceAll("data:image=&quot;&quot;", ""); textoHtml = textoHtml.replaceAll("data:image=&quot;&quot;", "");
textoHtml = textoHtml.replaceAll("\"", ""); textoHtml = textoHtml.replaceAll("\"", "");
textoHtml = textoHtml.replaceAll("&ndash;", "-"); textoHtml = textoHtml.replaceAll("&ndash;", "-");
textoHtml = textoHtml.replaceAll("<p>&nbsp;</p>", "");
textoHtml = textoHtml.replaceAll("&nbsp;", " "); textoHtml = textoHtml.replaceAll("&nbsp;", " ");
textoHtml = textoHtml.replaceAll("&quot;", "'"); textoHtml = textoHtml.replaceAll("&quot;", "'");
textoHtml = textoHtml.replaceAll("h2", "p"); textoHtml = textoHtml.replaceAll("h2", "p");
textoHtml = textoHtml.replaceAll("h5", "p"); textoHtml = textoHtml.replaceAll("h5", "p");
textoHtml = textoHtml.replaceAll("h1", "p"); textoHtml = textoHtml.replaceAll("h1", "p");
textoHtml = textoHtml.replaceAll("o:p", "p"); textoHtml = textoHtml.replaceAll("o:p", "p");
//"<p>&nbsp;</p>"
String primeirosChar=""; String primeirosChar="";
...@@ -66,11 +70,14 @@ public class CadernoUtil { ...@@ -66,11 +70,14 @@ public class CadernoUtil {
if (!primeirosChar.equals("<p>")&& !tipo.equals("conteudoPrimeiraPagina")){ if (!primeirosChar.equals("<p>")&& !tipo.equals("conteudoPrimeiraPagina")){
textoHtml = "<p align='JUSTIFY'>" + textoHtml + "</p>"; textoHtml = "<p align='JUSTIFY'>" + textoHtml + "</p>";
//textoHtml = "<p>" + textoHtml + "</p>";
} }
if(tipo.equals("conteudo")){ if(tipo.equals("conteudo")){
textoHtml = "<body><head><style type='" + "text/css'" + ">p{font-family:Spranq eco sans;font-size:12px;} </style></head>" + textoHtml + "<p></p></body>"; //textoHtml = "<body><head><style type='" + "text/css'" + ">p{font-family:Spranq eco sans;font-size:12px;} </style></head>" + textoHtml + "<p></p></body>";
textoHtml = "<body><head><style type='" + "text/css'" + ">p{font-family:Spranq eco sans;font-size:12px;} </style></head>" + textoHtml + "</body>";
} }
} }
......
package mprj.doerj.caderno.util; package mprj.doerj.caderno.util;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.servlet.SessionErrors;
import com.liferay.portal.kernel.servlet.SessionMessages;
import com.liferay.portal.kernel.theme.ThemeDisplay; import com.liferay.portal.kernel.theme.ThemeDisplay;
import com.liferay.portal.kernel.util.ContentTypes; import com.liferay.portal.kernel.util.ContentTypes;
import com.liferay.portal.kernel.util.PortalUtil; import com.liferay.portal.kernel.util.PortalUtil;
...@@ -252,6 +254,7 @@ public class GeraCaderno { ...@@ -252,6 +254,7 @@ public class GeraCaderno {
exportFile.delete(); exportFile.delete();
} }
} }
} }
...@@ -298,5 +298,6 @@ ...@@ -298,5 +298,6 @@
.datepicker { .datepicker {
width: 248px !important; width: 248px !important;
height: 335px !important; height: 290px !important;
} }
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<div class='campo <%=errDataNula || errHorarioLimite ? cssErro : "" %>' > <div class='campo <%=errDataNula || errHorarioLimite ? cssErro : "" %>' >
<label><liferay-ui:message key="admin.form.agendamento.data.divulgacao"/></label> <label><liferay-ui:message key="admin.form.agendamento.data.divulgacao"/></label>
<div class="form-group"> <div class="form-group">
<div class='input-group date' id='datepickeragendamento' style="width: 31%;"> <div class='input-group date' id='datepickeragendamento' style="width: 31%;max-height: 273px;">
<input class="form-control" name="<portlet:namespace/>dataP" id="<portlet:namespace/>dataP" onpaste="return false;" ondrop="return false;"/> <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="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span> <span class="glyphicon glyphicon-calendar"></span>
...@@ -72,12 +72,12 @@ ...@@ -72,12 +72,12 @@
</div> </div>
<liferay-ui:error key="erroDataNula" message="Uma data deve ser selecionada." /> <liferay-ui:error key="erroDataNula" message="Uma data deve ser selecionada." />
</div> </div>
<aui:button-row> <aui:button-row>
<aui:button type="reset" id="limparFormDO" name="limparFormDO" value="Limpar" /> <aui:button type="reset" id="limparFormDO" name="limparFormDO" value="Limpar" />
<aui:button type="submit" id="enviarFormDO" name="enviarFormDO" value="Gerar Caderno" /> <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 type="button" id="jobForm" name="jobForm" class="oculto" style="display: none" value="no aperte" />
</aui:button-row> </aui:button-row>
</div> </div>
</aui:form> </aui:form>
......
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