X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2FpageMinichat.js;h=ec745f357f424e84b2a9617b68cf4a5a967bb1cd;hp=50c6c21db0792878a8cbcdb7ba5afdb1ca4343d7;hb=994f68e1f8a7a43b55d6bd6214b2a0066671ba74;hpb=b7547c3be18fe564cf3e06f2a589c7cc1d78ec33 diff --git a/js/pageMinichat.js b/js/pageMinichat.js index 50c6c21..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) @@ -732,16 +733,18 @@ Conversation.prototype.afficherConversation = function(id) { jq.removeClass("cache") switch (statut) - { + { + // "repondu" et "reponse" sont prioritaitres à "proprietaire" + // contrairement à la vue normale (sans mise en évidence d'une conversation) + case 3 : + jq.addClass("repondu") + break; + case 2 : + jq.addClass("reponse") + break; case 1 : jq.addClass("proprietaire") break; - case 2 : - jq.addClass("reponse") - break; - case 3 : - jq.addClass("repondu") - break; } } } @@ -770,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 @@ -797,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 } @@ -883,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)