From: Greg Burri Date: Thu, 24 Jul 2008 21:37:13 +0000 (+0000) Subject: FIX plein de bugs introduits avec la Grand Restructuration X-Git-Tag: 1.1.0~48 X-Git-Url: https://git.euphorik.ch/?a=commitdiff_plain;h=4f15129b495827b1894f8a234cc8f32262233fb1;p=euphorik.git FIX plein de bugs introduits avec la Grand Restructuration --- diff --git a/js/pageMinichat/commandes.js b/js/pageMinichat/commandes.js index 4d25a43..bae4604 100644 --- a/js/pageMinichat/commandes.js +++ b/js/pageMinichat/commandes.js @@ -61,7 +61,6 @@ euphorik.Commandes.prototype.exec = function(chaine) { if (fragments.length === 0 || fragments[0].charAt(0) != '/') { return [euphorik.Commandes.statut.pas_une_commande, '']; } - console.log(fragments) var nomCommande = fragments[0].slice(1); var args = fragments.slice(1); diff --git a/js/pageMinichat/conversation.js b/js/pageMinichat/conversation.js index 77ee3a2..d8cd8a7 100644 --- a/js/pageMinichat/conversation.js +++ b/js/pageMinichat/conversation.js @@ -286,7 +286,7 @@ euphorik.Conversation.prototype.attacherEventsSurMessage = function(element) { function(event) { // FIXME : ya pas mieux ? var racine = $(event.target).text(); - thisConversation.conversations.ouvrirConversation(parseInt(idString.substring(1, racine.length - 1), 36)); + thisConversation.conversations.ouvrirConversation(parseInt(racine.substring(1, racine.length - 1), 36)); return false; } ); diff --git a/js/pageMinichat/conversations.js b/js/pageMinichat/conversations.js index 2d5df0c..277726d 100644 --- a/js/pageMinichat/conversations.js +++ b/js/pageMinichat/conversations.js @@ -93,12 +93,12 @@ euphorik.Conversations.prototype.ajouterMessageRepond = function(mess) { var mess2; for (mess2 in this.messagesRepond) { if (this.messagesRepond.hasOwnProperty(mess2)) { + mess2 = this.messagesRepond[mess2]; break; } } - mess2 = this.messagesRepond[mess2]; - if (mess2 && mess2.racineId == mess.racineId) { + if (mess2 && mess2.racineId !== mess.racineId) { this.util.messageDialogue("Impossible de répondre à deux messages ne faisant pas partie de la même conversation"); return; } @@ -182,13 +182,14 @@ euphorik.Conversations.prototype.getJSONrafraichirMessages = function() { }; euphorik.Conversations.prototype.getJSONConversations = function() { + var thisConversations = this var clientConv = []; this.client.conversations.each(function(i, conv) { clientConv.push({ root : conv.root, page : conv.page, - last_message_id : this.conversations[i + 1] ? this.conversations[i + 1].idDernierMessageAffiche : 0 + last_message_id : thisConversations.conversations[i + 1] ? thisConversations.conversations[i + 1].idDernierMessageAffiche : 0 }); }); return clientConv; diff --git a/js/pageMinichat/message.js b/js/pageMinichat/message.js index 3afb8b5..9664064 100644 --- a/js/pageMinichat/message.js +++ b/js/pageMinichat/message.js @@ -92,11 +92,11 @@ euphorik.Message.prototype.getConversation = function(messages) { var f = function(tabIds, premierNiveau) { objectEach(tabIds, function(id) { // si le message (id) a déjà été traité - if (messagesEnEvidence[id] || premierNiveau) { + if (!messagesEnEvidence[id] || premierNiveau) { var message = messages.messagesParId[id]; - if (!message) { + if (message) { messagesEnEvidence[id] = premierNiveau ? 3 : (message.auteurId === thisMessage.auteurId ? 1 : 0); - f (message.repondA, false); + f(message.repondA, false); } } }); diff --git a/js/pageMinichat/pageMinichat.js b/js/pageMinichat/pageMinichat.js index 2283acb..2f53eb0 100755 --- a/js/pageMinichat/pageMinichat.js +++ b/js/pageMinichat/pageMinichat.js @@ -96,7 +96,14 @@ euphorik.PageMinichat.prototype.charger = function() { this.util.infoBulle("Cliquer sur les messages pour les enlevers de la liste", $("form#posterMessage #repondA").hover( - function() { thisPage.util.afficherBoite($(".messages", this), $(this), euphorik.Util.positionTypeX.centre, euphorik.Util.positionTypeY.bas); }, + function() { + thisPage.util.afficherBoite( + $(".messages", this), + $(this), + euphorik.Util.positionTypeX.centre, + thisPage.client.chatOrder === "reverse" ? euphorik.Util.positionTypeY.bas : euphorik.Util.positionTypeY.haut + ); + }, function() { $(".messages", this).hide(); } ).click( function(e) { @@ -259,10 +266,9 @@ euphorik.PageMinichat.prototype.envoyerMessage = function(pseudo, message) { var mess = conv.messagesParId[messId]; if (mess) { mess.clientARepondu = true; + $("#conversations #" + mess.getId(conv.getId())).addClass("repondu") } }); - // TODO : ca sert à qque chose ? - //$("#conversations div#" + thisPageMinichat.conversations.messagesRepond[messId].getId()).addClass("repondu") }); $("form#posterMessage input.message").val(""); diff --git a/js/pageProfile.js b/js/pageProfile.js index d7c4e62..fa7235b 100755 --- a/js/pageProfile.js +++ b/js/pageProfile.js @@ -69,7 +69,7 @@ euphorik.PageProfile.prototype.chargerProfile = function() { thisPage.client.chatOrder = $("form#profile select#chatOrder option:selected").attr("value"); thisPage.client.nickFormat = $("form#profile select#affichagePseudo option:selected").attr("value"); if (thisPage.client.ekMaster) { - thisPage.client.ostentatiousaster = $("form#profile select#degreeOstentatoire option:selected").attr("value"); + thisPage.client.ostentatiousMaster = $("form#profile select#degreeOstentatoire option:selected").attr("value"); } thisPage.client.viewTooltips = $("form#profile input#viewTooltips").attr("checked"); thisPage.client.viewTimes = $("form#profile input#viewTimes").attr("checked"); @@ -142,7 +142,7 @@ euphorik.PageProfile.prototype.getHTML = function() { ' ' + ' ' + (this.client.ekMaster ? '' + - ' Degrée d' +'ostentation' + + ' Degrée d\'ostentation' + ' ' + '