From: Greg Burri Date: Fri, 1 Aug 2008 19:37:01 +0000 (+0000) Subject: FIX petit bug dans la mise en évidence des messages auquel l'utilisateur répond X-Git-Tag: 1.1.0~19 X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=commitdiff_plain;h=a57cb5dd4f773111f734c726f61f06434c39b94e FIX petit bug dans la mise en évidence des messages auquel l'utilisateur répond ADD début d'essaie SVG --- diff --git a/doc/graphiques/maquette_1.svg b/doc/graphiques/maquette_1.svg index 3f5163f..6bc4f07 100644 --- a/doc/graphiques/maquette_1.svg +++ b/doc/graphiques/maquette_1.svg @@ -29,9 +29,9 @@ objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="7.5822789" - inkscape:cx="580.48394" - inkscape:cy="905.17554" + inkscape:zoom="1.8955697" + inkscape:cx="560.42433" + inkscape:cy="704.00469" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" @@ -156,6 +156,13 @@ inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 526.18109 : 1" sodipodi:type="inkscape:persp3d" /> + @@ -609,6 +616,48 @@ d="M 630.08761,136.21281 L 615.84388,145.04921" id="path3316" sodipodi:nodetypes="cc" /> + le message racine + + s'affiche lorsqu'un nouveau messagearrive dans cette conversation + + + @@ -10,7 +10,9 @@ end }}. - + euphorik.ch 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 '' + + '' + + '' + + '' + + 'Blabla blablablabla bla blabla ..' + + '' + + ''; +} + /** * @racine un message représentant la racine de la conversation, vaut undefined pour la conversation générale */ @@ -139,32 +167,6 @@ euphorik.Conversation.prototype.setPage = function(pageCourante, dernierePage) { $("#" + this.getId() + " .prev").css("display", dernierePage ? "none" : "inline"); }; -/** - * Evenement déclanché lors de l'insertion du lien de la conversation dans le message courant. - */ -euphorik.Conversation.prototype.eventLien = function(fun) { - var thisConversation = this; - - $("#" + this.getId() + " .titre .lien").click( - function() { - fun(thisConversation.num); - } - ); -}; - -/** - * Evenement déclanché lors de la fermeture de la conversation. - */ -euphorik.Conversation.prototype.eventFermer = function(fun) { - var thisConversation = this; - - $("#" + this.getId() + " .titre .fermer").click( - function() { - fun(thisConversation.num); - } - ); -}; - /** * @funNext appelé lorsque l'on passe à la page suivante (de 2 à 1 par exemple) * @funPrev appelé lorsque l'on passe à la page précédente (de 1 à 2 par exemple) @@ -287,6 +289,10 @@ euphorik.Conversation.prototype.flush = function() { euphorik.Conversation.prototype.attacherEventsSurMessage = function(element) { // l'id du message var idMess = this.idMessageFromString($(element).attr("id")); + + if (idMess in this.conversations.messagesRepond) { + $(element).addClass("repondEnEvidence"); + } this.util.infoBulle("Extraction de la conversation à partir de ce message", $(".extraire", element)); this.util.infoBulle("Extraction de la conversation complète", $(".extraireCompletement", element)); diff --git a/js/pageMinichat/conversations.js b/js/pageMinichat/conversations.js index 26fbb66..0ad7878 100644 --- a/js/pageMinichat/conversations.js +++ b/js/pageMinichat/conversations.js @@ -260,38 +260,19 @@ euphorik.Conversations.prototype.ajouterMessage = function(element, numConversat if (!this.conversations[numConversation]) { nouvelleConversation = true; - this.nouvelleConversation( - numConversation, - function(num) { // fermeture de la conversation - thisConversations.supprimerConversation(num); - }, - function(num) { // insertion du lien vers la conversation - thisPage.util.replaceSelection( - $("form#posterMessage input.message")[0], - "{" + thisConversations.client.conversations[num-1].root.toString(36) + "}" - ); - } - ); + this.nouvelleConversation(numConversation); } this.conversations[numConversation].ajouterMessage(message); return nouvelleConversation; }; -euphorik.Conversations.prototype.nouvelleConversation = function(num, funFermer, funLien) +euphorik.Conversations.prototype.nouvelleConversation = function(num) { var thisMessages = this; this.conversations[num] = new euphorik.Conversation(this, num); - if (funFermer) { - this.conversations[num].eventFermer(funFermer); - } - - if (funLien) { - this.conversations[num].eventLien(funLien); - } - this.conversations[num].setFunPage( function(num) { // page suivante thisMessages.client.pageSuivante(num - 1); diff --git a/styles/1/euphorik.css b/styles/1/euphorik.css index 0383346..4db3de1 100755 --- a/styles/1/euphorik.css +++ b/styles/1/euphorik.css @@ -136,7 +136,7 @@ div#info { top: 0px; background-color: #841919; border-bottom: 1px solid #FFFFFF; - z-index: 20; + z-index: 100; color: #f0df95 } div#info div.fermer { diff --git a/styles/1/pageMinichat.css b/styles/1/pageMinichat.css index 6f386ce..d8fa986 100755 --- a/styles/1/pageMinichat.css +++ b/styles/1/pageMinichat.css @@ -167,13 +167,17 @@ background-image: url(img/reduire_conv_hover.png); } +#page.minichat #conversations .fermer { + background-image: url(img/fermer_conv.png); +} + #page.minichat #conversations .titre .nav .fermer { margin-top: 1px; margin-left: 5px; float: right; width: 13px; height: 13px; - background-image: url(img/fermer_conv.png); + background-image: url(img/fermer_conv.png); cursor: pointer; } #page.minichat #conversations .titre .nav .fermer:hover {