X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2FpageMinichat.js;h=8adcd87a1a60ae16fdb1ad3c358bf1be74ae8022;hb=e97e239aa43c3c4094436c1a41a43b0d069c605b;hp=0ba6dc6c5659e3746fa56c083e98a412969f92c6;hpb=5f6ea43b8825c6df005e0130f9e4fa54b1931831;p=euphorik.git diff --git a/js/pageMinichat.js b/js/pageMinichat.js index 0ba6dc6..8adcd87 100755 --- a/js/pageMinichat.js +++ b/js/pageMinichat.js @@ -531,16 +531,17 @@ Conversation.prototype.flush = function(funClickOuvrirConv) messagePair = !messagePair } - $("#conversations #" + this.getId()).prepend(XHTML) - // enlève les messages exedentaires var nbMessagesAffiche = $("#conversations #" + this.getId() + " .message").size() if (nbMessagesAffiche > this.nbMessageMax) $("#conversations #" + this.getId() + " .message").slice(this.nbMessageMax, nbMessagesAffiche).empty() - - // ajoute les événements liés à chaque nouveau message - $("#conversations #" + this.getId() + " .message").filter(function(){ return parseInt($(this).attr("id").substr(4), 36) > thisConversation.idDernierMessageAffiche }).each( + + + //.filter(function(){ return parseInt($(this).attr("id").substr(4), 36) > thisConversation.idDernierMessageAffiche }) + + var DOM = $(XHTML) + DOM.each( function() { $(".lienConv", this).click( @@ -628,6 +629,7 @@ Conversation.prototype.flush = function(funClickOuvrirConv) ) } ) + DOM.prependTo("#conversations #" + this.getId()) if (this.messages.length > 0) this.idDernierMessageAffiche = this.messages[this.messages.length-1].id