X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2FpageMinichat%2FpageMinichat.js;h=b40f568818db744d4a223830f1a083e91a4cc874;hp=6a2706f252818179519e4872656bc51cc71fc4a5;hb=9cc062acb9939b2b6b6a6c458a77688e0b96376a;hpb=149c4de8eca530d3d4edf36b903b7d2271558716 diff --git a/js/pageMinichat/pageMinichat.js b/js/pageMinichat/pageMinichat.js index 6a2706f..b40f568 100755 --- a/js/pageMinichat/pageMinichat.js +++ b/js/pageMinichat/pageMinichat.js @@ -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;