Merge origin/master
Conflicts: web/WEB-INF/feuilleGardes.jsp web/css/mycss.css
This commit is contained in:
commit
0783dfd5ab
@ -36,7 +36,7 @@ j2ee.compile.on.save=true
|
||||
j2ee.copy.static.files.on.save=true
|
||||
j2ee.deploy.on.save=true
|
||||
j2ee.platform=1.7-web
|
||||
j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-ssi.jar:${j2ee.server.home}/lib/catalina-storeconfig.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.20.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jakartaee-migration-1.0.0-shaded.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jaspic-api.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-cs.jar:${j2ee.server.home}/lib/tomcat-i18n-de.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-i18n-ko.jar:${j2ee.server.home}/lib/tomcat-i18n-pt-BR.jar:${j2ee.server.home}/lib/tomcat-i18n-ru.jar:${j2ee.server.home}/lib/tomcat-i18n-zh-CN.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-jni.jar:${j2ee.server.home}/lib/tomcat-util-scan.jar:${j2ee.server.home}/lib/tomcat-util.jar:${j2ee.server.home}/lib/tomcat-websocket.jar:${j2ee.server.home}/lib/websocket-api.jar
|
||||
j2ee.platform.classpath=${j2ee.server.domain}/lib/annotations-api.jar:${j2ee.server.domain}/lib/catalina-ant.jar:${j2ee.server.domain}/lib/catalina-ha.jar:${j2ee.server.domain}/lib/catalina-ssi.jar:${j2ee.server.domain}/lib/catalina-storeconfig.jar:${j2ee.server.domain}/lib/catalina-tribes.jar:${j2ee.server.domain}/lib/catalina.jar:${j2ee.server.domain}/lib/ecj-4.20.jar:${j2ee.server.domain}/lib/el-api.jar:${j2ee.server.domain}/lib/jakartaee-migration-1.0.0-shaded.jar:${j2ee.server.domain}/lib/jasper-el.jar:${j2ee.server.domain}/lib/jasper.jar:${j2ee.server.domain}/lib/jaspic-api.jar:${j2ee.server.domain}/lib/jsp-api.jar:${j2ee.server.domain}/lib/servlet-api.jar:${j2ee.server.domain}/lib/tomcat-api.jar:${j2ee.server.domain}/lib/tomcat-coyote.jar:${j2ee.server.domain}/lib/tomcat-dbcp.jar:${j2ee.server.domain}/lib/tomcat-i18n-cs.jar:${j2ee.server.domain}/lib/tomcat-i18n-de.jar:${j2ee.server.domain}/lib/tomcat-i18n-es.jar:${j2ee.server.domain}/lib/tomcat-i18n-fr.jar:${j2ee.server.domain}/lib/tomcat-i18n-ja.jar:${j2ee.server.domain}/lib/tomcat-i18n-ko.jar:${j2ee.server.domain}/lib/tomcat-i18n-pt-BR.jar:${j2ee.server.domain}/lib/tomcat-i18n-ru.jar:${j2ee.server.domain}/lib/tomcat-i18n-zh-CN.jar:${j2ee.server.domain}/lib/tomcat-jdbc.jar:${j2ee.server.domain}/lib/tomcat-jni.jar:${j2ee.server.domain}/lib/tomcat-util-scan.jar:${j2ee.server.domain}/lib/tomcat-util.jar:${j2ee.server.domain}/lib/tomcat-websocket.jar:${j2ee.server.domain}/lib/websocket-api.jar
|
||||
j2ee.server.type=Tomcat
|
||||
jar.compress=false
|
||||
javac.classpath=\
|
||||
|
@ -8,6 +8,8 @@ package bdd;
|
||||
import bean.Caserne;
|
||||
import bean.Gardes;
|
||||
import bean.Pompier;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@ -29,7 +31,8 @@ public class GardeMySQL {
|
||||
"sdis29",
|
||||
"adminBDsdis",
|
||||
"mdpBDsdis");
|
||||
public ArrayList<Gardes> getLesDisponibilite(Calendar[] lesDates, int[] lesPeriodes) {
|
||||
public ArrayList<Gardes> getLesDisponibilite(Calendar[] lesDates, int[] lesPeriodes,HttpServletRequest request) {
|
||||
|
||||
ArrayList<Gardes> lesDispo = new ArrayList<>();
|
||||
Gardes uneDispo;
|
||||
|
||||
@ -39,8 +42,9 @@ public class GardeMySQL {
|
||||
int indiceDateFin = lesDates.length - 1;
|
||||
Pompier lePompier;
|
||||
PompierMySQL pm = new PompierMySQL();
|
||||
|
||||
ArrayList<Pompier> lesPompiers = new ArrayList<>();
|
||||
HttpSession maSession = request.getSession();
|
||||
ArrayList<Pompier> lesPompiers = (ArrayList<Pompier>) maSession.getAttribute("lesPompiers");
|
||||
|
||||
for (Pompier unPompier : lesPompiers) {
|
||||
for (Calendar uneDate : lesDates) {
|
||||
for (int unePeriode : lesPeriodes) {
|
||||
|
@ -90,7 +90,7 @@ public class GardesServlet extends HttpServlet {
|
||||
/* Recherche des ventilations */
|
||||
|
||||
GardeMySQL vm = new GardeMySQL();
|
||||
ArrayList<Gardes> lesVentilInit = vm.getLesDisponibilite(lesDates, lesPeriodes);
|
||||
ArrayList<Gardes> lesVentilInit = vm.getLesDisponibilite(lesDates, lesPeriodes,request);
|
||||
//System.out.println("lesVentilInit : " + lesVentilInit);
|
||||
maSession.setAttribute("lesVentilInit", lesVentilInit);
|
||||
|
||||
|
@ -36,6 +36,26 @@
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:set var="oldId" value="-1" scope="page"/>
|
||||
<tr>
|
||||
<c:forEach items='${sessionScope.lesVentilInit}' var="uneVentil" varStatus="status">
|
||||
<c:set var="newId" value='${uneVentil.getPompier().getId()}' scope="page"/>
|
||||
<c:if test='${oldId != newId}' var="test" scope="page">
|
||||
</tr><tr>
|
||||
<td>${uneVentil.getPompier().getId()}</td>
|
||||
<td>${uneVentil.getPompier().getNom()} ${uneVentil.getPompier().getPrenom()}</td>
|
||||
|
||||
<c:set var="oldId" value='${newId}' scope="page"/>
|
||||
</c:if>
|
||||
<c:set var="activite" value='${uneVentil.getDisponibilite()}' scope="page"/>
|
||||
<td>
|
||||
<input readonly type="text" value='${activite}' name="lesActivites"class="ztVentil ${sessionScope.lesCouleurs[activite]}"/>
|
||||
</td>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="legendCouleur">
|
||||
|
||||
@ -50,6 +70,22 @@
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
var couleurs = ["blanc", "gris", "jaune"];
|
||||
var lesAct = document.getElementsByClassName("ztVentil");
|
||||
for (var uneAct of lesAct) {
|
||||
uneAct.onclick = function () {
|
||||
var act = this.value;
|
||||
var newAct = (act + 1) % 3;
|
||||
var coul = couleurs[newAct];
|
||||
this.classList.remove(couleurs[act]);
|
||||
this.classList.add(coul);
|
||||
this.value = newAct;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ body {
|
||||
}
|
||||
fieldset {
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
padding: 3px;
|
||||
border: 1px solid #DB0005;
|
||||
width: 100%;
|
||||
}
|
||||
@ -103,8 +103,8 @@ select[readonly] {
|
||||
}
|
||||
|
||||
.ztVentil {
|
||||
width : 40%;
|
||||
border: 3px solid;
|
||||
width : 15px;
|
||||
border-color: black;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user