<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>euphorik.ch</title>
- <link id="cssPrincipale" rel="stylesheet" href="css/1/euphorik.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="css/jquery.lightbox.css" type="text/css" media="screen" />
+ <link id="cssPrincipale" rel="stylesheet" href="css/1/euphorik.css" type="text/css" media="screen" ></link>
+ <link rel="stylesheet" href="css/jquery.lightbox.css" type="text/css" media="screen" ></link>
<script type="text/javascript" src="js/jquery.js" ></script>
<script type="text/javascript" src="js/jquery.lightbox.js"></script>
<script type="text/javascript" src="js/md5.js" ></script>
<div id="menu">
<div class="minichat">chat</div><div class="admin" style="display:none">admin</div><div class="profile"></div><div class="register">register</div><div class="logout">logout</div><div class="about">about</div>\r
</div>
- <form>
- <select id="menuCss">
- <option value="1" selected="selected">Dark</option>
- <option value="2">Cold</option>
- <option value="3">Classic</option>
- </select>
+ <form action="">
+ <p>
+ <select id="menuCss">
+ <option value="1" selected="selected">Dark</option>
+ <option value="2">Cold</option>
+ <option value="3">Classic</option>
+ </select>
+ </p>
</form>
<div id="page"></div>
<div id="footer"><a href="http://yaws.hyber.org"><img src="img/powered-by-yaws.gif" alt="powered by Yaws" /></a></div>
var XHTML = ""\r
for (var sNom in this.smiles)\r
{\r
- XHTML += "<img class=\"" + sNom + "\" src=\"img/smileys/" + sNom + ".gif\" />"\r
+ XHTML += "<img class=\"" + sNom + "\" src=\"img/smileys/" + sNom + ".gif\" alt =\"" + sNom + "\" />"\r
}\r
return XHTML\r
}\r
\r
/**\r
* FIXME : Cette méthode est attrocement lourde ! A optimiser.
- * moyenne su échantillon : 234ms\r
+ * moyenne sur échantillon : 234ms\r
*/
Formateur.prototype.traiterSmiles = function(M)
{
{
ss = this.smiles[sNom]
for (var i = 0; i < ss.length; i++)
- M = M.replace(ss[i], "<img src=\"img/smileys/" + sNom + ".gif\" />")
+ M = M.replace(ss[i], "<img src=\"img/smileys/" + sNom + ".gif\" alt =\"" + sNom + "\" />")
}
return M
}
{
$("body").append(
'<div id="outilsBan">' +
- '<form><p><input id="raison" name="raison" type="text" size="10" maxlength="200"></input></p></form>' +
+ '<form action=""><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" />' +
XHTMLrepondA = "<span class=\"repondA\">" + XHTMLrepondA + "</span>"
XHTML +=
- "<div id=\"" + message.id.toString(36) + "\" class=\"" + (messagePair ? "messagePair" : "messageImpair") + " message" +
+ "<div id=\"mess" + message.id.toString(36) + "\" class=\"" + (messagePair ? "messagePair" : "messageImpair") + " message" +
(this.messages[i].appartientAuClient ? " proprietaire" : "") +
(this.messages[i].clientARepondu ? " repondu" : "") +
(this.messages[i].estUneReponse ? " reponse" : "") +
"\">" +
"<div class=\"extraire\">></div>" +
"[<span class=\"date\">" + message.date + "</span>]" +
- "<span class=\"pseudo\" id=\"user" + message.auteurId + "\">" + identifiant + "</span>:" +
+ "<span class=\"pseudo\"><span class=\"id\" style=\"display: none\">" + message.auteurId + "</span>" + identifiant + "</span>:" +
XHTMLrepondA +
"<span class=\"contenu\">" + (message.systeme ? this.formateur.remplacerBalisesHTML(message.contenu) : this.formateur.traitementComplet(message.contenu, message.pseudo)) + "</span>" +
"</div>"
$("#conversations #" + this.getId() + " .message").slice(this.nbMessageMax, nbMessagesAffiche).empty()
// ajoute les événements liés à chaque nouveau message
- $("#conversations #" + this.getId() + " .message").filter(function(){return parseInt($(this).attr("id"), 36) > thisConversation.idDernierMessageAffiche}).each(
+ $("#conversations #" + this.getId() + " .message").filter(function(){return parseInt($(this).attr("id").substr(4), 36) > thisConversation.idDernierMessageAffiche}).each(
function()
{
$(".lienConv", this).click(
$(".pseudo", this).hover(
function(e)
{
- var userId = parseInt($(this).attr("id").substr(4))
+ var userId = parseInt($(".id", this).text())
var element = $(this)
var h = element.height()
var offset = element.offset()
if ($(event.target).is("a")) return
// l'id du message
- var idMess = $(this).attr("id")
+ var idMess = $(this).attr("id").substr(4)
// extraction d'une conversation
if ($(event.target).is(".extraire"))
Conversation.prototype.afficherConversation = function(element)
{
// cherche le message selectionné
- var id = parseInt($(element).attr("id"), 36)
+ var id = parseInt($(element).attr("id").substr(4), 36)
var message = this.messagesParId[id]
if (message == undefined) return
function()
{
var jq = $(this)
- if (!mess.hasOwnProperty(parseInt(jq.attr("id"), 36)))
+ if (!mess.hasOwnProperty(parseInt(jq.attr("id").substr(4), 36)))
jq.addClass("cache")
else
jq.removeClass("cache")