X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;ds=sidebyside;f=js%2FpageMinichat%2FpageMinichat.js;h=333d22db9b8dbef08a490975054f33400f9ff7b7;hb=e6475e1885c0a0f102387c01e9bcb78ac09b4ef8;hp=1213cab224324a0a0a817ac151cb3b13225741b9;hpb=904f2d76c25b7fd04b1f90dfa095c7bf0f8c7ce5;p=euphorik.git
diff --git a/js/pageMinichat/pageMinichat.js b/js/pageMinichat/pageMinichat.js
index 1213cab..333d22d 100755
--- a/js/pageMinichat/pageMinichat.js
+++ b/js/pageMinichat/pageMinichat.js
@@ -50,7 +50,7 @@ PageMinichat.prototype.contenu = function()
//var messagesXHTML = '
'
var conversationXHTML = ''
- if (this.client.chatOrder == "reverse")
+ if (this.client.chatOrder === "reverse")
return trollXHTML + formulaireXHTML + conversationXHTML
else
return trollXHTML + conversationXHTML + formulaireXHTML
@@ -58,7 +58,7 @@ PageMinichat.prototype.contenu = function()
PageMinichat.prototype.classes = function()
{
- return this.client.chatOrder == "reverse" ? "orderReverse" : "orderChrono"
+ return this.client.chatOrder === "reverse" ? "orderReverse" : "orderChrono"
}
PageMinichat.prototype.charger = function()
@@ -159,7 +159,7 @@ PageMinichat.prototype.charger = function()
$("form").keypress(
function(e)
{
- if (e.which == 13) // return
+ if (e.which === 13) // return
nouveauMessage()
}
)
@@ -173,7 +173,7 @@ PageMinichat.prototype.charger = function()
function()
{
var input = $("input.pseudo")[0]
- if (input.value == euphorik.conf.pseudoDefaut)
+ if (input.value === euphorik.conf.pseudoDefaut)
input.value = ""
}
)
@@ -208,14 +208,14 @@ PageMinichat.prototype.envoyerMessage = function(pseudo, message)
// (un pseudo vide est autorisé)
pseudo = this.formateur.filtrerInputPseudo(pseudo)
- if (pseudo == euphorik.conf.nickDefaut)
+ if (pseudo === euphorik.conf.nickDefaut)
{
this.util.messageDialogue("Le pseudo ne peut pas être " + euphorik.conf.nickDefaut)
return
}
message = message.trim()
- if (message == "")
+ if (!message)
{
this.util.messageDialogue("Le message est vide")
return
@@ -251,7 +251,7 @@ PageMinichat.prototype.envoyerMessage = function(pseudo, message)
},
success : function(data, textStatus)
{
- if(data["reply"] == "ok")
+ if(data["reply"] === "ok")
{
// met à jour la classe des messages auquel repond celui ci (c'est un peu de la triche) TODO : ya mieux ?
for (var messId in thisPageMinichat.conversations.messagesRepond)
@@ -269,7 +269,7 @@ PageMinichat.prototype.envoyerMessage = function(pseudo, message)
$("form input.message").val("")
thisPageMinichat.conversations.enleverMessagesRepond()
}
- else if (data["reply"] == "error")
+ else if (data["reply"] === "error")
{
thisPageMinichat.util.messageDialogue(data["error_message"])
}