$("#posterMessage input.pseudo").val(this.client.pseudo);
// cet appel ne doit pas être fait avant l'appel à 'charger'
- this.conversations = new euphorik.Conversations(this.client, this.formateur, this.util);
+ this.conversations = new euphorik.Conversations(this.client, this.formateur, this.util, this.fragment);
- this.conversations.rafraichirMessages(true);
+ this.chargerConversationsFragment();
+
+ this.conversations.rafraichirMessages(true);
this.util.setCaretToEnd($("form#posterMessage input.message")[0]);
);
};
+euphorik.PageMinichat.prototype.chargerConversationsFragment = function() {
+ var thisPageMinichat = this;
+
+ // attention : "conv" doit être un tableau d'entier
+ try {
+ var conv = this.fragment.getVal("conv");
+ if (conv) {
+ conv.each(function(i, racine) {
+ thisPageMinichat.client.ajouterConversation(racine)
+ });
+ }
+ } catch(e) {
+ ;; console.log(e)
+ }
+}
+
euphorik.PageMinichat.prototype.decharger = function() {
this.conversations.comet.stopAttenteCourante();
$("body #smiles").remove();
+
+ this.fragment.delVal("conv")
};
+
euphorik.PageMinichat.prototype.getJSONMessage = function(pseudo, message) {
var repondA = [];
objectEach(this.conversations.messagesRepond, function(id) {