FIX petites corrections à deux balles
[euphorik.git] / js / euphorik.js
index a3b0acf..126f335 100755 (executable)
@@ -465,6 +465,9 @@ function Client(util)
    this.resetDonneesPersonnelles()
    
    this.setStatut(statutType.deconnected)\r
+   \r
+   // si true alors chaque modification du client est mémorisé sur le serveur\r
+   this.autoflush = $.browser["opera"]\r
 }
 \r
 Client.prototype.resetDonneesPersonnelles = function()\r
@@ -494,7 +497,9 @@ Client.prototype.setCss = function(css)
 
    this.css = css
    $("link#cssPrincipale").attr("href", this.css)
-   this.majMenu()
+   this.majMenu()\r
+   \r
+   if (this.autoflush) this.flush(true)
 }
 
 Client.prototype.pageSuivante = function(numConv)
@@ -547,7 +552,10 @@ Client.prototype.ajouterConversation = function(racine)
       if (this.conversations[i].root == racine)
          return false
          
-   this.conversations.push({root : racine, page : 1})
+   this.conversations.push({root : racine, page : 1})\r
+   \r
+   if (this.autoflush) this.flush(true)\r
+   
    return true
 }
 
@@ -558,7 +566,9 @@ Client.prototype.supprimerConversation = function(num)
    // décalage TODO : supprimer le dernier élément 
    for (var i = num; i < this.conversations.length - 1; i++)
       this.conversations[i] = this.conversations[i+1]
-   this.conversations.pop()
+   this.conversations.pop()\r
+   \r
+   if (this.autoflush) this.flush(true)
 }
 
 Client.prototype.getJSONLogin = function(login, password)