X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Feuphorik.js;h=cb7f71a771ee00336c5e93b0f4e280a21d45a047;hp=e5645833de5026b9809d8a4d7fa202426dfb45ae;hb=e82b363f65838828948a62ef4452e752743ef661;hpb=650c44a784cabc8a1f2bd1daa7e5e61ccf74ca6f diff --git a/js/euphorik.js b/js/euphorik.js index e564583..cb7f71a 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -29,6 +29,7 @@ * Normalement 'const' à la place de 'var' mais non supporté par IE7. */ var conf = { + nickDefaut : "", nbMessageAffiche : 40, // (par page) pseudoDefaut : "", tempsAffichageMessageDialogue : 4000, // en ms @@ -559,7 +560,7 @@ Client.prototype.resetDonneesPersonnelles = function() this.ekMaster = false // les conversations, une conversation est un objet possédant les attributs suivants : - // - racine (entier) + // - root (entier) // - page (entier) this.conversations = new Array() } @@ -623,9 +624,8 @@ Client.prototype.ajouterConversation = function(racine) for (var i = 0; i < this.conversations.length; i++) if (this.conversations[i].root == racine) return false - - this.conversations.push({root : racine, page : 1}) + this.conversations.push({root : racine, page : 1}) if (this.autoflush) this.flush(true) return true @@ -681,7 +681,7 @@ Client.prototype.getJSONConversations = function() { var conversations = new Array() for (var i = 0; i < this.conversations.length; i++) - conversations.push({ "root" : this.conversations[i].root, "page" : this.conversations[i].page}) + conversations.push(this.conversations[i].root) return conversations } @@ -698,7 +698,6 @@ Client.prototype.getJSONProfile = function() "nick_format" : this.nickFormat, "view_times" : this.viewTimes, "view_tooltips" : this.viewTooltips, - "main_page" : this.pagePrincipale < 1 ? 1 : this.pagePrincipale, "conversations" : this.getJSONConversations() } } @@ -845,10 +844,12 @@ Client.prototype.chargerDonnees = function(data) this.viewTooltips = data["view_tooltips"] // la page de la conversation principale - this.pagePrincipale = data["main_page"] == undefined ? 1 : data["main_page"] + this.pagePrincipale = 1 // les conversations this.conversations = data["conversations"] + for (var i = 0; i < this.conversations.length; i++) + this.conversations[i] = {root : this.conversations[i], page : 1} this.majBulle() this.majCssSelectionee() @@ -941,7 +942,7 @@ Client.prototype.majCssSelectionee = function() { // extraction du numéro de la css courante var numCssCourante = this.css.match(/^.*?\/(\d)\/.*$/) - if (numCssCourante[1] != undefined) + if (numCssCourante != null && numCssCourante[1] != undefined) { $("#menuCss option").removeAttr("selected") $("#menuCss option[value=" + numCssCourante[1]+ "]").attr("selected", "selected") @@ -1078,10 +1079,9 @@ PageEvent.prototype.waitEvent = function(funSend, funsReceive) this.attenteCourante = jQuery.ajax({ type: "POST", url: "request", - dataType: "json", - timeout: 300000, // timeout de 5min. Gros HACK pas beau. FIXME problème décrit ici : http://groups.google.com/group/jquery-en/browse_thread/thread/8724e64af3333a76 - // Obsolète (voir TODO) - //timeout: 300000, // timeout de 5min. Gros HACK pas beau. FIXME problème décrit ici : http://groups.google.com/group/jquery-en/browse_thread/thread/8724e64af3333a76 + dataType: "json", + // TODO : doit disparaitre + timeout: 180000, // timeout de 3min. Gros HACK pas beau. FIXME problème décrit ici : http://groups.google.com/group/jquery-en/browse_thread/thread/8724e64af3333a76 data: this.util.jsonVersAction(dataToSend), success: function(data)