'formater' -> 'formatter'
[euphorik.git] / js / pageMinichat.js
index 13f3375..4068222 100755 (executable)
 
 /*jslint laxbreak:true */
 
-euphorik.PageMinichat = function(client, formater, util, communication) {
+euphorik.PageMinichat = function(client, formatter, util, communication) {
    this.name = "minichat";
 
    this.client = client;
-   this.formater = formater;
+   this.formatter = formatter;
    this.util = util;
    this.communication = communication;
-   this.commandes = new euphorik.Commandes(this.client, this, this.util, this.formater);
+   this.commandes = new euphorik.Commandes(this.client, this, this.util, this.formatter);
 
    // permet d'éviter d'envoyer plusieurs messages simultanément en pressant
    // rapidement sur "enter" par exemple
@@ -65,7 +65,7 @@ euphorik.PageMinichat.prototype.charger = function() {
    $("#posterMessage input.nick").val(this.client.nick);
 
    // cet appel ne doit pas être fait avant l'appel à 'charger'
-   this.conversations = new euphorik.Conversations(this.client, this.formater, this.util, this.communication, this.fragment);
+   this.conversations = new euphorik.Conversations(this.client, this.formatter, this.util, this.communication, this.fragment);
 
    this.chargerConversationsFragment();
 
@@ -118,12 +118,12 @@ euphorik.PageMinichat.prototype.charger = function() {
    // <smiles>
    $("body").append('<div id="smiles"></div>');
    // affichage des smiles
-   $("#smiles").append(this.formater.getSmilesHTML()).children().each(
+   $("#smiles").append(this.formatter.getSmilesHTML()).children().each(
       function(i) {
          var opacityBase = $(this).css("opacity");
          $(this).click(
             function() {
-               thisPage.util.replaceSelection($("form#posterMessage input.message")[0], thisPage.formater.smiles[$(this).attr("class")][0].source.replace(/\\/g, ""));
+               thisPage.util.replaceSelection($("form#posterMessage input.message")[0], thisPage.formatter.smiles[$(this).attr("class")][0].source.replace(/\\/g, ""));
             }
          ).hover(
             function() { $(this).animate({opacity: 1}, 200); },
@@ -227,7 +227,7 @@ euphorik.PageMinichat.prototype.envoyerMessage = function(message) {
    var nick = $("form#posterMessage input.nick").val();
 
    // (un nick vide est autorisé)
-   nick = this.formater.formatNick(nick);
+   nick = this.formatter.formatNick(nick);
 
    if (nick === euphorik.conf.defaultNick) {
       this.util.messageDialog("Choose a nickname");