/*jslint laxbreak:true */
euphorik.PageMinichat = function(client, formater, util, communication) {
- this.nom = "minichat";
+ this.name = "minichat";
this.client = client;
this.formater = formater;
var nick = $("form#posterMessage input.nick").val();
// (un nick vide est autorisé)
- nick = this.formater.filtrerInputPseudo(nick);
+ nick = this.formater.formatNick(nick);
if (nick === euphorik.conf.defaultNick) {
this.util.messageDialog("Le nick ne peut pas ĂȘtre " + euphorik.conf.defaultNick);
return;
}
- this.client.nick = nick;
-
if (!this.client.authentifie()) {
if (!this.client.enregistrement()) {
this.util.messageDialog("login impossible");
}
this.envoieMessageEnCours = true;
+ this.client.nick = nick;
+
this.communication.requete(
"put_message",
- this.getJSONMessage(nick, message),
+ this.getJSONMessage(this.client.nick, message),
function() {
$("form#posterMessage input.message").val("");
thisPageMinichat.conversations.enleverMessagesRepond();