$(this).click(
function(event)
{
- thisPage.util.replaceSelection($("form input.message")[0], thisPage.formateur.smiles[$(this).attr("class")][0].source.replace(/\\/g, ""))
- }
- )
- .hover(
- function()
- {
- $(this).animate(
- {
- opacity: 1
- }, 200
- )
- },
- function()
- {
- $(this).animate(
- {
- opacity: opacityBase
- }, 200
- )
+ thisPage.util.replaceSelection($("form#posterMessage input.message")[0], thisPage.formateur.smiles[$(this).attr("class")][0].source.replace(/\\/g, ""))
}
+ ).hover(
+ function() { $(this).animate({opacity: 1}, 200) },
+ function() { $(this).animate({opacity: opacityBase}, 200) }
)
}
)
messagePair = !messagePair
}
-
- // enlève les messages exedentaires
- var nbMessagesAffiche = $("#conversations #" + this.getId() + " .message").size()
-
- if (nbMessagesAffiche > this.nbMessageMax)
- $("#conversations #" + this.getId() + " .message").slice(this.nbMessageMax, nbMessagesAffiche).empty()
var DOM = $(XHTML)
DOM.each(
)
DOM.prependTo("#conversations #" + this.getId())
+ // enlève les messages exedentaires
+ var nbMessagesAffiche = $("#conversations #" + this.getId() + " .message").size()
+ if (nbMessagesAffiche > this.nbMessageMax)
+ $("#conversations #" + this.getId() + " .message").slice(this.nbMessageMax, nbMessagesAffiche).remove()
+
if (this.messages.length > 0)
this.idDernierMessageAffiche = this.messages[this.messages.length-1].id
}
function(num) // insertion du lien vers la conversation
{
thisPage.util.replaceSelection(
- $("form input.message")[0],
+ $("form#posterMessage input.message")[0],
"{" + thisMessages.client.conversations[num-1].root.toString(36) + "}"
)
}
var largeurPourcent = (100 / this.conversations.length) \r
// le "- 0.01" evite que IE se chie dessus lamentablement et affiche les conversations les unes au dessus des autres\r
if($.browser["msie"])\r
- largeurPourcent -= 0.01
+ largeurPourcent -= 0.05
$("#conversations .conversation").css("width", largeurPourcent + "%")
}
if (vider)
for (var i = 0; i < this.conversations.length; i++)
this.conversations[i].idDernierMessageAffiche = 0
-
+
this.pageEvent.waitEvent(
function() { return thisMessages.getJSONrafraichirMessages() },
function(data)
- {
+ {
if (vider)
{
thisMessages.viderMessages()
$("#trollCourant .troll a[@rel*=lightbox]").lightBox()
break
- case "new_messages" :
+ case "new_messages" :
// ajoute les messages reçus à leur conversation respective
for (var numConv = 0; numConv < data["conversations"].length; numConv++)
{