TAG 1.1.5
[euphorik.git] / js / pageMinichat / pageMinichat.js
index 6a2706f..b40f568 100755 (executable)
@@ -213,14 +213,14 @@ euphorik.PageMinichat.prototype.chargerConversationsFragment = function() {
    } catch(e) {
       ;; console.log(e)
    }
-}
+};
   
 euphorik.PageMinichat.prototype.decharger = function() {
    this.conversations.comet.stopAttenteCourante();
    
    $("body #smiles").remove();
    
-    this.fragment.delVal("conv")
+    this.fragment.delVal("conv");
 };
 
 /**
@@ -245,8 +245,6 @@ euphorik.PageMinichat.prototype.envoyerMessage = function(message) {
       return;
    }
    
-   this.client.pseudo = pseudo;
-
    if (!this.client.authentifie()) {
       if (!this.client.enregistrement()) {
          this.util.messageDialogue("login impossible");
@@ -261,21 +259,12 @@ euphorik.PageMinichat.prototype.envoyerMessage = function(message) {
    }
    this.envoieMessageEnCours = true;
    
+   this.client.pseudo = pseudo;
+   
    this.communication.requete(
       "put_message",
-      this.getJSONMessage(pseudo, message),
+      this.getJSONMessage(this.client.pseudo, message),
       function() {
-         // TODO : revoir cette partie
-         // met à jour la classe des messages auquel repond celui ci (c'est un peu de la triche) TODO : ya mieux ?
-         objectEach(thisPageMinichat.conversations.messagesRepond, function(messId) {
-            thisPageMinichat.conversations.conversations.each(function(i, conv) {
-               var mess = conv.messagesParId[messId];
-               if (mess) {
-                  mess.clientARepondu = true;
-                  $("#conversations #" + mess.getId(conv.getId())).addClass("repondu")
-               }
-            });
-         });
          $("form#posterMessage input.message").val("");
          thisPageMinichat.conversations.enleverMessagesRepond(); 
          thisPageMinichat.envoieMessageEnCours = false;