mirror of
https://gitlab.aliens-lyon.fr/savrillo/gpens.git
synced 2026-09-11 21:20:46 +02:00
Caché les mdp. Les données récupérées sont mainenant jolies.
This commit is contained in:
+36
-9
@@ -7,15 +7,20 @@
|
||||
<style>
|
||||
|
||||
#selectedSalleInfos {
|
||||
background-color: #888888;
|
||||
background-color: #BBBBBB;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
|
||||
#selectedSalleInfos h2 {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script type="text/javascript" src="./svg-pan-zoom.min.js"></script>
|
||||
<script type="text/javascript" src="./tinycolor.min.js"></script>
|
||||
<script type="text/javascript" src="./tinycolor-min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -30,6 +35,17 @@
|
||||
xmlHttp.send(null);
|
||||
}
|
||||
|
||||
function putWaitNetworkScreen()
|
||||
{
|
||||
outputDiv.innerHTML = "Récupération des informations auprès du serveur...";
|
||||
}
|
||||
|
||||
function salleInfosToHtml(salle) {
|
||||
titres = "<h2>"+salle.nom+"</h2>"+((salle.aliaz.length!=0)?(" ou <h2>"+salle.aliaz.join("</h2> ou <h2>")+"</h2>"):"");
|
||||
locataires = salle.locataires.join(", ");
|
||||
return titres + ((salle.description!=null)?("\n<br/>\n" + salle.description):"") + ((salle.locataires.length!=0)?("\n<br/>\n<b>Locataires</b>: " + locataires):"");
|
||||
}
|
||||
|
||||
function initSvgSupport() {
|
||||
|
||||
var plan = document.getElementById('plan');
|
||||
@@ -48,13 +64,20 @@
|
||||
}
|
||||
|
||||
document.lastSelectedSalle = e.target;
|
||||
window.clearTimeout(document.wnsTimeout);
|
||||
document.wnsTimeout = window.setTimeout(putWaitNetworkScreen, 400);
|
||||
|
||||
httpGetAsync("https://perso.ens-lyon.fr/samy.avrillon/sallesQuery.php?salle="+e.target.id.substring("path-salle-".length),function (s,errcode){
|
||||
window.clearTimeout(document.wnsTimeout);
|
||||
try{
|
||||
if(s=="404"){
|
||||
outputDiv.innerHTML = "Aucune information disponible pour cette salle. Si vous en avez, indiquez-les à l'adresse <a href=mailto:samy.avrillon@ens-lyon.fr>samy.avrillon@ens-lyon.fr</a> en indiquant l'identifiant de la salle : "+document.lastSelectedSalle.id.substring("path-salle-".length);
|
||||
return;
|
||||
}
|
||||
ss = JSON.parse(s)
|
||||
if(document.lastSelectedSalle.id==("path-salle-"+ss["id"])){
|
||||
if(errcode==200){
|
||||
outputDiv.innerHTML = s;
|
||||
outputDiv.innerHTML = salleInfosToHtml(ss);
|
||||
}else
|
||||
outputDiv.innerHTML = "Erreur lors de l'appel à l'interface php: ERREUR "+errcode;
|
||||
}
|
||||
@@ -95,7 +118,9 @@
|
||||
<option value="2">Deuxième étage</option>
|
||||
<option value="3">Troisième étage</option>
|
||||
<option value="4">Quatrième étage</option>
|
||||
</select>
|
||||
</select>
|
||||
|
|
||||
<input type="button" value="Vue d'ensemble" id="overviewButton" onclick="overviewButton"/>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -109,13 +134,15 @@
|
||||
Votre navigateur ne sait pas charger les objets HTML.... Je vais voir ce que je peux faire.
|
||||
|
||||
</object>
|
||||
|
||||
<form>
|
||||
<input name="searchString" type="text"/>
|
||||
</form>
|
||||
|
||||
<div id="selectedSalleInfos">
|
||||
Il faut que vous sélectionnez une salle.
|
||||
</div>
|
||||
|
||||
<form>
|
||||
<input name="searchString" type="text"/>
|
||||
</form>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user