/**\r
* Représente l'ensemble des conversations affichés.\r
*/\r
-euphorik.Conversations = function(client, formateur, util, fragment) {\r
+euphorik.Conversations = function(client, formater, util, fragment) {\r
this.client = client;\r
- this.formateur = formateur;\r
+ this.formater = formater;\r
this.util = util;\r
this.fragment = fragment;\r
\r
euphorik.Conversations.prototype.mettreAJourFragment = function() {\r
conv = [];\r
for(var i = 1; i < this.conversations.length; i++) {\r
- conv.push(this.conversations[i].racine.id)\r
+ conv.push(this.conversations[i].racine.id);\r
}\r
this.fragment.setVal("conv", conv);\r
this.fragment.write();\r
-}\r
+};\r
\r
/**\r
* Enlève tous les messages auquel l'utilisateur souhaite répondre.\r
};\r
\r
euphorik.Conversations.prototype.getJSONConversations = function() {\r
- var thisConversations = this\r
+ var thisConversations = this;\r
var clientConv = [];\r
\r
this.client.conversations.each(function(i, conv) {\r
var message = \r
new euphorik.Message(\r
this.client,\r
- this.formateur,\r
+ this.formater,\r
element\r
);\r
\r
conv.idDernierMessageAffiche = 0;\r
});\r
}\r
+
+ thisConversations.util.showWaitBar(); // pour faire patienter le user :)
\r
this.comet.waitEvent(\r
function() { return thisConversations.getJSONrafraichirMessages(); },\r
"new_troll" :\r
function(data) {\r
thisConversations.trollIdCourant = data.troll_id;\r
- $("#trollCourant .troll").html(thisConversations.formateur.traitementComplet(data.content)).unbind("click").click(\r
+ $("#trollCourant .troll").html(thisConversations.formater.traitementComplet(data.content)).unbind("click").click(\r
function() {\r
thisConversations.ouvrirConversation(data.message_id);\r
}\r
$("#trollCourant .troll a[@rel*=lightbox]").lightBox();\r
},\r
"new_messages" :\r
- function(data) {\r
+ function(data) {
+ \r
if (vider) {\r
thisConversations.viderMessages();\r
}\r
thisConversations.afficherMessagesRepondConversations();\r
}\r
\r
- vider = false;\r
+ vider = false;
+
+ thisConversations.util.hideWaitBar();\r
}\r
}\r
);\r