From d95485a099c027a30575bcc61595c8b35161ebba Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Sat, 12 Jul 2008 23:06:45 +0000 Subject: [PATCH] FIX largeur de l'outil de ban --- js/pageMinichat.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/pageMinichat.js b/js/pageMinichat.js index c56b2ff..cedcf92 100755 --- a/js/pageMinichat.js +++ b/js/pageMinichat.js @@ -79,6 +79,7 @@ PageMinichat.prototype.charger = function() { this.util.outilsBan = $( '' + + '' + '

' + 'Ban de 3 jours' + 'Ban de 15min' + @@ -717,7 +718,7 @@ Conversation.prototype.attacherEventsSurMessage = function(element) thisConversation.conversations.ouvrirConversation(parseInt(idString.substring(1, racine.length - 1), 36)) return false } - ) + ) $(element).click( function(event) @@ -775,9 +776,10 @@ Conversation.prototype.attacherEventsSurMessage = function(element) { var userId = parseInt($(".id", this).text()) var pseudo = $(this) - var h = pseudo.height() + var h = pseudo.outerHeight() var offset = pseudo.offset() - thisConversation.util.outilsBan.css("top", offset.top - 2).css("left", offset.left - 2).height(h < 16 ? 16 : h).width(pseudo.width() + 16 * 3 + 4 + 64).prependTo(this).show() + // TODO : calculer automatiquement la largeur plutôt que d'inscrire des valeurs en brut' + thisConversation.util.outilsBan.css("top", offset.top - 2).css("left", offset.left - 2).height(h < 16 ? 16 : h).width(pseudo.outerWidth() + 16 * 3 + 12 + 64).prependTo(this).show() $("img", thisConversation.util.outilsBan).unbind("click") $("#slap", thisConversation.util.outilsBan).click( function() -- 2.45.2