this.login = login
this.password = password
if(this.flush())
+ {
this.setStatut(statutType.auth_registered)
- return true
+ return true
+ }
+ return false
}
else\r
{
\r
Client.prototype.deconnexion = function()\r
{
- this.flush()
+ this.flush(true)
this.delCookie()\r
this.setStatut(statutType.deconnected) // deconnexion\r
this.resetDonneesPersonnelles()\r
Client.prototype.flush = function(async)
{
if (async == undefined)
- async = true
+ async = false
if (!this.authentifie())
return false
thisClient = this
+ var ok = true
+
;;; dumpObj(this.getJSONProfile())
jQuery.ajax(
{
success:
function(data)
{
- //thisClient.util.log(thisClient.util.serializer.serializeToString(data))
+ ;;; dumpObj(data)
+ if (data["reply"] == "error")
+ {
+ thisClient.dernierMessageErreur = data["error_message"]
+ ok = false
+ }
}
}
)
- // TODO : retourner false si un problème est survenu lors de l'update du profile
- return true
+
+ return ok
}
Client.prototype.majMenu = function()
initialiserListeStyles(client)
// TODO : pourquoi $(document).unload ne fonctionne pas ?
- $(window).unload(function(){client.flush(false)})
+ $(window).unload(function(){client.flush()})
$("#menu .minichat").click(function(){ pages.afficherPage("minichat") })
$("#menu .admin").click(function(){ pages.afficherPage("admin") })