MOD séparation logique du profile des utilisateurs dans la BD
[euphorik.git] / js / client.js
index 73622a4..9daa0f5 100644 (file)
@@ -189,7 +189,7 @@ euphorik.Client.prototype.getJSONEnregistrement = function(login, password) {
       mess.password = password;\r
    }\r
    \r
-   mess.profile_infos = this.getJSONProfileInfos();\r
+   mess.profile = this.getJSONProfileInfos();\r
    \r
    return mess;\r
 };\r
@@ -208,7 +208,7 @@ euphorik.Client.prototype.getJSONProfile = function() {
       "cookie" : this.cookie,\r
       "login" : this.login,\r
       "password" : this.password,\r
-      "profile_infos" : this.getJSONProfileInfos()\r
+      "profile" : this.getJSONProfileInfos()\r
    };\r
 };\r
 \r
@@ -356,20 +356,20 @@ euphorik.Client.prototype.chargerDonnees = function(data) {
       \r
       this.id = data.id;\r
       this.login = data.login;\r
-      this.pseudo = data.nick;\r
-      this.email = data.email;\r
-      this.setCss(data.css);\r
-      this.chatOrder = data.chat_order;\r
-      this.nickFormat = data.nick_format;\r
-      this.viewTimes = data.view_times;\r
-      this.viewTooltips = data.view_tooltips;\r
-      this.ostentatiousMaster = data.ostentatious_master;\r
+      this.pseudo = data.profile.nick;\r
+      this.email = data.profile.email;\r
+      this.setCss(data.profile.css);\r
+      this.chatOrder = data.profile.chat_order;\r
+      this.nickFormat = data.profile.nick_format;\r
+      this.viewTimes = data.profile.view_times;\r
+      this.viewTooltips = data.profile.view_tooltips;\r
+      this.ostentatiousMaster = data.profile.ostentatious_master;\r
       \r
       // la page de la conversation principale\r
       this.pagePrincipale = 1;\r
       \r
       // les conversations\r
-      this.conversations = data.conversations;\r
+      this.conversations = data.profile.conversations;\r
       this.conversations.map(function(conv) {\r
          return { root : conv.root, page : 1, reduit : conv.minimized };\r
       });\r