X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Fclient.js;h=98c0413d03366980eb2a90a1f01d70e4d3f96916;hp=5324f96063868653cead8239dc1cdd9fc0f19d2c;hb=d6dcd0fd8af56bd4791aa4e621c2e5058033c37a;hpb=27c4a5ac9000ca933f28abfedbf9607f73619615 diff --git a/js/client.js b/js/client.js index 5324f96..98c0413 100644 --- a/js/client.js +++ b/js/client.js @@ -31,7 +31,7 @@ euphorik.Client = function(util, communication) { // données personnels this.resetDonneesPersonnelles(); - this.setStatut(euphorik.Client.statutType.deconnected); + this.setStatut(euphorik.Client.statutType.disconnected); // si true alors chaque modification du client est mémorisé sur le serveur this.autoflush = $.browser.opera; @@ -44,7 +44,7 @@ euphorik.Client.statutType = { // mode identifié, peut poster des messages mais n'a pas accès au profile auth_not_registered : 1, // mode déconnecté, ne peut pas poster de message - deconnected : 2 + disconnected : 2 }; euphorik.Client.prototype.resetDonneesPersonnelles = function() { @@ -232,7 +232,7 @@ euphorik.Client.prototype.setStatut = function(statut) statut = statut === "auth_registered" ? euphorik.Client.statutType.auth_registered : - (statut === "auth_not_registered" ? euphorik.Client.statutType.auth_not_registered : euphorik.Client.statutType.deconnected); + (statut === "auth_not_registered" ? euphorik.Client.statutType.auth_not_registered : euphorik.Client.statutType.disconnected); } if (statut === this.statut) { @@ -244,14 +244,12 @@ euphorik.Client.prototype.setStatut = function(statut) this.majMenu(); this.majLogo(); }; - -/** - * Effectue la connexion vers le serveur. - * Cette fonction est bloquante tant que la connexion n'a pas été établie. - * S'il existe un cookie en local on s'authentifie directement avec lui. - * Si il n'est pas possible de s'authentifier alors on affiche un captcha anti-bot. + +/** + * Try to authentify the client with the cookie information. + * Do nothing if there is no cookie. */ -euphorik.Client.prototype.connexionCookie = function() { +euphorik.Client.prototype.connectionCookie = function() { this.getCookie(); if (!this.cookie) { return false; @@ -315,11 +313,11 @@ euphorik.Client.prototype.connexion = function(action, messageJson) { return this.authentifie(); }; -euphorik.Client.prototype.deconnexion = function() { +euphorik.Client.prototype.disconnect = function() { this.flush(true); this.delCookie(); this.resetDonneesPersonnelles(); - this.setStatut(euphorik.Client.statutType.deconnected); // deconnexion + this.setStatut(euphorik.Client.statutType.disconnected); }; euphorik.Client.prototype.chargerDonnees = function(data) {