1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| function afficheCommentaires(msg, nbcomm, first, qte, membre, mur, langue)
{
$.ajax(
{
url: "ajax/show_comments.php",
global: false,
type: "POST",
data: ({
idMessage : msg,
nbcomm : nbcomm,
first : first,
quantite : qte,
idmembre : membre,
idmur : mur,
langue : langue
}),
dataType: "html",
async:true,
success: function(contenu)
{
var texte = '';
if(langue == 'fr')
{
texte = 'Masquer commentaire';
}
else if (langue == 'es')
{
texte = 'Enmascarar comentario';
}
else if (langue == 'en')
{
texte = 'Hide comment';
}
if(nbcomm > 1)
{
texte = texte + 's';
}
$("#linkAfficheComm" + msg).attr("href").replace(/affiche/i, "masque");
$("#linkAfficheComm" + msg).text(texte);
if($("#menuTOPplus").length == 0)
{
var lien = '<span class="menuSeparator">|</span>';
lien = lien + '<a id="menuTOPplus" class="menuTOP" href="javascript:masquerTousCommentaires()" > Masquer tout </a>';
$("#menu").append(lien);
}
$("#divComments" + msg).empty().append(contenu);
$("#divComments" + msg).show();
$("#sousMessage" + msg).show();
}
}
);
} |
Partager