X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2FpageAdmin.js;h=7a937d75e311ee5057d84dae483c5a5bf01ce54c;hb=87988321a3f12bc717451f12ddd62e93221a74d4;hp=9ed847e64530e2e43129a029051e171793342d6a;hpb=85dc0facbc2b2de826978fac3768db7949a6b92f;p=euphorik.git diff --git a/js/pageAdmin.js b/js/pageAdmin.js index 9ed847e..7a937d7 100644 --- a/js/pageAdmin.js +++ b/js/pageAdmin.js @@ -21,17 +21,17 @@ /*jslint laxbreak:true */ -euphorik.PageAdmin = function(client, formateur, util, communication) { +euphorik.PageAdmin = function(client, formater, util, communication) { this.nom = "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; }; @@ -62,7 +62,7 @@ euphorik.PageAdmin.prototype.charger = function() { 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(); @@ -99,7 +99,7 @@ euphorik.PageAdmin.prototype.posterTroll = function() { content = content.trim(); if (content === "") { - this.util.messageDialogue("Le troll est vide"); + this.util.messageDialog("Le troll est vide"); return; } @@ -134,8 +134,8 @@ euphorik.PageAdmin.prototype.majIPs = function() { '|'; ip.users.each(function(j, user) { XHTML += (j > 0 ? ", " : "") + - '' + thisPageAdmin.formateur.traitementComplet(user.nick) + '' + - (user.login === "" ? "" : '(' + thisPageAdmin.formateur.traitementComplet(user.login) + ')'); + '' + thisPageAdmin.formater.traitementComplet(user.nick) + '' + + (user.login === "" ? "" : '(' + thisPageAdmin.formater.traitementComplet(user.login) + ')'); }); XHTML += 'débannir'; }); @@ -150,7 +150,7 @@ euphorik.PageAdmin.prototype.majIPs = function() { 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); }, @@ -195,7 +195,7 @@ euphorik.PageAdmin.prototype.waitEvent = function() { "banned_ips_refresh" : function(data){ thisPageAdmin.majIPs(); }, "error" : function(data) { - thisTrolls.util.messageDialogue(data.error_message); + thisTrolls.util.messageDialog(data.error_message); } } ); @@ -213,10 +213,10 @@ euphorik.Troll = function(content, author) { /////////////////////////////////////////////////////////////////////////////////////////////////// -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; @@ -234,8 +234,8 @@ euphorik.Trolls.prototype.ajouterTrollEvent = function(data) { XHTML += '