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="Faces Configuration Only"/>
<Scope Scope="Project"> <Scope Scope="Project">
<Node id="ListaPlanos.jsp" x="349" y="128" zoom="false"/> <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="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="Footer.jsp" x="650" y="150" zoom="true"/>
<Node id="EditarPlano.jsp" x="609" y="83" zoom="false"/> <Node id="EditarPlano.jsp" x="609" y="83" zoom="false"/>
<Node id="Dummy.jsp" x="867" y="46" zoom="true"/> <Node id="Dummy.jsp" x="867" y="46" zoom="true"/>

@ -405,7 +405,7 @@ public class PlanosDataProvider extends GenericDataProvider{
sql += "WHERE fase = 4"; sql += "WHERE fase = 4";
break; 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(); sql += " and estabelecimento_id = " + u.getEstabelecimento_id();
} }

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

@ -7,6 +7,7 @@
package planosactuacao; package planosactuacao;
import com.sun.rave.web.ui.appbase.AbstractPageBean; 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.Button;
import com.sun.webui.jsf.component.Calendar; import com.sun.webui.jsf.component.Calendar;
import com.sun.webui.jsf.component.Checkbox; import com.sun.webui.jsf.component.Checkbox;
@ -1043,6 +1044,9 @@ public class EditarPlano extends AbstractPageBean {
pg.getChildren().add(st); pg.getChildren().add(st);
} }
// Anchor ancora = new Anchor();
// ancora.setId("calendario");
// gridResponsavel.getChildren().add(ancora);
HtmlPanelGrid grd = new HtmlPanelGrid(); HtmlPanelGrid grd = new HtmlPanelGrid();
grd.setColumns(2); grd.setColumns(2);
grd.setColumnClasses("gridCol15, gridCol85"); grd.setColumnClasses("gridCol15, gridCol85");
@ -1407,6 +1411,7 @@ public class EditarPlano extends AbstractPageBean {
try try
{ {
gravarPlano(); gravarPlano();
getSessionBean1().setMsg("Os dados do Plano de Actua&ccedil;&atilde;o foram guardados");
} }
catch(Exception ex) catch(Exception ex)
{ {
@ -2346,6 +2351,7 @@ public class EditarPlano extends AbstractPageBean {
// TODO: Process the action. Return value is a navigation // TODO: Process the action. Return value is a navigation
// case name where null will return to the same page. // case name where null will return to the same page.
return "lista_planos"; return "lista_planos";
} }
public String butLimparDados_action() { public String butLimparDados_action() {

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

@ -25,13 +25,73 @@
width: 90%; width: 90%;
} }
</style> </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:head>
<webuijsf:body id="body1" style="-rave-layout: grid"> <webuijsf:body id="body1" onLoad="goToAnchor()" style="-rave-layout: grid">
<webuijsf:form id="form1"> <webuijsf:form id="form1">
<webuijsf:staticText escape="false" id="staticText1" style="left: 216px; top: 240px; position: absolute" text="&amp;nbsp;"/> <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:hyperlink binding="#{Dummy.hyperlink1}" id="hyperlink1" style="left: 744px; top: 216px; position: absolute" text="Hyperlink"/>
<webuijsf:button actionExpression="#{Dummy.butImage_action}" binding="#{Dummy.butImage}" id="butImage" <h:panelGrid columns="1" id="gridPanel1" style="height: 24px; left: 96px; top: 48px; position: absolute" width="624">
style="left: 359px; top: 288px; position: absolute; width: 71px" text="Get Image"/> <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:form>
</webuijsf:body> </webuijsf:body>
</webuijsf:html> </webuijsf:html>

@ -12,6 +12,11 @@
<webuijsf:head id="head1"> <webuijsf:head id="head1">
<webuijsf:link id="link1" url="/resources/stylesheet.css"/> <webuijsf:link id="link1" url="/resources/stylesheet.css"/>
<script> <script>
function goToAnchor()
{
//document.location.href="#plano";
location.href="#plano";
}
function setButEnviarText(chk, index) function setButEnviarText(chk, index)
{ {
if(chk == null) // dropDown if(chk == null) // dropDown
@ -212,7 +217,7 @@
</h:panelGrid> </h:panelGrid>
<h:panelGrid columnClasses="gridColLeft,gridColRight" columns="2" id="gridPanel2" style="height: 24px; width: 100%"> <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" <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:panelGroup id="groupPanel2" style="width: 194px">
<webuijsf:button actionExpression="#{EditarPlano.butEnviarCorrecao_action}" binding="#{EditarPlano.butEnviarCorrecao}" <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"/> 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:staticText escape="false" id="staticText10" text="&amp;nbsp;&amp;copy; 2008"/>
</webuijsf:panelGroup> </webuijsf:panelGroup>
</h:panelGrid> </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> </h:panelGrid>
</webuijsf:form> </webuijsf:form>
</webuijsf:body> </webuijsf:body>

@ -11,6 +11,46 @@
<webuijsf:html id="html1"> <webuijsf:html id="html1">
<webuijsf:head id="head1"> <webuijsf:head id="head1">
<webuijsf:link id="link1" url="/resources/stylesheet.css"/> <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:head>
<webuijsf:body id="body1" style="-rave-layout: grid"> <webuijsf:body id="body1" style="-rave-layout: grid">
<webuijsf:form id="form1"> <webuijsf:form id="form1">

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

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

Loading…
Cancel
Save