07/01/2009

git-svn-id: https://svn.coded.pt/svn/SIPRP@887 bb69d46d-e84e-40c8-a05a-06db0d633741
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
L Luís = 17 years ago
parent b78f93ef58
commit f91246d239

@ -3,8 +3,8 @@
<Scope Scope="Faces Configuration Only"/>
<Scope Scope="Project">
<Node id="ListaPlanos.jsp" x="349" y="128" zoom="false"/>
<Node id="EnviarCorrecao.jsp" x="150" y="150" zoom="false"/>
<Node id="Erro.jsp" x="257" y="64" zoom="true"/>
<Node id="EnviarCorrecao.jsp" x="150" y="150" zoom="false"/>
<Node id="Footer.jsp" x="650" y="150" zoom="true"/>
<Node id="EditarPlano.jsp" x="609" y="83" zoom="false"/>
<Node id="Dummy.jsp" x="867" y="46" zoom="true"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<driver project-version="3.0" class="org.postgresql.Driver">
<!-- <url value="jdbc:postgresql://storage:5432/siprp_local"/> -->
<url value="jdbc:postgresql://localhost:5436/siprp_local_3"/>
<url value="jdbc:postgresql://localhost:5436/siprp_local_3"/>
<connectionPool min="1" max="1"/>
<login userName="postgres" password=""/>
</driver>

@ -405,7 +405,7 @@ public class PlanosDataProvider extends GenericDataProvider{
sql += "WHERE fase = 4";
break;
}
if(userType != Global.DIRECTOR_SIPRP && userType != Global.TECNICO_HS)
if(userType != Global.DIRECTOR_SIPRP && userType != Global.TECNICO_HS && userType != Global.DIRECTOR_NACIONAL_SEGURANCA)
{
sql += " and estabelecimento_id = " + u.getEstabelecimento_id();
}

