X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2Feuphorik.js;h=56c78fddd7f3fc2824f6e683ea9e09272bbd54d7;hb=7f8025543a7a5d614ec47d18026dc0feb3338fdb;hp=88ef6e73266c9e0ce30a6c1cc716bd8aaed09338;hpb=35838780dce22af9f2dc80af9149a30a0433de0a;p=euphorik.git diff --git a/js/euphorik.js b/js/euphorik.js index 88ef6e7..56c78fd 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -459,10 +459,10 @@ Client.prototype.ajouterConversation = function(racine) { // vérification s'il elle n'existe pas déjà for (var i = 0; i < this.conversations.length; i++) - if (this.conversations[i].racine == racine) + if (this.conversations[i].root == racine) return false - this.conversations.push({racine : racine, page : 1}) + this.conversations.push({root : racine, page : 1}) return true } @@ -514,7 +514,7 @@ Client.prototype.getJSONConversations = function() { var conversations = new Array() for (var i = 0; i < this.conversations.length; i++) - conversations.push({ "racine" : this.conversations[i].racine, "page" : this.conversations[i].page}) + conversations.push({ "root" : this.conversations[i].root, "page" : this.conversations[i].page}) return conversations } @@ -525,6 +525,7 @@ Client.prototype.getJSONProfile = function() "cookie" : this.cookie, "login" : this.login, "password" : this.password, + "nick" : this.pseudo, "email" : this.email, "css" : this.css, "main_page" : this.pagePrincipale < 1 ? 1 : this.pagePrincipale, @@ -688,7 +689,7 @@ Client.prototype.flush = function(async) return false thisClient = this - //this.util.jsonVersAction(this.getJSONProfile()).action.dump("Flush client") + ;;; dumpObj(this.getJSONProfile()) jQuery.ajax( { async: async, @@ -765,11 +766,12 @@ jQuery(document).ready( }) } - jQuery(document).unload( + // TODO : pourquoi jQuery(document).unload ne fonctionne pas ? + jQuery(window).unload( function() { - alert("ok") - client.flush() + //alert("ok") + client.flush(false) } )