X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2FpageMinichat%2Fconversation.js;h=71a7b3d9af388007c3966f5b80c2ec7817b09371;hp=5a10c5a56b8603e62eb005092504d72ce1465948;hb=a57cb5dd4f773111f734c726f61f06434c39b94e;hpb=7203835bce6f94b6afcc7403694145c829a4f833 diff --git a/js/pageMinichat/conversation.js b/js/pageMinichat/conversation.js index 5a10c5a..71a7b3d 100644 --- a/js/pageMinichat/conversation.js +++ b/js/pageMinichat/conversation.js @@ -62,10 +62,28 @@ euphorik.Conversation = function(conversations, num) { (reverse ? "" : messageRacineXHTML) + '' + (reverse ? "" : messagesXHTML) + + '
' + ''; $("#conversations tr").append(XHTML); + // les différents événements liés à la conversation + var thisConversation = this; + $("#" + this.getId() + " .titre .lien").click(function() { + thisConversation.util.replaceSelection( + $("form#posterMessage input.message")[0], + "{" + thisConversation.client.conversations[thisConversation.num - 1].root.toString(36) + "}" + ); + }); + $("#" + this.getId() + " .titre .fermer").click(function() { + thisConversation.conversations.supprimerConversation(num); + }); + $("#" + this.getId() + " .titre .reduire").click(function() { + $("#" + thisConversation.getId() + " .titre, #" + thisConversation.getId() + " .messages").hide() + var e = $("#" + thisConversation.getId() + " .messageReduit"); + e.get()[0].innerHTML = thisConversation.getMessageReduit() + }); + this.util.infoBulle("Aller à la première page", $("#" + this.getId() + " .numPage"), euphorik.Util.positionBulleType.haut); if (num !== 0) { this.util.infoBulle("Créer un lien vers la conversation", $("#" + this.getId() + " .lien")); @@ -73,6 +91,16 @@ euphorik.Conversation = function(conversations, num) { } }; +euphorik.Conversation.prototype.getMessageReduit = function() { + return '' + + '