X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2FpageMinichat.js;h=ec745f357f424e84b2a9617b68cf4a5a967bb1cd;hp=d9dbde28faba32d336425c3b5456a59f63fb9a72;hb=994f68e1f8a7a43b55d6bd6214b2a0066671ba74;hpb=e93bc09b8f62b2018760255eb7678f995647eae1 diff --git a/js/pageMinichat.js b/js/pageMinichat.js index d9dbde2..ec745f3 100755 --- a/js/pageMinichat.js +++ b/js/pageMinichat.js @@ -580,7 +580,7 @@ Conversation.prototype.flush = function(funClickOuvrirConv) (this.messages[i].systeme ? " systeme" : "") + (this.messages[i].ekMaster ? " ekMaster" : "") + "\">" + - "
" + + "
" + "[" + message.date + "]" + "" + message.auteurId + "" + identifiant + "" + XHTMLrepondA + @@ -604,7 +604,8 @@ Conversation.prototype.flush = function(funClickOuvrirConv) } ) - thisConversation.util.infoBulle("Extraction de la conversation", $(".extraire", this)) + thisConversation.util.infoBulle("Extraction de la conversation à partir de ce message", $(".extraire", this)) + thisConversation.util.infoBulle("Extraction de la conversation complète", $(".extraireCompletement", this)) // l'id du message var idMess36 = $(this).attr("id").substr(4) @@ -772,6 +773,7 @@ function Messages(client, formateur, util) this.util = util this.conversations = new Array() // les conversations, la première représente la conversation principale + this.nouvelleConversation(0) this.trollIdCourant = 0 @@ -799,10 +801,17 @@ Messages.prototype.getJSONrafraichirMessages = function() Messages.prototype.getJSONConversations = function() { - var clientConv = this.client.getJSONConversations() - for (var i = 1; i < this.conversations.length; i++) + var clientConv = [] + + for (var i = 0; i < this.client.conversations.length; i++) { - clientConv[i-1]["last_message_id"] = this.conversations[i].idDernierMessageAffiche + clientConv.push( + { + root : this.client.conversations[i].root, + page : this.client.conversations[i].page, + last_message_id : this.conversations[i + 1] == undefined ? 0 : this.conversations[i + 1].idDernierMessageAffiche + } + ) } return clientConv } @@ -885,7 +894,8 @@ Messages.prototype.nouvelleConversation = function(num, funFermer, funLien) { var thisMessages = this - this.conversations[num] = new Conversation(num, this.util, this.formateur, this.client) + this.conversations[num] = new Conversation(num, this.util, this.formateur, this.client) + if (funFermer != undefined) this.conversations[num].eventFermer(funFermer) if (funLien != undefined)