this.communication = communication;\r
\r
this.cookie = null;\r
- this.regexCookie = /^cookie=([^;]*)/;\r
+ this.regexCookie = /cookie=([^;]*)/;\r
\r
// données personnels\r
this.resetDonneesPersonnelles();\r
\r
- this.setStatut(euphorik.Client.statutType.deconnected);\r
+ this.setStatut(euphorik.Client.statutType.disconnected);\r
\r
// si true alors chaque modification du client est mémorisé sur le serveur\r
this.autoflush = $.browser.opera;\r
// mode identifié, peut poster des messages mais n'a pas accès au profile\r
auth_not_registered : 1,\r
// mode déconnecté, ne peut pas poster de message\r
- deconnected : 2\r
+ disconnected : 2\r
};\r
\r
euphorik.Client.prototype.resetDonneesPersonnelles = function() {\r
this.login = "";\r
this.password = "";\r
this.email = "";\r
- this.css = $("link#cssPrincipale").attr("href");\r
+ this.css = $("link#mainCss").attr("href");\r
this.chatOrder = "reverse";\r
this.nickFormat = "nick";\r
this.viewTimes = true;\r
}\r
\r
this.css = css;\r
- $("link#cssPrincipale").attr("href", this.css);\r
+ $("link#mainCss").attr("href", this.css);\r
if (this.autoflush) {\r
this.flush(true);\r
}\r
statut =\r
statut === "auth_registered" ?\r
euphorik.Client.statutType.auth_registered :\r
- (statut === "auth_not_registered" ? euphorik.Client.statutType.auth_not_registered : euphorik.Client.statutType.deconnected);\r
+ (statut === "auth_not_registered" ? euphorik.Client.statutType.auth_not_registered : euphorik.Client.statutType.disconnected);\r
}\r
\r
if (statut === this.statut) {\r
this.majMenu();\r
this.majLogo();\r
};\r
-\r
-/**\r
- * Effectue la connexion vers le serveur.\r
- * Cette fonction est bloquante tant que la connexion n'a pas été établie.\r
- * S'il existe un cookie en local on s'authentifie directement avec lui.\r
- * Si il n'est pas possible de s'authentifier alors on affiche un captcha anti-bot.\r
+
+/**
+ * Try to authentify the client with the cookie information.
+ * Do nothing if there is no cookie.
*/\r
-euphorik.Client.prototype.connexionCookie = function() {\r
+euphorik.Client.prototype.connectionCookie = function() {\r
this.getCookie();\r
if (!this.cookie) {\r
return false;\r
};\r
\r
/**\r
- * Connexion. Réalisée de manière synchrone.\r
+ * Connexion. Réalisé de manière synchrone.\r
*/\r
euphorik.Client.prototype.connexion = function(action, messageJson) {\r
var thisClient = this;\r
thisClient.chargerDonnees(data);\r
},\r
function(data) {\r
- thisClient.util.messageDialogue(data.error_message);\r
+ thisClient.util.messageDialog(data.error_message);\r
thisClient.delCookie(); // suppression du cookie actuel, cas où le cookie du client ne permet pas une authentification\r
},\r
false\r
return this.authentifie();\r
};\r
\r
-euphorik.Client.prototype.deconnexion = function() {\r
+euphorik.Client.prototype.disconnect = function() {\r
this.flush(true);\r
this.delCookie();\r
this.resetDonneesPersonnelles();\r
- this.setStatut(euphorik.Client.statutType.deconnected); // deconnexion\r
+ this.setStatut(euphorik.Client.statutType.disconnected);\r
};\r
\r
euphorik.Client.prototype.chargerDonnees = function(data) {\r
if (!this.authentifie()) {\r
return false;\r
}\r
-\r
+ \r
var thisClient = this;\r
var ok = true;\r
\r
thisClient.majBulle(); \r
},\r
function(data) {\r
- thisClient.util.messageDialogue(data.error_message);\r
+ thisClient.util.messageDialog(data.error_message);\r
ok = false;\r
},\r
async\r