X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2FpageMinichat%2Fconversations.js;h=a63dcb993e00e994b8ddbb06d799c2af75adedd7;hb=09608ab29e1c39ea51b51a5f8669dcde36efb306;hp=94236c1d84adfd852d52b6aaea1d061a95e67090;hpb=8ee1535f5594573931ddaebee77bf6148a5358cb;p=euphorik.git diff --git a/js/pageMinichat/conversations.js b/js/pageMinichat/conversations.js index 94236c1..a63dcb9 100644 --- a/js/pageMinichat/conversations.js +++ b/js/pageMinichat/conversations.js @@ -21,9 +21,9 @@ /** * Représente l'ensemble des conversations affichés. */ -euphorik.Conversations = function(client, formateur, util, fragment) { +euphorik.Conversations = function(client, formater, util, fragment) { this.client = client; - this.formateur = formateur; + this.formater = formater; this.util = util; this.fragment = fragment; @@ -250,7 +250,7 @@ euphorik.Conversations.prototype.ajouterMessage = function(element, numConversat var message = new euphorik.Message( this.client, - this.formateur, + this.formater, element ); @@ -371,6 +371,8 @@ euphorik.Conversations.prototype.rafraichirMessages = function(vider) { conv.idDernierMessageAffiche = 0; }); } + + thisConversations.util.showWaitBar(); // pour faire patienter le user :) this.comet.waitEvent( function() { return thisConversations.getJSONrafraichirMessages(); }, @@ -378,7 +380,7 @@ euphorik.Conversations.prototype.rafraichirMessages = function(vider) { "new_troll" : function(data) { thisConversations.trollIdCourant = data.troll_id; - $("#trollCourant .troll").html(thisConversations.formateur.traitementComplet(data.content)).unbind("click").click( + $("#trollCourant .troll").html(thisConversations.formater.traitementComplet(data.content)).unbind("click").click( function() { thisConversations.ouvrirConversation(data.message_id); } @@ -387,7 +389,8 @@ euphorik.Conversations.prototype.rafraichirMessages = function(vider) { $("#trollCourant .troll a[@rel*=lightbox]").lightBox(); }, "new_messages" : - function(data) { + function(data) { + if (vider) { thisConversations.viderMessages(); } @@ -404,7 +407,9 @@ euphorik.Conversations.prototype.rafraichirMessages = function(vider) { thisConversations.afficherMessagesRepondConversations(); } - vider = false; + vider = false; + + thisConversations.util.hideWaitBar(); } } );