if (this.client.ekMaster)
{
$("body").append(
- "<div id=\"outilsBan\"><img id=\"ban\" alt=\"Ban de 3 jours\" src=\"img/ban.gif\" /><img id=\"kick\" alt=\"Ban de 15min\" src=\"img/kick.gif\" /><img id=\"slap\" alt=\"Avertissement\" src=\"img/slap.gif\" /></div>"
+ '<div id="outilsBan">' +
+ '<form><p><input id="raison" name="raison" type="text" size="10" maxlength="200"></input></p></form>' +
+ '<img id="ban" src="img/ban.gif" alt="Ban de 3 jours" />' +
+ '<img id="kick" src="img/kick.gif" alt="Ban de 15min" />' +
+ '<img id="slap" src="img/slap.gif" alt="Avertissement" />' +
+ '</div>'
)
$("#outilsBan").hover(
function(){},
}
)
- $("a[@rel*=lightbox]").lightBox()
+ $("a[@rel*=lightbox]", this).lightBox()
// les outils de bannissement (uniquement pour les ekMaster)
if (thisConversation.client.ekMaster)
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("")
}
)
},
for (var i = 0; i < this.conversations.length; i++)
this.conversations[i].idDernierMessageAffiche = 0\r
- dumpObj(this.getJSONrafraichirMessages())
+ ;;; dumpObj(this.getJSONrafraichirMessages())
this.attenteCourante = jQuery.ajax({
type: "POST",
url: "request",
// 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")