Commit 80b05f2c authored by Bastien Zigmann's avatar Bastien Zigmann Committed by Vincent Dubois

Ajout de statistiques dans le menu de droite, celles-ci sont stockées dans les préférences user OSM

parent bae68be6
......@@ -12,6 +12,9 @@ class Geocropping {
* GENERAL
*/
_userNbValidated: number;
_userNbInvalidated: number;
/**
* Gestion de la connexion à osm
*
......@@ -334,6 +337,7 @@ class Geocropping {
$(this).trigger('userConnected');
//console.trace('myGeocropping', 'connected');
this.updateUserDetails();
this._getStats();
});
}
......@@ -546,59 +550,67 @@ class Geocropping {
return out += '</table></div>';
}
let content = `<div class='popup-info'>
<div class='row valide-element'>`;
let content = `
<div class='popup-info'>
<div class='row valide-element'>`;
if (this.isConnected) {
content += `
<div class="col-xs-12" role="group">
<button type="button" id="btnValidate" data-id="${properties.id}" data-type="${properties.type}" class='btn btn-success col-xs-4'><span class="glyphicon glyphicon-ok" aria-hidden="true"></span></button>
<button data-toggle="button" aria-pressed"false" type="button" id="btnError" class='btn btn-danger col-xs-4'><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
<button type="button" id="btnSendToOSM" class='btn btn-warning col-xs-4' onclick="window.location.href='https://www.openstreetmap.org/edit?${properties.type}=${properties.id}'"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></button>
<!--<a target="_blank" id="btnSendToOSM" class='btn btn-warning col-xs-4' role='button' href="https://www.openstreetmap.org/edit?${properties.type}=${properties.id}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></a>-->
</div>`
content += `<div class='collapse element-signal col-xs-12' id='${properties.id}Signal'>`;
<div class="col-xs-12" role="group">
<button type="button" id="btnValidate" data-id="${properties.id}" data-type="${properties.type}" class='btn btn-success col-xs-4'><span class="glyphicon glyphicon-ok" aria-hidden="true"></span></button>
<button data-toggle="button" aria-pressed"false" type="button" id="btnError" class='btn btn-danger col-xs-4'><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
<button type="button" id="btnSendToOSM" class='btn btn-warning col-xs-4' onclick="window.location.href='https://www.openstreetmap.org/edit?${properties.type}=${properties.id}'"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></button>
<!--<a target="_blank" id="btnSendToOSM" class='btn btn-warning col-xs-4' role='button' href="https://www.openstreetmap.org/edit?${properties.type}=${properties.id}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></a>-->
</div>
</div>
<div class='element-info row'>
<!--div><span class='label label-info'>type</span> ${properties.type}</div-->
<!--div><span class='label label-info'>id</span> ${properties.id}</div-->
<div class="col-xs-12">
<!--span class='label label-info'>tags</span-->${toTable(properties.tags)}
</div><br/><hr>
<!--div><span class='label label-info'>relations</span> ${properties.relations.join(', ')}</div-->
<!--div><span class='label label-info'>meta</span> ${toTable(properties.meta)}</div-->
<!--pre>${JSON.stringify(properties, null, 4)}</pre-->
<div class='row valide-element'>`;
content += `
<div class='collapse element-signal col-xs-12 toto' id='${properties.id}Signal'>`;
if (tags.fixme && tags.fixme !== "") {
content += `<a style='color:red;' href="https://www.openstreetmap.org/edit?${properties.type}=${properties.id}" target="_blank"><span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span> L'objet a déjà été déclaré comme erronné, raison : "${tags.fixme}"</a>`
content += `
<a style='color:red;' href="https://www.openstreetmap.org/edit?${properties.type}=${properties.id}" target="_blank"><span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span> L'objet a déjà été déclaré comme erronné, raison : "${tags.fixme}"</a>`
}
content +=
`<form onsubmit="return false;" role="form" data-id="${properties.id}" data-type="${properties.type}">
<h2>Signaler une erreur</h2>
<div class="form-group">
<select name="errorType" id="errorType" class="form-control" required="required">
<option value="" hidden disabled selected>Choisir l'erreur...</option>
<option value="errorPos">Position incorrecte</option>
<option value="errorExist">N'existe pas</option>
<option value="errorInfo">Informations éronnées</option>
<option value="other">Autre</option>
</select>
<textarea name="comment" id="comment" maxlength="255" class="form-control" rows="1" placeholder="Commentaire" style="resize:none; overflow:hidden; display:none;"></textarea>
</div>
<div class='valide-element checkbox'>
<label><input type="checkbox" id="followChanges"> Je souhaite être notifié de la prochaine mise à jour de cet élément.</label>
</div>
<div align="center">
<input value="Signaler" type="submit" class="btn btn-primary">
<input value="Annuler" type="button" id="btnAnnulation" class="btn btn-primary">
</div>
</form>
</div>`
content += `
<form onsubmit="return false;" role="form" data-id="${properties.id}" data-type="${properties.type}">
<h3 class="signalTitle">Signaler une erreur</h3>
<div class="form-group">
<select name="errorType" id="errorType" class="form-control" required="required">
<option value="" hidden disabled selected>Choisir l'erreur...</option>
<option value="errorPos">Position incorrecte</option>
<option value="errorExist">N'existe pas</option>
<option value="errorInfo">Informations érronées</option>
<option value="errorWorks">En cours de transformation</option>
<option value="other">Autre</option>
</select>
<textarea name="comment" id="comment" maxlength="255" class="form-control" rows="1" placeholder="Commentaire" style="resize:none; overflow:hidden; display:none;"></textarea>
</div>
<div class='valide-element checkbox'>
<label><input type="checkbox" id="followChanges"> Je souhaite être notifié de la prochaine mise à jour de cet élément.</label>
</div>
<div align="center">
<input value="Signaler" type="submit" class="btn btn-primary">
<input value="Annuler" type="button" id="btnAnnulation" class="btn btn-primary">
</div>
</form>
</div>`
} else {
content += `
<div class="col-xs-12" role="group">
<button class="btn btn-info" id="login">Connexion</button>
</div>`
<div class="col-xs-12" role="group">
<button class="btn btn-info" id="login">Connexion</button>
</div>`
}
content += `
</div>
<div class='element-info row'>
<!--div><span class='label label-info'>type</span> ${properties.type}</div-->
<!--div><span class='label label-info'>id</span> ${properties.id}</div-->
<div class="col-xs-12"><!--span class='label label-info'>tags</span-->${toTable(properties.tags)}</div>
<!--div><span class='label label-info'>relations</span> ${properties.relations.join(', ')}</div-->
<!--div><span class='label label-info'>meta</span> ${toTable(properties.meta)}</div-->
<!--pre>${JSON.stringify(properties, null, 4)}</pre-->
</div>
</div>`;
</div>
</div>`;
popupEvent.popup.setContent(content);
......@@ -675,6 +687,8 @@ class Geocropping {
case 'errorInfo':
text += `Les informations de l'élément ne sont pas correctes`;
break;
case 'errorWorks':
text += `L'objet n'est pas/plus celui indiqué, mais il y a du changement en cours`;
case 'other':
text += (e.target as any).elements.comment.value
break
......@@ -751,7 +765,14 @@ class Geocropping {
}
elementChanged();
// OKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
this.notify.ValidatedOK();
this.notify.InvalidatedOK();
if (this._userNbInvalidated !== -1)
this._userNbInvalidated++;
else
this._userNbInvalidated = 1;
this._ajoutPreferenceUnique("nbInvalid", `${this._userNbInvalidated}`);
$(this).trigger('updateStats');
}, e => {
// ERR CloseChangeset
this.notify.ValidatedNOK();
......@@ -873,6 +894,13 @@ class Geocropping {
// OKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
this.notify.ValidatedOK();
if (this._userNbValidated !== -1)
this._userNbValidated++;
else
this._userNbValidated = 1;
this._ajoutPreferenceUnique("nbValid", `${this._userNbValidated}`);
$(this).trigger('updateStats');
}, e => {
// ERR CloseChangeset
this.notify.ValidatedNOK();
......@@ -1033,7 +1061,6 @@ class Geocropping {
// this.notify.Modification();
this._checkChanges();
}
......@@ -1365,8 +1392,13 @@ class Geocropping {
}
for (let i in resPref) {
ids.push(resPref[i]['@attributes'].k);
pref[resPref[i]['@attributes'].k] = resPref[i]['@attributes'].v;
if(resPref[i]['@attributes'].k !== "nbValid" && resPref[i]['@attributes'].k !== "nbInvalid"){
ids.push(resPref[i]['@attributes'].k);
pref[resPref[i]['@attributes'].k] = resPref[i]['@attributes'].v;
}
}
let req = OauthOsm.apiRequest.GetElementsId; // récupération des infos des éléments que l'utilisateur a demandé à suivre
......@@ -1398,6 +1430,7 @@ class Geocropping {
}
// Enlève des préférences les nodes ayant été modifiés
//TODODO gérer quand il y plus de 150 preférences
_removeChanges(resPref, changes: number[]) {
let newPref = {
preferences:{
......@@ -1422,4 +1455,52 @@ class Geocropping {
geocropping._osm._sendRequest(req).then(() => {}, () => { this.notify.AjoutSinglePrefNOK() });
}
//Récupérer les statistiques dans les préférences de l'utilisateur. Si elles n'existe pas, les créée
_getStats() {
let req = OauthOsm.apiRequest.GetUserPreferences; //récupération des nodes que l'utilisateur veux suivre
this._osm._sendRequest(req).done((data: any) => {
let resPref = data.preferences.preference; // le résultat de la requête
let valid, invalid;
// ici si resPref ne contient qu'un élément, c'est un objet, non un tableau d'objets, on résoud le problème :
if (!(resPref instanceof Array)) {
if (resPref instanceof Object) {
resPref = [resPref];
} else {
resPref = [];
}
}
for (let i in resPref) {
switch(resPref[i]['@attributes'].k) {
case "nbValid":
valid = resPref[i]['@attributes'].v;
break;
case "nbInvalid":
invalid = resPref[i]['@attributes'].v;
break;
default: break;
}
}
if(valid === undefined)
this._ajoutPreferenceUnique("nbValid", "-1");
if (invalid === undefined)
this._ajoutPreferenceUnique("nbInvalid", "-1");
if (valid === "-1" || valid === undefined)
valid = 0;
if (invalid === "-1" || invalid === undefined)
invalid = 0;
this._userNbValidated = valid;
this._userNbInvalidated = invalid;
$(this).trigger('updateStats');
});
}
}
......@@ -16,6 +16,8 @@ class MyNotification {
DisconnectionNOK: "Echec de la deconnexion du compte OSM", //DONE BUT NOT TESTED
ValidatedOK: "Element validé", //DONE
ValidatedNOK: "Echec de la validation de l'élement", //DONE BUT NOT TESTED
InvalidatedOK: "Element signalé",
InvalidatedNOK: "Echec de la signalisation de l'élement",
LocalisationNOK: "Echec de la localisation", //DONE
AutoServerChanged: "Problème de connexion avec le server, changement automatique", //DONE BUT NOT TESTED
ServerChanged: "Changement de server éffectué", //DONE
......@@ -46,6 +48,12 @@ class MyNotification {
ValidatedNOK() {
this.box.show(this.notif.ValidatedNOK);
}
InvalidatedOK(){
this.box.show(this.notif.InvalidatedOK);
}
InvalidatedNOK(){
this.box.show(this.notif.InvalidatedNOK);
}
LocalisationNOK() {
this.box.show(this.notif.LocalisationNOK);
}
......
......@@ -127,6 +127,12 @@ $(document).ready(() => {
$('#userAction #login').hide();
$('#userAction #logout').show();
$('.map-menu-item:has(#userImage)').show();
$('#userInfo').show();
}
let updateStats = () => {
$('#userNbValid').text(`Validations : ${geocropping._userNbValidated}`);
$('#userNbInvalid').text(`Signalements : ${geocropping._userNbInvalidated}`);
}
/**
* Cacher les information nécessaire a la connection
......@@ -144,8 +150,8 @@ $(document).ready(() => {
}
$geocropping.on('userDisconnected', userDisconnected);
$geocropping.on('userConnected', userConnected);
$geocropping.on('updateStats', updateStats);
/**
* Mettre a jour les informations de l'utilisateur qui sont affichées
......@@ -169,7 +175,7 @@ $(document).ready(() => {
geocropping.createMap('map');
// pour permettre le redimentionnement après la crétion de la carte leaflet
// pour permettre le redimentionnement après la création de la carte leaflet
document.getElementById('mapArea').style.width = "auto";
geocropping.startLocateUser();
......
......@@ -8,6 +8,8 @@
* @class Geocropping
*/
declare class Geocropping {
_userNbValidated: number;
_userNbInvalidated: number;
/**
* Gestion de la connexion à osm
*
......@@ -312,4 +314,5 @@ declare class Geocropping {
_checkChanges(): void;
_removeChanges(resPref: any, changes: number[]): void;
_ajoutPreferenceUnique(id: any, version: any): void;
_getStats(): void;
}
......@@ -15,6 +15,8 @@ declare class MyNotification {
DisconnectionNOK(): void;
ValidatedOK(): void;
ValidatedNOK(): void;
InvalidatedOK(): void;
InvalidatedNOK(): void;
LocalisationNOK(): void;
AutoServerChanged(): void;
ServerChanged(): void;
......
......@@ -126,6 +126,14 @@ body {
padding-right: initial;
}
.popup-info h3{
margin-top: 0px;
}
.popup-info .table{
margin-bottom: 0px;
}
.popup-info {
word-wrap: break-word;
margin: 10px;
......@@ -134,6 +142,11 @@ body {
max-height: inherit;
}
.signalTitle {
font-size: initial;
font-weight: bold;
}
@media screen and (max-height: 450px) {
.side-nav {
padding-top: 15px;
......
......@@ -72,13 +72,16 @@ if (empty($_SERVER['HTTPS'])) {
</div>
<div class="side-nav fit-right fit-top menu" style="right:-250px;width:250px">
<div class="side-nav-body">
<div id="userInfo" style="display:none;">
<div id="userName">User Name</div>
</div>
<div id="userAction">
<button class="btn" id="login">Connexion</button>
<button class="btn" id="logout" style="display:none;">Déconnexion</button>
</div>
<div id="userInfo"><br>
<div id="userName">User Name</div><br>
<div id="userNbValid">Nombre d'éléments validés : </div>
<div id="userNbInvalid">Nombre d'éléments signalés : </div>
</div>
<hr>
<div id="menu">
<div class="form-group">
<label for="urlInterpreter">Serveur:</label>
......
......@@ -216,6 +216,7 @@ var Geocropping = (function () {
$(_this).trigger('userConnected');
//console.trace('myGeocropping', 'connected');
_this.updateUserDetails();
_this._getStats();
});
}
Object.defineProperty(Geocropping, "DEFAULT", {
......@@ -453,20 +454,19 @@ var Geocropping = (function () {
});
return out += '</table></div>';
};
var content = "<div class='popup-info'>\n <div class='row valide-element'>";
var content = "\n <div class='popup-info'>\n <div class='row valide-element'>";
if (_this.isConnected) {
content += "\n <div class=\"col-xs-12\" role=\"group\">\n <button type=\"button\" id=\"btnValidate\" data-id=\"" + properties.id + "\" data-type=\"" + properties.type + "\" class='btn btn-success col-xs-4'><span class=\"glyphicon glyphicon-ok\" aria-hidden=\"true\"></span></button>\n <button data-toggle=\"button\" aria-pressed\"false\" type=\"button\" id=\"btnError\" class='btn btn-danger col-xs-4'><span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span></button>\n <button type=\"button\" id=\"btnSendToOSM\" class='btn btn-warning col-xs-4' onclick=\"window.location.href='https://www.openstreetmap.org/edit?" + properties.type + "=" + properties.id + "'\"><span class=\"glyphicon glyphicon-edit\" aria-hidden=\"true\"></span></button>\n <!--<a target=\"_blank\" id=\"btnSendToOSM\" class='btn btn-warning col-xs-4' role='button' href=\"https://www.openstreetmap.org/edit?" + properties.type + "=" + properties.id + "\"><span class=\"glyphicon glyphicon-edit\" aria-hidden=\"true\"></span></a>-->\n </div>";
content += "<div class='collapse element-signal col-xs-12' id='" + properties.id + "Signal'>";
content += "\n <div class=\"col-xs-12\" role=\"group\">\n <button type=\"button\" id=\"btnValidate\" data-id=\"" + properties.id + "\" data-type=\"" + properties.type + "\" class='btn btn-success col-xs-4'><span class=\"glyphicon glyphicon-ok\" aria-hidden=\"true\"></span></button>\n <button data-toggle=\"button\" aria-pressed\"false\" type=\"button\" id=\"btnError\" class='btn btn-danger col-xs-4'><span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span></button>\n <button type=\"button\" id=\"btnSendToOSM\" class='btn btn-warning col-xs-4' onclick=\"window.location.href='https://www.openstreetmap.org/edit?" + properties.type + "=" + properties.id + "'\"><span class=\"glyphicon glyphicon-edit\" aria-hidden=\"true\"></span></button>\n <!--<a target=\"_blank\" id=\"btnSendToOSM\" class='btn btn-warning col-xs-4' role='button' href=\"https://www.openstreetmap.org/edit?" + properties.type + "=" + properties.id + "\"><span class=\"glyphicon glyphicon-edit\" aria-hidden=\"true\"></span></a>-->\n </div>\n </div>\n <div class='element-info row'>\n <!--div><span class='label label-info'>type</span> " + properties.type + "</div-->\n <!--div><span class='label label-info'>id</span> " + properties.id + "</div-->\n <div class=\"col-xs-12\">\n <!--span class='label label-info'>tags</span-->" + toTable(properties.tags) + "\n </div><br/><hr>\n <!--div><span class='label label-info'>relations</span> " + properties.relations.join(', ') + "</div-->\n <!--div><span class='label label-info'>meta</span> " + toTable(properties.meta) + "</div-->\n <!--pre>" + JSON.stringify(properties, null, 4) + "</pre-->\n <div class='row valide-element'>";
content += "\n <div class='collapse element-signal col-xs-12 toto' id='" + properties.id + "Signal'>";
if (tags.fixme && tags.fixme !== "") {
content += "<a style='color:red;' href=\"https://www.openstreetmap.org/edit?" + properties.type + "=" + properties.id + "\" target=\"_blank\"><span class=\"glyphicon glyphicon-warning-sign\" aria-hidden=\"true\"></span> L'objet a d\u00E9j\u00E0 \u00E9t\u00E9 d\u00E9clar\u00E9 comme erronn\u00E9, raison : \"" + tags.fixme + "\"</a>";
content += "\n <a style='color:red;' href=\"https://www.openstreetmap.org/edit?" + properties.type + "=" + properties.id + "\" target=\"_blank\"><span class=\"glyphicon glyphicon-warning-sign\" aria-hidden=\"true\"></span> L'objet a d\u00E9j\u00E0 \u00E9t\u00E9 d\u00E9clar\u00E9 comme erronn\u00E9, raison : \"" + tags.fixme + "\"</a>";
}
content +=
"<form onsubmit=\"return false;\" role=\"form\" data-id=\"" + properties.id + "\" data-type=\"" + properties.type + "\">\n <h2>Signaler une erreur</h2>\n <div class=\"form-group\">\n <select name=\"errorType\" id=\"errorType\" class=\"form-control\" required=\"required\">\n <option value=\"\" hidden disabled selected>Choisir l'erreur...</option>\n <option value=\"errorPos\">Position incorrecte</option>\n <option value=\"errorExist\">N'existe pas</option>\n <option value=\"errorInfo\">Informations \u00E9ronn\u00E9es</option>\n <option value=\"other\">Autre</option>\n </select>\n <textarea name=\"comment\" id=\"comment\" maxlength=\"255\" class=\"form-control\" rows=\"1\" placeholder=\"Commentaire\" style=\"resize:none; overflow:hidden; display:none;\"></textarea>\n </div>\n <div class='valide-element checkbox'>\n <label><input type=\"checkbox\" id=\"followChanges\"> Je souhaite \u00EAtre notifi\u00E9 de la prochaine mise \u00E0 jour de cet \u00E9l\u00E9ment.</label>\n </div>\n <div align=\"center\">\n <input value=\"Signaler\" type=\"submit\" class=\"btn btn-primary\">\n <input value=\"Annuler\" type=\"button\" id=\"btnAnnulation\" class=\"btn btn-primary\">\n </div>\n </form>\n </div>";
content += "\n <form onsubmit=\"return false;\" role=\"form\" data-id=\"" + properties.id + "\" data-type=\"" + properties.type + "\">\n <h3 class=\"signalTitle\">Signaler une erreur</h3>\n <div class=\"form-group\">\n <select name=\"errorType\" id=\"errorType\" class=\"form-control\" required=\"required\">\n <option value=\"\" hidden disabled selected>Choisir l'erreur...</option>\n <option value=\"errorPos\">Position incorrecte</option>\n <option value=\"errorExist\">N'existe pas</option>\n <option value=\"errorInfo\">Informations \u00E9rron\u00E9es</option>\n <option value=\"errorWorks\">En cours de transformation</option>\n <option value=\"other\">Autre</option>\n </select>\n <textarea name=\"comment\" id=\"comment\" maxlength=\"255\" class=\"form-control\" rows=\"1\" placeholder=\"Commentaire\" style=\"resize:none; overflow:hidden; display:none;\"></textarea>\n </div>\n <div class='valide-element checkbox'>\n <label><input type=\"checkbox\" id=\"followChanges\"> Je souhaite \u00EAtre notifi\u00E9 de la prochaine mise \u00E0 jour de cet \u00E9l\u00E9ment.</label>\n </div>\n <div align=\"center\">\n <input value=\"Signaler\" type=\"submit\" class=\"btn btn-primary\">\n <input value=\"Annuler\" type=\"button\" id=\"btnAnnulation\" class=\"btn btn-primary\">\n </div>\n </form>\n </div>";
}
else {
content += "\n <div class=\"col-xs-12\" role=\"group\">\n <button class=\"btn btn-info\" id=\"login\">Connexion</button>\n </div>";
content += "\n <div class=\"col-xs-12\" role=\"group\">\n <button class=\"btn btn-info\" id=\"login\">Connexion</button>\n </div>";
}
content += "\n </div>\n <div class='element-info row'>\n <!--div><span class='label label-info'>type</span> " + properties.type + "</div-->\n <!--div><span class='label label-info'>id</span> " + properties.id + "</div-->\n <div class=\"col-xs-12\"><!--span class='label label-info'>tags</span-->" + toTable(properties.tags) + "</div>\n <!--div><span class='label label-info'>relations</span> " + properties.relations.join(', ') + "</div-->\n <!--div><span class='label label-info'>meta</span> " + toTable(properties.meta) + "</div-->\n <!--pre>" + JSON.stringify(properties, null, 4) + "</pre-->\n </div>\n </div>";
content += "\n </div>\n </div>";
popupEvent.popup.setContent(content);
$(popupEvent.popup.getElement()).on("click", function (e) {
if ($('.valide-element').has(e.target).length === 0) {
......@@ -531,6 +531,8 @@ var Geocropping = (function () {
case 'errorInfo':
text += "Les informations de l'\u00E9l\u00E9ment ne sont pas correctes";
break;
case 'errorWorks':
text += "L'objet n'est pas/plus celui indiqu\u00E9, mais il y a du changement en cours";
case 'other':
text += e.target.elements.comment.value;
break;
......@@ -602,7 +604,13 @@ var Geocropping = (function () {
}
elementChanged();
// OKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
_this.notify.ValidatedOK();
_this.notify.InvalidatedOK();
if (_this._userNbInvalidated !== -1)
_this._userNbInvalidated++;
else
_this._userNbInvalidated = 1;
_this._ajoutPreferenceUnique("nbInvalid", "" + _this._userNbInvalidated);
$(_this).trigger('updateStats');
}, function (e) {
// ERR CloseChangeset
_this.notify.ValidatedNOK();
......@@ -715,6 +723,12 @@ var Geocropping = (function () {
elementChanged();
// OKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
_this.notify.ValidatedOK();
if (_this._userNbValidated !== -1)
_this._userNbValidated++;
else
_this._userNbValidated = 1;
_this._ajoutPreferenceUnique("nbValid", "" + _this._userNbValidated);
$(_this).trigger('updateStats');
}, function (e) {
// ERR CloseChangeset
_this.notify.ValidatedNOK();
......@@ -1164,8 +1178,10 @@ var Geocropping = (function () {
}
}
for (var i in resPref) {
ids.push(resPref[i]['@attributes'].k);
pref[resPref[i]['@attributes'].k] = resPref[i]['@attributes'].v;
if (resPref[i]['@attributes'].k !== "nbValid" && resPref[i]['@attributes'].k !== "nbInvalid") {
ids.push(resPref[i]['@attributes'].k);
pref[resPref[i]['@attributes'].k] = resPref[i]['@attributes'].v;
}
}
var req = OauthOsm.apiRequest.GetElementsId; // récupération des infos des éléments que l'utilisateur a demandé à suivre
req.params.type = "nodes"; // paramétrage de la requête
......@@ -1193,6 +1209,7 @@ var Geocropping = (function () {
});
};
// Enlève des préférences les nodes ayant été modifiés
//TODODO gérer quand il y plus de 150 preférences
Geocropping.prototype._removeChanges = function (resPref, changes) {
var newPref = {
preferences: {
......@@ -1216,6 +1233,46 @@ var Geocropping = (function () {
req.params.value = version;
geocropping._osm._sendRequest(req).then(function () { }, function () { _this.notify.AjoutSinglePrefNOK(); });
};
//Récupérer les statistiques dans les préférences de l'utilisateur. Si elles n'existe pas, les créée
Geocropping.prototype._getStats = function () {
var _this = this;
var req = OauthOsm.apiRequest.GetUserPreferences; //récupération des nodes que l'utilisateur veux suivre
this._osm._sendRequest(req).done(function (data) {
var resPref = data.preferences.preference; // le résultat de la requête
var valid, invalid;
// ici si resPref ne contient qu'un élément, c'est un objet, non un tableau d'objets, on résoud le problème :
if (!(resPref instanceof Array)) {
if (resPref instanceof Object) {
resPref = [resPref];
}
else {
resPref = [];
}
}
for (var i in resPref) {
switch (resPref[i]['@attributes'].k) {
case "nbValid":
valid = resPref[i]['@attributes'].v;
break;
case "nbInvalid":
invalid = resPref[i]['@attributes'].v;
break;
default: break;
}
}
if (valid === undefined)
_this._ajoutPreferenceUnique("nbValid", "-1");
if (invalid === undefined)
_this._ajoutPreferenceUnique("nbInvalid", "-1");
if (valid === "-1" || valid === undefined)
valid = 0;
if (invalid === "-1" || invalid === undefined)
invalid = 0;
_this._userNbValidated = valid;
_this._userNbInvalidated = invalid;
$(_this).trigger('updateStats');
});
};
return Geocropping;
}());
//# sourceMappingURL=Geocropping.js.map
\ No newline at end of file
This diff is collapsed.
......@@ -12,6 +12,8 @@ var MyNotification = (function () {
DisconnectionNOK: "Echec de la deconnexion du compte OSM",
ValidatedOK: "Element validé",
ValidatedNOK: "Echec de la validation de l'élement",
InvalidatedOK: "Element signalé",
InvalidatedNOK: "Echec de la signalisation de l'élement",
LocalisationNOK: "Echec de la localisation",
AutoServerChanged: "Problème de connexion avec le server, changement automatique",
ServerChanged: "Changement de server éffectué",
......@@ -41,6 +43,12 @@ var MyNotification = (function () {
MyNotification.prototype.ValidatedNOK = function () {
this.box.show(this.notif.ValidatedNOK);
};
MyNotification.prototype.InvalidatedOK = function () {
this.box.show(this.notif.InvalidatedOK);
};
MyNotification.prototype.InvalidatedNOK = function () {
this.box.show(this.notif.InvalidatedNOK);
};
MyNotification.prototype.LocalisationNOK = function () {
this.box.show(this.notif.LocalisationNOK);
};
......
{"version":3,"file":"MyNotification.js","sourceRoot":"","sources":["../.ts/MyNotification.ts"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,2CAA2C;AAE3C;IAMC,wBAAY,GAAU;QAJtB,YAAO,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;QAKnD,IAAI,CAAC,GAAG,GAAI,CAAC,CAAC,OAAe,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClE,IAAI,CAAC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QACjC,CAAC;IACF,CAAC;IACD,2CAAkB,GAAlB;QACC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAC9C,CAAC;IACD,0CAAiB,GAAjB;QACC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;IAC5C,CAAC;IACF,qBAAC;AAAD,CAAC,AA3FD,IA2FC"}
\ No newline at end of file
......@@ -116,6 +116,11 @@ $(document).ready(function () {
$('#userAction #login').hide();
$('#userAction #logout').show();
$('.map-menu-item:has(#userImage)').show();
$('#userInfo').show();
};
var updateStats = function () {
$('#userNbValid').text("Validations : " + geocropping._userNbValidated);
$('#userNbInvalid').text("Signalements : " + geocropping._userNbInvalidated);
};
/**
* Cacher les information nécessaire a la connection
......@@ -131,6 +136,7 @@ $(document).ready(function () {
};
$geocropping.on('userDisconnected', userDisconnected);
$geocropping.on('userConnected', userConnected);
$geocropping.on('updateStats', updateStats);
/**
* Mettre a jour les informations de l'utilisateur qui sont affichées
*
......@@ -152,7 +158,7 @@ $(document).ready(function () {
}
;
geocropping.createMap('map');
// pour permettre le redimentionnement après la crétion de la carte leaflet
// pour permettre le redimentionnement après la création de la carte leaflet
document.getElementById('mapArea').style.width = "auto";
geocropping.startLocateUser();
});
......
{"version":3,"file":"index.js","sourceRoot":"","sources":["../.ts/index.ts"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,2CAA2C;AAE3C;;;GAGG;AACH;IACI,IAAI,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACpF,EAAE,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC;QAClB,cAAc,EAAE,CAAC;IACrB,IAAI;QACA,aAAa,EAAE,CAAC;AACxB,CAAC;AAED;;;GAGG;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AC;IACtC,CAAC,CAAA;IAED,YAAY,CAAC,EAAE,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;IACtD,YAAY,CAAC,EAAE,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAChD,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IAE5C;;;;;OAKG;IACH,IAAI,iBAAiB,GAAG,UAAC,CAAoB,EAAE,IAAsB;QACjE,yDAAyD;QACzD,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACrD,CAAC,CAAA;IACD,YAAY,CAAC,EAAE,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;IAEzD,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;QAC1B,aAAa,EAAE,CAAC;IACpB,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,gBAAgB,EAAE,CAAC;IACvB,CAAC;IAAA,CAAC;IAEF,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAE7B,4EAA4E;IAC5E,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;IAExD,WAAW,CAAC,eAAe,EAAE,CAAC;AAClC,CAAC,CAAC,CAAC"}
\ No newline at end of file
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