/*jslint laxbreak:true */
-euphorik.PageAdmin = function(client, formateur, util, communication) {
- this.nom = "admin";
+euphorik.PageAdmin = function(client, formater, util, communication) {
+ this.name = "admin";
this.client = client;
- this.formateur = formateur;
+ this.formater = formater;
this.util = util;
this.communication = communication;
- this.comet = new Comet("admin", euphorik.conf.versionProtocole);
+ this.comet = this.communication.createCometConnection("admin");
- // le timer qui rappelle periodiquement le rafraichissement des IP bannies
+ // a timer which will periodically refresh the banned IP list
this.timeoutIDmajIPs = null;
};
var thisPage = this;
// la liste des trolls proposés par les ekMasters
- this.trolls = new euphorik.Trolls(this.client, this.util, this.formateur, this.communication);
+ this.trolls = new euphorik.Trolls(this.client, this.util, this.formater, this.communication);
this.waitEvent();
content = content.trim();
if (content === "") {
- this.util.messageDialogue("Le troll est vide");
+ this.util.messageDialog("Le troll est vide");
return;
}
'</span>|';
ip.users.each(function(j, user) {
XHTML += (j > 0 ? ", " : "") +
- '<span class="pseudo">' + thisPageAdmin.formateur.traitementComplet(user.nick) + '</span>' +
- (user.login === "" ? "" : '<span class="login">(' + thisPageAdmin.formateur.traitementComplet(user.login) + ')</span>');
+ '<span class="nick">' + thisPageAdmin.formater.completeProcessing(user.nick) + '</span>' +
+ (user.login === "" ? "" : '<span class="login">(' + thisPageAdmin.formater.completeProcessing(user.login) + ')</span>');
});
XHTML += '<span class="deban">débannir</span></div>';
});
var ip = $(".ip", this).html();
$(".deban", this).click(
function() {
- thisPageAdmin.util.messageDialogue("Êtes-vous sur de vouloir débannir l'IP ''" + ip + "'' ?", euphorik.Util.messageType.question,
+ thisPageAdmin.util.messageDialog("Êtes-vous sur de vouloir débannir l'IP ''" + ip + "'' ?", euphorik.Util.messageType.question,
{"Oui" : function() {
thisPageAdmin.deban(ip);
},
"banned_ips_refresh" : function(data){ thisPageAdmin.majIPs(); },
"error" :
function(data) {
- thisTrolls.util.messageDialogue(data.error_message);
+ thisTrolls.util.messageDialog(data.error_message);
}
}
);
///////////////////////////////////////////////////////////////////////////////////////////////////
-euphorik.Trolls = function(client, util, formateur, communication) {
+euphorik.Trolls = function(client, util, formater, communication) {
this.client = client;
this.util = util;
- this.formateur = formateur;
+ this.formater = formater;
this.communication = communication;
this.dernierTroll = 0;
XHTML +=
'<div id="troll' + trollId + '" class="troll">' +
- '<span class="content">' + thisTrolls.formateur.traitementComplet(troll.content, troll.author) + '</span>' +
- '<span class="author"> - ' + thisTrolls.formateur.traitementComplet(troll.author) + '</span>' +
+ '<span class="content">' + thisTrolls.formater.completeProcessing(troll.content, troll.author) + '</span>' +
+ '<span class="author"> - ' + thisTrolls.formater.completeProcessing(troll.author) + '</span>' +
(trollData.author_id === thisTrolls.client.id ? '<span class="editTroll">éditer</span><span class="delTroll">Supprimer</span>' : '') +
'</div>';
});
$(".delTroll", this).click(
function() {
- thisTrolls.util.messageDialogue(
+ thisTrolls.util.messageDialog(
"Êtes-vous sur de vouloir supprimer le troll \"" + thisTrolls.trolls[id].content + "\" ?",
euphorik.Util.messageType.question,
{
euphorik.Trolls.prototype.modifierTrollEvent = function(data) {
var thisTrolls = this;
- $("#trolls #troll" + data.troll_id + " .content").html(thisTrolls.formateur.traitementComplet(data.content, thisTrolls.trolls[data.troll_id].author));
+ $("#trolls #troll" + data.troll_id + " .content").html(thisTrolls.formater.completeProcessing(data.content, thisTrolls.trolls[data.troll_id].author));
$("#trolls #troll" + data.troll_id + " a[@rel*=lightbox]").lightBox();
thisTrolls.trolls[data.troll_id].content = data.content;
};