@ -8,17 +8,14 @@ package planosactuacao;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.webui.jsf.component.Button;
import com.sun.webui.jsf.component.ImageComponent;
import com.sun.webui.jsf.component.Hyperlink;
import db.entidades.Utilizador;
import db.providers.UtilizadoresDataProvider;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.ListIterator;
import javax.faces.FacesException;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import utils.Logos;
/**
* <p>Page bean that corresponds to a similarly named JSP page. This
@ -39,23 +36,23 @@ public class Dummy extends AbstractPageBean {
*/
private void _init() throws Exception {
}
private Button butImage = new Button();
private Hyperlink hyperlink1 = new Hyperlink();
public Button getButImage() {
return butImage;
public Hyperlink getHyperlink1() {
return hyperlink1;
}
public void setButImage(Button b) {
this.butImage = b;
public void setHyperlink1(Hyperlink h) {
this.hyperlink1 = h;
}
private ImageComponent image1 = new ImageComponent();
private Hyperlink link = new Hyperlink();
public ImageComponent getImage1() {
return image1;
public Hyperlink getLink() {
return link;
}
public void setImage1(ImageComponent ic) {
this.image1 = ic;
public void setLink(Hyperlink h) {
this.link = h;
}
// </editor-fold>
@ -124,6 +121,8 @@ public class Dummy extends AbstractPageBean {
*/
@Override
public void prerender() {
//Verbatim verbatim = new Verbatim();
//printUsers();
}

@ -7,6 +7,7 @@
package planosactuacao;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.webui.jsf.component.Anchor;
import com.sun.webui.jsf.component.Button;
import com.sun.webui.jsf.component.Calendar;
import com.sun.webui.jsf.component.Checkbox;
@ -1043,6 +1044,9 @@ public class EditarPlano extends AbstractPageBean {
pg.getChildren().add(st);
}
// Anchor ancora = new Anchor();
// ancora.setId("calendario");
// gridResponsavel.getChildren().add(ancora);
HtmlPanelGrid grd = new HtmlPanelGrid();
grd.setColumns(2);
grd.setColumnClasses("gridCol15, gridCol85");
@ -1057,7 +1061,7 @@ public class EditarPlano extends AbstractPageBean {
{
dtInicio = new Calendar();
dtInicio.setId("dtInicio");
dtInicio.setDateFormatPattern("dd-MM-yyyy");
dtInicio.setValue(r.getData_inicio());
java.util.GregorianCalendar gcalendar = new java.util.GregorianCalendar();
@ -1406,7 +1410,8 @@ public class EditarPlano extends AbstractPageBean {
// case name where null will return to the same page.
try
{
gravarPlano();
gravarPlano();
getSessionBean1().setMsg("Os dados do Plano de Actua&ccedil;&atilde;o foram guardados");
}
catch(Exception ex)
{
@ -2346,6 +2351,7 @@ public class EditarPlano extends AbstractPageBean {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
return "lista_planos";
}
public String butLimparDados_action() {

@ -8,6 +8,7 @@ package planosactuacao;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.webui.jsf.component.Button;
import com.sun.webui.jsf.component.Hyperlink;
import com.sun.webui.jsf.component.PanelGroup;
import com.sun.webui.jsf.component.StaticText;
import db.entidades.Area;
@ -64,6 +65,7 @@ public class ViewPlano extends AbstractPageBean {
// </editor-fold>
HtmlPanelGrid gridPlano;
HtmlPanelGrid gridArea;
HtmlPanelGrid gridAreaContainer;
HtmlPanelGrid gridRisco;
HtmlPanelGrid gridValor;
HtmlPanelGrid gridMedida;
@ -195,13 +197,15 @@ public class ViewPlano extends AbstractPageBean {
private void showAreas(List<Area> areas)
{
int i = 0;
for(Area area : areas)
{
i++;
gridArea = new HtmlPanelGrid();
gridArea.setColumns(1);
gridArea.setColumnClasses("gridColCenter");
gridArea.setWidth("100%");
gridPlano.getChildren().add(gridArea);
pg = new PanelGroup();
@ -211,10 +215,30 @@ public class ViewPlano extends AbstractPageBean {
st.setText("&Aacute;rea:&nbsp;");
pg.getChildren().add(st);
st = new StaticText();
st.setId("fakeLink" + i);
st.setStyleClass("fakeLink");
st.setOnMouseOver("this.style.textDecoration = 'underline'");
st.setOnMouseOut("this.style.textDecoration = 'none'");
st.setOnClick("expand(this)");
st.setEscape(false);
st.setText(area.getDescricao());
pg.getChildren().add(st);
gridArea.getChildren().add(pg);
gridAreaContainer = new HtmlPanelGrid();
gridAreaContainer.setId("area_container" + i);
gridAreaContainer.setStyleClass("hidden");
gridAreaContainer.setColumns(1);
gridAreaContainer.setColumnClasses("gridColCenter");
gridAreaContainer.setWidth("100%");
st = new StaticText();
st.setEscape(false);
st.setText("&nbsp;");
gridAreaContainer.getChildren().add(st);
gridArea.getChildren().add(gridAreaContainer);
showRiscos(area.getRiscos());
}
}
@ -226,8 +250,9 @@ public class ViewPlano extends AbstractPageBean {
HtmlPanelGrid grd = new HtmlPanelGrid();
grd.setColumns(1);
grd.setWidth("100%");
grd.setStyleClass("centerBlock");
gridArea.getChildren().add(grd);
//grd.setStyleClass("centerBlock");
//gridArea.getChildren().add(grd);
gridAreaContainer.getChildren().add(grd);
gridRisco = new HtmlPanelGrid();
gridRisco.setStyleClass("centerBlock");

@ -25,13 +25,73 @@
width: 90%;
}
</style>
<script>
function goToAnchor()
{
location.href="#plano";
//document.getElementById("form1:calendario").focus();
}
function expand(lnk)
{
var id = lnk.id;
var idnr = getIdNr(id);
var container = document.getElementById("form1:gridContainer" + idnr);
if(container != null)
{
var className = container.className;
if(className == 'hidden')
{
container.className = 'visible';
}
else
{
container.className = 'hidden';
}
}
}
function getIdNr(id)
{
var nr = '';
var i = id.lastIndexOf(":");
while(true)
{
var ch = id.charAt(i);
if(ch == '0' || ch == '1' || ch == '2' || ch == '3' || ch == '4' || ch == '5' || ch == '6' || ch == '7' || ch == '8' || ch == '9' )
{
nr += ch;
}
i++;
if(i == id.length)
{
break;
}
}
return nr;
}
</script>
</webuijsf:head>
<webuijsf:body id="body1" style="-rave-layout: grid">
<webuijsf:body id="body1" onLoad="goToAnchor()" style="-rave-layout: grid">
<webuijsf:form id="form1">
<webuijsf:staticText escape="false" id="staticText1" style="left: 216px; top: 240px; position: absolute" text="&amp;nbsp;"/>
<webuijsf:image binding="#{Dummy.image1}" id="image1" style="left: 336px; top: 48px; position: absolute" url=""/>
<webuijsf:button actionExpression="#{Dummy.butImage_action}" binding="#{Dummy.butImage}" id="butImage"
style="left: 359px; top: 288px; position: absolute; width: 71px" text="Get Image"/>
<webuijsf:hyperlink binding="#{Dummy.hyperlink1}" id="hyperlink1" style="left: 744px; top: 216px; position: absolute" text="Hyperlink"/>
<h:panelGrid columns="1" id="gridPanel1" style="height: 24px; left: 96px; top: 48px; position: absolute" width="624">
<webuijsf:staticText id="lnkArea1" onClick="expand(this);" onMouseOut="this.style.textDecoration = &quot;none&quot;"
onMouseOver="this.style.textDecoration = &quot;underline&quot;" styleClass="fakeLink" text="Area aaaa"/>
<h:panelGrid id="gridContainer1" style="height: 24px" styleClass="hidden" width="480">
<webuijsf:staticText id="staticText3" style="color: #dc0f0f" text="Conteudo"/>
</h:panelGrid>
<webuijsf:button id="button1" text="Button"/>
<webuijsf:button id="button2" text="Button"/>
</h:panelGrid>
<h:panelGrid columns="1" id="gridAncora" style="height: 24px; left: 216px; top: 1536px; position: absolute" width="504">
<f:verbatim>
<a name="plano"></a>
</f:verbatim>
<webuijsf:anchor id="ancora" target="ancora"/>
<webuijsf:staticText id="staticText2" text="AAAAAAAAA"/>
</h:panelGrid>
<webuijsf:hyperlink binding="#{Dummy.link}" id="link" style="position: absolute; left: 240px; top: 1224px" text="Hyperlink"/>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>

@ -12,6 +12,11 @@
<webuijsf:head id="head1">
<webuijsf:link id="link1" url="/resources/stylesheet.css"/>
<script>
function goToAnchor()
{
//document.location.href="#plano";
location.href="#plano";
}
function setButEnviarText(chk, index)
{
if(chk == null) // dropDown
@ -212,7 +217,7 @@
</h:panelGrid>
<h:panelGrid columnClasses="gridColLeft,gridColRight" columns="2" id="gridPanel2" style="height: 24px; width: 100%">
<webuijsf:button actionExpression="#{EditarPlano.butCancelar_action}" binding="#{EditarPlano.butCancelar}" id="butCancelar"
style="width: 95px" text="Cancelar"/>
onClick="location.href='#plano'" style="width: 95px" text="Cancelar"/>
<webuijsf:panelGroup id="groupPanel2" style="width: 194px">
<webuijsf:button actionExpression="#{EditarPlano.butEnviarCorrecao_action}" binding="#{EditarPlano.butEnviarCorrecao}"
escape="false" id="butEnviarCorrecao" text="&amp;lt;&amp;lt;Enviar correc&amp;ccedil;&amp;atilde;o"/>
@ -227,6 +232,35 @@
<webuijsf:staticText escape="false" id="staticText10" text="&amp;nbsp;&amp;copy; 2008"/>
</webuijsf:panelGroup>
</h:panelGrid>
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel4" style="height: 24px; width: 80%" styleClass="centerBlock">
<f:verbatim>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</f:verbatim>
<webuijsf:staticText escape="false" id="staticText3" text="&amp;nbsp;AAAAAAAA"/>
</h:panelGrid>
</h:panelGrid>
</webuijsf:form>
</webuijsf:body>

@ -11,6 +11,46 @@
<webuijsf:html id="html1">
<webuijsf:head id="head1">
<webuijsf:link id="link1" url="/resources/stylesheet.css"/>
<script>
function expand(lnk)
{
var id = lnk.id;
var idnr = getIdNr(id);
var container = document.getElementById("form1:area_container" + idnr);
if(container != null)
{
var className = container.className;
if(className == 'hidden')
{
container.className = 'visible';
}
else
{
container.className = 'hidden';
}
}
}
function getIdNr(id)
{
var nr = '';
var i = id.lastIndexOf(":");
while(true)
{
var ch = id.charAt(i);
if(ch == '0' || ch == '1' || ch == '2' || ch == '3' || ch == '4' || ch == '5' || ch == '6' || ch == '7' || ch == '8' || ch == '9' )
{
nr += ch;
}
i++;
if(i == id.length)
{
break;
}
}
return nr;
}
</script>
</webuijsf:head>
<webuijsf:body id="body1" style="-rave-layout: grid">
<webuijsf:form id="form1">

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

@ -158,6 +158,11 @@ body {background-color: #f8f8f0;}
display : none;
}
.fakeLink{
cursor: pointer;
color: #0000cc;
}
.infoMessage {
font-size : 13px;
color: black;

Loading…
Cancel
Save