- // suppression de la conversation
- if (funFermer != undefined)
- jQuery("#conversations #" + this.getId() + " .titre .fermer").click(
- function()
- {
- funFermer(thisConversation.num)
- }
- )
+ jQuery("#conversations #" + this.getId() + " .titre .lien").click(
+ function()
+ {
+ fun(thisConversation.num)
+ }
+ )
+}
+
+/**
+ * Evenement déclanché lors de la fermeture de la conversation.
+ */
+Conversation.prototype.eventFermer = function(fun)
+{
+ var thisConversation = this
+
+ jQuery("#conversations #" + this.getId() + " .titre .fermer").click(
+ function()
+ {
+ fun(thisConversation.num)
+ }
+ )
+}
+
+/**
+ * @funNext appelé lorsque l'on passe à la page suivante (de 2 à 1 par exemple)
+ * @funPrev appelé lorsque l'on passe à la page précédente (de 1 à 2 par exemple)
+ * @funReset appelé lorsque l'on souhaite revenir à la page une
+ */
+Conversation.prototype.setFunPage = function(funNext, funPrev, funReset)
+{
+ var thisConversation = this
+
+ jQuery("#conversations #" + this.getId() + " .next").click(
+ function() { funNext(thisConversation.num) }
+ )
+ jQuery("#conversations #" + this.getId() + " .prev").click(
+ function() { funPrev(thisConversation.num) }
+ )
+ jQuery("#conversations #" + this.getId() + " .numPage").click(
+ function() { funReset(thisConversation.num) }
+ )