MOD french -> english (6)
[euphorik.git] / js / pageAdmin.js
index 9ed847e..f94f9ab 100644 (file)
 /*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;
 };
 
@@ -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() {
                '</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.traitementComplet(user.nick) + '</span>' +
+                  (user.login === "" ? "" : '<span class="login">(' + thisPageAdmin.formater.traitementComplet(user.login) + ')</span>');
             });
             XHTML += '<span class="deban">débannir</span></div>';
          });
@@ -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 +=
          '<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.traitementComplet(troll.content, troll.author) + '</span>' +
+         '<span class="author"> - ' + thisTrolls.formater.traitementComplet(troll.author) + '</span>' +
          (trollData.author_id === thisTrolls.client.id ? '<span class="editTroll">éditer</span><span class="delTroll">Supprimer</span>' : '') +
          '</div>';
    });
@@ -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,
                   {
@@ -305,7 +305,7 @@ euphorik.Trolls.prototype.ajouterTrollEvent = function(data) {
 
 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.traitementComplet(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;
 };