X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2FpageAdmin.js;h=f94f9ab4dc396ac7f50a17468c40b2609c62e9d0;hp=9ce1620fe7b4ffe974bacbec8b97d1c63a64d138;hb=24ed7a141aa345454300dd260bbabae3a9f92408;hpb=09608ab29e1c39ea51b51a5f8669dcde36efb306 diff --git a/js/pageAdmin.js b/js/pageAdmin.js index 9ce1620..f94f9ab 100644 --- a/js/pageAdmin.js +++ b/js/pageAdmin.js @@ -22,16 +22,16 @@ euphorik.PageAdmin = function(client, formater, util, communication) { - this.nom = "admin"; + this.name = "admin"; this.client = client; - this.formater = 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; }; @@ -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,7 +134,7 @@ euphorik.PageAdmin.prototype.majIPs = function() { '|'; ip.users.each(function(j, user) { XHTML += (j > 0 ? ", " : "") + - '' + thisPageAdmin.formater.traitementComplet(user.nick) + '' + + '' + 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); } } ); @@ -257,7 +257,7 @@ euphorik.Trolls.prototype.ajouterTrollEvent = function(data) { $(".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, {