X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2FpageMinichat.js;h=80cd013de290d8f189d8c21faaf57b0344e39112;hp=6b7b3401f786d25b2bb70184179b7aed5756d6a1;hb=81b3e94e62dd60087d71efc42004f8222d9e1e7a;hpb=7a5497fe66ee5318962dd5dde9f274bedb376e5d diff --git a/js/pageMinichat.js b/js/pageMinichat.js index 6b7b340..80cd013 100755 --- a/js/pageMinichat.js +++ b/js/pageMinichat.js @@ -44,7 +44,12 @@ PageMinichat.prototype.charger = function() if (this.client.ekMaster) { $("body").append( - "
\"Ban\"Ban\"Avertissement\"
" + '
' + + '

' + + 'Ban de 3 jours' + + 'Ban de 15min' + + 'Avertissement' + + '
' ) $("#outilsBan").hover( function(){}, @@ -535,7 +540,7 @@ Conversation.prototype.flush = function(funClickOuvrirConv) } ) - $("a[@rel*=lightbox]").lightBox() + $("a[@rel*=lightbox]", this).lightBox() // les outils de bannissement (uniquement pour les ekMaster) if (thisConversation.client.ekMaster) @@ -546,24 +551,27 @@ Conversation.prototype.flush = function(funClickOuvrirConv) var element = $(e.target) var h = element.height() var offset = element.offset() - var outils = $("#outilsBan").css("top", offset.top - 2).css("left", offset.left - 2).height(h < 16 ? 16 : h).width(element.width() + 16 * 3 + 4).show() + var outils = $("#outilsBan").css("top", offset.top - 2).css("left", offset.left - 2).height(h < 16 ? 16 : h).width(element.width() + 16 * 3 + 4 + 64).show() $("img", outils).unbind() $("#slap", outils).click( function(e) { - thisConversation.client.slap(userId) + thisConversation.client.slap(userId, $("#outilsBan input").val()) + $("#outilsBan input").val("") } ) $("#kick", outils).click( function(e) { - thisConversation.client.kick(userId) + thisConversation.client.kick(userId, $("#outilsBan input").val()) + $("#outilsBan input").val("") } ) $("#ban", outils).click( function(e) { - thisConversation.client.ban(userId) + thisConversation.client.ban(userId, $("#outilsBan input").val()) + $("#outilsBan input").val("") } ) }, @@ -903,7 +911,7 @@ Messages.prototype.rafraichirMessages = function(vider) for (var i = 0; i < this.conversations.length; i++) this.conversations[i].idDernierMessageAffiche = 0 - dumpObj(this.getJSONrafraichirMessages()) + ;;; dumpObj(this.getJSONrafraichirMessages()) this.attenteCourante = jQuery.ajax({ type: "POST", url: "request", @@ -920,9 +928,6 @@ Messages.prototype.rafraichirMessages = function(vider) // ajoute les messages reçus à leur conversation respective for (var numConv = 0; numConv < data["conversations"].length; numConv++) { - // ya pas de nouveaux message -> on passe à la prochaine conversation FIXME : marche pas - //if (data["conversations"][numConv]["messages"].length == 0) continue - if (! thisMessages.ajouterMessages(data["conversations"][numConv], numConv)) { thisMessages.util.messageDialogue("La conversation {" + thisMessages.client.conversations[numConv -1].root.toString(36) + "} n'existe pas")