4 * Contient la base javascript pour le site euphorik.ch.
5 * Chaque page possède son propre fichier js nommé "page<nom de la page>.js".
13 * Normalement 'const' à la place de 'var' mais non supporté par IE7.
16 nbMessageAffiche : 10, // (par page)
17 pseudoDefaut : "<nick>",
18 tempsAffichageMessageDialogue : 4000, // en ms
20 "smile" : [/:\)/g, /:-\)/g],
21 "bigsmile" : [/:D/g, /:-D/g],
22 "clin" : [/;\)/g, /;-\)/g],
23 "cool" : [/8\)/g, /8-\)/g],
24 "eheheh" : [/:P/g, /:-P/g],
25 "lol" : [/\[-lol\]/g],
26 "spliff" : [/\[-spliff\]/g],
27 "oh" : [/:o/g, /:O/g],
28 "heink" : [/\[-heink\]/g],
29 "hum" : [/\[-hum\]/g],
30 "boh" : [/\[-boh\]/g],
31 "sniff" : [/:\(/g, /:-\(/g],
32 "triste" : [/\[-triste\]/g],
33 "pascontent" : [/>\(/g, />\(/g],
34 "argn" : [/\[-argn\]/g],
35 "redface" : [/\[-redface\]/g],
36 "bunny" : [/\[-lapin\]/g],
37 "chat" : [/\[-chat\]/g],
38 "renne" : [/\[-renne\]/g],
39 "star" : [/\[-star\]/g],
40 "kirby" : [/\[-kirby\]/g],
41 "slurp" : [/\[-slurp\]/g],
42 "agreed" : [/\[-agreed\]/g],
43 "dodo" : [/\[-dodo\]/g],
48 ///////////////////////////////////////////////////////////////////////////////////////////////////
50 String
.prototype.trim = function()
52 return jQuery
.trim(this) // anciennement : this.replace(/^\s+|\s+$/g, "");
55 String
.prototype.ltrim = function()
57 return this.replace(/^\s+/, "");
60 String
.prototype.rtrim = function()
62 return this.replace(/\s+$/, "");
65 ///////////////////////////////////////////////////////////////////////////////////////////////////
68 * Cette classe regroupe des fonctions utilitaires (helpers).
72 $("#info .fermer").click(function(){
73 $("#info").slideUp(50)
78 * Affiche une boite de dialogue avec un message à l'intérieur.
79 * @param message le message (string)
80 * @param type voir 'messageType'. par défaut messageType.informatif
81 * @param les boutons sous la forme d'un objet ou les clefs sont les labels des boutons
82 * et les valeurs les fonctions executées lorsqu'un bouton est activé.
84 Util
.prototype.messageDialogue = function(message
, type
, boutons
)
86 if (type
== undefined)
87 type
= messageType
.informatif
89 if (this.timeoutMessageDialogue
!= undefined)
90 clearTimeout(this.timeoutMessageDialogue
)
92 var fermer = function(){$("#info").slideUp(100)}
95 $("#info .message").html(message
)
98 case messageType
.informatif : $("#info #icone").attr("class", "information"); break
99 case messageType
.question : $("#info #icone").attr("class", "interrogation"); break
100 case messageType
.erreur : $("#info #icone").attr("class", "exclamation"); break
102 $("#info .boutons").html("")
103 for (var b
in boutons
)
104 $("#info .boutons").append("<div>" + b
+ "</div>").find("div:last").click(boutons
[b
]).click(fermer
)
106 $("#info").slideDown(200)
107 this.timeoutMessageDialogue
= setTimeout(fermer
, conf
.tempsAffichageMessageDialogue
)
110 var messageType
= {informatif: 0, question: 1, erreur: 2}
113 * Utilisé pour l'envoie de donnée avec la méthode ajax de jQuery.
115 Util
.prototype.jsonVersAction = function(json
)
117 return {action : JSON
.stringify(json
) }
120 Util
.prototype.md5 = function(chaine
)
122 return hex_md5(chaine
)
125 // pompé de http://www.faqts.com/knowledge_base/view.phtml/aid/13562/fid/130
126 Util
.prototype.setSelectionRange = function(input
, selectionStart
, selectionEnd
)
128 if (input
.setSelectionRange
)
131 input
.setSelectionRange(selectionStart
, selectionEnd
)
133 else if (input
.createTextRange
)
135 var range
= input
.createTextRange()
137 range
.moveEnd('character', selectionEnd
)
138 range
.moveStart('character', selectionStart
)
143 Util
.prototype.setCaretToEnd = function(input
)
145 this.setSelectionRange(input
, input
.value
.length
, input
.value
.length
)
147 Util
.prototype.setCaretToBegin = function(input
)
149 this.setSelectionRange(input
, 0, 0)
151 Util
.prototype.setCaretToPos = function(input
, pos
)
153 this.setSelectionRange(input
, pos
, pos
)
155 Util
.prototype.selectString = function(input
, string
)
157 var match
= new RegExp(string
, "i").exec(input
.value
)
160 this.setSelectionRange (input
, match
.index
, match
.index
+ match
[0].length
)
163 Util
.prototype.replaceSelection = function(input
, replaceString
) {
164 if (input
.setSelectionRange
)
166 var selectionStart
= input
.selectionStart
167 var selectionEnd
= input
.selectionEnd
168 input
.value
= input
.value
.substring(0, selectionStart
) + replaceString
+ input
.value
.substring(selectionEnd
)
170 if (selectionStart
!= selectionEnd
) // has there been a selection
171 this.setSelectionRange(input
, selectionStart
, selectionStart
+ replaceString
.length
)
173 this.setCaretToPos(input
, selectionStart
+ replaceString
.length
)
175 else if (document
.selection
)
177 var range
= document
.selection
.createRange();
178 if (range
.parentElement() == input
)
180 var isCollapsed
= range
.text
== ''
181 range
.text
= replaceString
184 // there has been a selection
185 // it appears range.select() should select the newly
186 // inserted text but that fails with IE
187 range
.moveStart('character', -replaceString
.length
);
194 Util
.prototype.rot13 = function(chaine
)
196 var ACode
= 'A'.charCodeAt(0)
197 var aCode
= 'a'.charCodeAt(0)
198 var MCode
= 'M'.charCodeAt(0)
199 var mCode
= 'm'.charCodeAt(0)
200 var ZCode
= 'Z'.charCodeAt(0)
201 var zCode
= 'z'.charCodeAt(0)
203 var f = function(ch
, pos
) {
204 if (pos
== ch
.length
)
207 var c
= ch
.charCodeAt(pos
);
208 return String
.fromCharCode(
210 (c
>= ACode
&& c
<= MCode
|| c
>= aCode
&& c
<= mCode
? 13 :
211 (c
> MCode
&& c
<= ZCode
|| c
> mCode
&& c
<= zCode
? -13 : 0))
217 ///////////////////////////////////////////////////////////////////////////////////////////////////
221 this.pageCourante
= null
225 Pages
.prototype.ajouterPage = function(page
)
227 page
.pages
= this // la magie des langages dynamiques : le foutoire
228 this.pages
[page
.nom
] = page
231 Pages
.prototype.afficherPage = function(nomPage
, forcerChargement
)
233 if (forcerChargement
== undefined) forcerChargement
= false
235 var page
= this.pages
[nomPage
]
236 if (page
== undefined || (!forcerChargement
&& page
== this.pageCourante
)) return
238 if (this.pageCourante
!= null && this.pageCourante
.decharger
)
239 this.pageCourante
.decharger()
241 $("#menu div").removeClass("courante")
242 $("#menu div." + nomPage
).addClass("courante")
244 this.pageCourante
= page
245 $("#page").html(this.pageCourante
.contenu()).removeClass().addClass(this.pageCourante
.nom
)
247 if (this.pageCourante
.charger
)
248 this.pageCourante
.charger()
251 ///////////////////////////////////////////////////////////////////////////////////////////////////
255 this.smiles
= conf
.smiles
256 this.protocoles
= "http|https|ed2k"
258 this.regexUrl
= new RegExp("(?:(?:" + this.protocoles
+ ")://|www\\.)[^ ]*", "gi")
259 this.regexImg
= new RegExp("^.*?\\.(gif|jpg|png|jpeg|bmp|tiff)$", "i")
260 this.regexDomaine
= new RegExp("^(?:(?:" + this.protocoles
+ ")://|www\\.).*?([^/.]+\\.[^/.]+)(?:$|/).*$", "i")
261 this.regexTestProtocoleExiste
= new RegExp("^(?:" + this.protocoles
+ ")://.*$", "i")
262 this.regexNomProtocole
= new RegExp("^(.*?)://")
266 * Formate un pseudo saise par l'utilisateur.
267 * @param pseudo le pseudo brut
268 * @return le pseudo filtré
270 Formateur
.prototype.filtrerInputPseudo = function(pseudo
)
272 return pseudo
.replace(/{|}/g, "").trim()
275 Formateur
.prototype.getSmilesHTML = function()
278 for (var sNom
in this.smiles
)
280 XHTML
+= "<img class=\"" + sNom
+ "\" src=\"img/smileys/" + sNom
+ ".gif\" />"
285 Formateur
.prototype.traitementComplet = function(M
, pseudo
)
287 return this.traiterLiensConv(this.traiterSmiles(this.traiterURL(this.remplacerBalisesHTML(M
), pseudo
)))
291 * Transforme les liens en entités clickables.
292 * Un lien vers une conversation permet d'ouvrire celle ci, elle se marque comme ceci dans un message :
293 * "{5F}" ou 5F est la racine de la conversation.
294 * Ce lien sera transformer en <span class="lienConv">{5F}</span> pouvant être clické pour créer la conv 5F.
296 Formateur
.prototype.traiterLiensConv = function(M
)
302 return "<span class=\"lienConv\">" + lien
+ "</span>"
308 * FIXME : Cette méthode est attrocement lourde ! A optimiser.
309 * moyenne su échantillon : 234ms
311 Formateur
.prototype.traiterSmiles = function(M
)
313 for (var sNom
in this.smiles
)
315 ss
= this.smiles
[sNom
]
316 for (var i
= 0; i
< ss
.length
; i
++)
317 M
= M
.replace(ss
[i
], "<img src=\"img/smileys/" + sNom
+ ".gif\" />")
322 Formateur
.prototype.remplacerBalisesHTML = function(M
)
324 return M
.replace(/</g
, "<").replace(/>/g
, ">")
327 Formateur
.prototype.traiterURL = function(M
, pseudo
)
331 if (pseudo
== undefined)
334 var traitementUrl = function(url
)
336 // si ya pas de protocole on rajoute "http://"
337 if (!thisFormateur
.regexTestProtocoleExiste
.test(url
))
338 url
= "http://" + url
339 var extension
= thisFormateur
.getShort(url
)
340 return "<a " + (extension
[1] ? "title=\"" + thisFormateur
.traiterPourFenetreLightBox(pseudo
, url
) + ": " + thisFormateur
.traiterPourFenetreLightBox(M
, url
) + "\"" + " rel=\"lightbox\"" : "") + " href=\"" + url
+ "\" >[" + extension
[0] + "]</a>"
342 return M
.replace(this.regexUrl
, traitementUrl
)
346 * Renvoie une version courte de l'url.
347 * par exemple : http://en.wikipedia.org/wiki/Yakov_Smirnoff devient wikipedia.org
349 Formateur
.prototype.getShort = function(url
)
351 var estUneImage
= false
352 var versionShort
= null
353 var rechercheImg
= this.regexImg
.exec(url
)
355 if (rechercheImg
!= null)
357 versionShort
= rechercheImg
[1].toLowerCase()
358 if (versionShort
== "jpeg") versionShort
= "jpg" // jpeg -> jpg
363 var rechercheDomaine
= this.regexDomaine
.exec(url
)
364 if (rechercheDomaine
!= null && rechercheDomaine
.length
>= 2)
365 versionShort
= rechercheDomaine
[1]
368 var nomProtocole
= this.regexNomProtocole
.exec(url
)
369 if (nomProtocole
!= null && nomProtocole
.length
>= 2)
370 versionShort
= nomProtocole
[1]
374 return [versionShort
== null ? "url" : versionShort
, estUneImage
]
378 * Traite les pseudo et messages à être affiché dans le titre d'une image visualisé avec lightbox.
380 Formateur
.prototype.traiterPourFenetreLightBox = function(M
, urlCourante
)
383 var traitementUrl = function(url
)
385 return "[" + thisFormateur
.getShort(url
)[0] + (urlCourante
== url
? ": image courante" : "") + "]"
388 return this.remplacerBalisesHTML(M
).replace(this.regexUrl
, traitementUrl
)
392 ///////////////////////////////////////////////////////////////////////////////////////////////////
394 // les statuts possibes du client
396 // mode enregistré, peut poster des messages et modifier son profile
398 // mode identifié, peut poster des messages mais n'a pas accès au profile
399 auth_not_registered : 1,
400 // mode déconnecté, ne peut pas poster de message
404 function Client(util
)
409 this.regexCookie
= new RegExp("^cookie=([^;]*)")
411 // données personnels
412 this.resetDonneesPersonnelles()
414 this.setStatut(statutType
.deconnected
)
416 // le dernier message d'erreur recut du serveur (par exemple une connexion foireuse : "login impossible")
417 this.dernierMessageErreur
= ""
420 Client
.prototype.resetDonneesPersonnelles = function()
422 this.pseudo
= conf
.pseudoDefaut
426 this.css
= $("link#cssPrincipale").attr("href")
427 this.nickFormat
= "nick"
429 this.pagePrincipale
= 1
430 this.ekMaster
= false
432 // les conversations, une conversation est un objet possédant les attributs suivants :
435 this.conversations
= new Array()
438 Client
.prototype.setCss = function(css
)
440 if (this.css
== css
|| css
== "")
444 $("link#cssPrincipale").attr("href", this.css
)
448 Client
.prototype.pageSuivante = function(numConv
)
450 if (numConv
< 0 && this.pagePrincipale
> 1)
451 this.pagePrincipale
-= 1
452 else if (this.conversations
[numConv
].page
> 1)
453 this.conversations
[numConv
].page
-= 1
456 Client
.prototype.pagePrecedente = function(numConv
)
459 this.pagePrincipale
+= 1
461 this.conversations
[numConv
].page
+= 1
465 * Définit la première page pour la conversation donnée.
466 * @return true si la page a changé sinon false
468 Client
.prototype.goPremierePage = function(numConv
)
472 if (this.pagePrincipale
== 1)
474 this.pagePrincipale
= 1
478 if (this.conversations
[numConv
].page
== 1)
480 this.conversations
[numConv
].page
= 1
486 * Ajoute une conversation à la vue de l'utilisateur.
487 * Le profile de l'utilisateur est directement sauvegardé sur le serveur.
488 * @param racines la racine de la conversation (integer)
489 * @return true si la conversation a été créée sinon false (par exemple si la conv existe déjà)
491 Client
.prototype.ajouterConversation = function(racine
)
493 // vérification s'il elle n'existe pas déjà
494 for (var i
= 0; i
< this.conversations
.length
; i
++)
495 if (this.conversations
[i
].root
== racine
)
498 this.conversations
.push({root : racine
, page : 1})
502 Client
.prototype.supprimerConversation = function(num
)
504 if (num
< 0 || num
>= this.conversations
.length
) return
506 // décalage TODO : supprimer le dernier élément
507 for (var i
= num
; i
< this.conversations
.length
- 1; i
++)
508 this.conversations
[i
] = this.conversations
[i
+1]
509 this.conversations
.pop()
512 Client
.prototype.getJSONLogin = function(login
, password
)
515 "action" : "authentification",
517 "password" : password
521 Client
.prototype.getJSONLoginCookie = function()
524 "action" : "authentification",
525 "cookie" : this.cookie
530 * le couple (login, password) est facultatif. S'il n'est pas fournit alors il ne sera pas possible
531 * de s'autentifier avec (login, password).
533 Client
.prototype.getJSONEnregistrement = function(login
, password
)
535 var mess
= { "action" : "register" }
537 if (login
!= undefined && password
!= undefined)
539 mess
["login"] = login
540 mess
["password"] = password
546 Client
.prototype.getJSONConversations = function()
548 var conversations
= new Array()
549 for (var i
= 0; i
< this.conversations
.length
; i
++)
550 conversations
.push({ "root" : this.conversations
[i
].root
, "page" : this.conversations
[i
].page
})
554 Client
.prototype.getJSONProfile = function()
557 "action" : "set_profile",
558 "cookie" : this.cookie
,
559 "login" : this.login
,
560 "password" : this.password
,
561 "nick" : this.pseudo
,
562 "email" : this.email
,
564 "nick_format" : this.nickFormat
,
565 "main_page" : this.pagePrincipale
< 1 ? 1 : this.pagePrincipale
,
566 "conversations" : this.getJSONConversations()
571 * Renvoie null si pas définit.
573 Client
.prototype.getCookie = function()
575 var cookie
= this.regexCookie
.exec(document
.cookie
)
576 if (cookie
== null) this.cookie
= null
577 else this.cookie
= cookie
[1]
580 Client
.prototype.delCookie = function()
582 document
.cookie
= "cookie=; max-age=0"
585 Client
.prototype.setCookie = function(cookie
)
587 if (this.cookie
== null)
591 "cookie="+this.cookie
+
592 "; max-age=" + (60 * 60 * 24 * 365)
595 Client
.prototype.authentifie = function()
597 return this.statut
== statutType
.auth_registered
|| this.statut
== statutType
.auth_not_registered
600 Client
.prototype.setStatut = function(statut
)
602 // conversation en "enum" si en "string"
603 if (typeof(statut
) == "string")
606 statut
== "auth_registered" ?
607 statutType
.auth_registered :
608 (statut
== "auth_not_registered" ? statutType
.auth_not_registered : statutType
.deconnected
)
611 if (statut
== this.statut
) return
618 * Effectue la connexion vers le serveur.
619 * Cette fonction est bloquante tant que la connexion n'a pas été établie.
620 * S'il existe un cookie en local on s'authentifie directement avec lui.
621 * Si il n'est pas possible de s'authentifier alors on affiche un captcha anti-bot.
623 Client
.prototype.connexionCookie = function()
626 if (this.cookie
== null) return false;
627 return this.connexion(this.getJSONLoginCookie())
630 Client
.prototype.connexionLogin = function(login
, password
)
632 return this.connexion(this.getJSONLogin(login
, password
))
635 Client
.prototype.enregistrement = function(login
, password
)
637 if (this.authentifie())
640 this.password
= password
642 this.setStatut(statutType
.auth_registered
)
647 return this.connexion(this.getJSONEnregistrement(login
, password
))
651 Client
.prototype.connexion = function(messageJson
)
653 ;;; dumpObj(messageJson
)
661 data: this.util
.jsonVersAction(messageJson
),
666 thisClient
.chargerDonnees(data
)
670 return this.authentifie()
673 Client
.prototype.deconnexion = function()
677 this.setStatut(statutType
.deconnected
) // deconnexion
678 this.resetDonneesPersonnelles()
681 Client
.prototype.chargerDonnees = function(data
)
683 // la modification du statut qui suit met à jour le menu, le menu dépend (page admin)
684 // de l'état ekMaster
685 this.ekMaster
= data
["ek_master"] != undefined ? data
["ek_master"] : false
687 this.setStatut(data
["status"])
689 if (this.authentifie())
691 this.cookie
= data
["cookie"]
694 this.login
= data
["login"]
695 this.pseudo
= data
["nick"]
696 this.email
= data
["email"]
697 this.setCss(data
["css"])
698 this.nickFormat
= data
["nick_format"]
700 // la page de la conversation principale
701 this.pagePrincipale
= data
["main_page"] == undefined ? 1 : data
["main_page"]
704 this.conversations
= data
["conversations"]
706 this.dernierMessageErreur
= data
["error_message"]
710 * Met à jour les données personne sur serveur.
711 * @param async de manière asynchrone ? défaut = true
712 * @return false si le flush n'a pas pû se faire sinon true
714 Client
.prototype.flush = function(async
)
716 if (async
== undefined)
719 if (!this.authentifie())
723 ;;; dumpObj(this.getJSONProfile())
730 data: this.util
.jsonVersAction(this.getJSONProfile()),
734 //thisClient.util.log(thisClient.util.serializer.serializeToString(data))
738 // TODO : retourner false si un problème est survenu lors de l'update du profile
742 Client
.prototype.majMenu = function()
744 // TODO : à virer : ne plus changer de style de display ... spa beau .. ou trouver une autre méthode
745 var displayType
= this.css
== "css/3/euphorik.css" ? "block" : "inline" //this.client
747 $("#menu .admin").css("display", this.ekMaster
? "inline" : "none")
749 // met à jour le menu
750 if (this.statut
== statutType
.auth_registered
)
752 $("#menu .profile").css("display", displayType
).text("profile")
753 $("#menu .logout").css("display", displayType
)
754 $("#menu .register").css("display", "none")
756 else if (this.statut
== statutType
.auth_not_registered
)
758 $("#menu .profile").css("display", "none")
759 $("#menu .logout").css("display", displayType
)
760 $("#menu .register").css("display", displayType
)
764 $("#menu .profile").css("display", displayType
).text("login")
765 $("#menu .logout").css("display", "none")
766 $("#menu .register").css("display", displayType
)
770 Client
.prototype.slap = function(userId
, raison
)
772 var thisClient
= this
778 data: this.util
.jsonVersAction(
781 "cookie" : thisClient
.cookie
,
788 if (data
["reply"] == "error")
789 thisClient
.util
.messageDialogue(data
["error_message"])
794 Client
.prototype.ban = function(userId
, raison
, minutes
)
796 var thisClient
= this
798 // par défaut un ban correspond à 3 jours
799 if (typeof(minutes
) == "undefined")
800 minutes
= 60 * 24 * 3
806 data: this.util
.jsonVersAction(
809 "cookie" : thisClient
.cookie
,
810 "duration" : minutes
,
817 if (data
["reply"] == "error")
818 thisClient
.util
.messageDialogue(data
["error_message"])
823 Client
.prototype.kick = function(userId
, raison
)
825 this.ban(userId
, raison
, 15)
828 ///////////////////////////////////////////////////////////////////////////////////////////////////
831 * classe permettant de gérer les événements (push serveur).
834 function PageEvent(page
, util
)
839 // l'objet JSONHttpRequest représentant la connexion d'attente
840 this.attenteCourante
= null
844 * Arrête l'attente courante s'il y en a une.
846 PageEvent
.prototype.stopAttenteCourante = function()
848 if (this.attenteCourante
!= null)
849 this.attenteCourante
.abort()
853 * Attend un événement lié à la page.
854 * @funSend une fonction renvoyant les données json à envoyer
855 * @funReceive une fonction qui accepte un paramètre correspondant au données reçues
857 PageEvent
.prototype.waitEvent = function(funSend
, funReceive
)
859 var thisPageEvent
= this
861 this.stopAttenteCourante()
863 // on doit conserver l'ordre des valeurs de l'objet JSON (le serveur les veux dans l'ordre définit dans le protocole)
864 // TODO : ya pas mieux ?
867 "action" : "wait_event",
870 var poulpe
= funSend()
872 dataToSend
[v
] = poulpe
[v
]
874 ;;; dumpObj(dataToSend
)
875 this.attenteCourante
= jQuery
.ajax({
879 data: this.util
.jsonVersAction(dataToSend
),
887 // rappel de la fonction dans 100 ms
888 setTimeout(function(){ thisPageEvent
.waitEvent(funSend
, funReceive
) }, 100);
891 function(XMLHttpRequest
, textStatus
, errorThrown
)
893 setTimeout(function(){ thisPageEvent
.rafraichirMessages(funSend
, funReceive
) }, 1000);
899 ///////////////////////////////////////////////////////////////////////////////////////////////////
901 function initialiserListeStyles(client
)
903 $("#menuCss").change(
906 client
.setCss("css/" + $("option:selected", this).attr("value") + "/euphorik.css")
911 // charge dynamiquement le script de debug
912 ;;; jQuery
.ajax({async : false, url : "js/debug.js", dataType : "script"})
918 var util
= new Util()
919 var client
= new Client(util
)
920 var pages
= new Pages()
921 var formateur
= new Formateur()
923 // connexion vers le serveur (utilise un cookie qui traine)
924 client
.connexionCookie()
926 initialiserListeStyles(client
)
928 // TODO : pourquoi $(document).unload ne fonctionne pas ?
929 $(window
).unload(function(){client
.flush(false)})
931 $("#menu .minichat").click(function(){ pages
.afficherPage("minichat") })
932 $("#menu .admin").click(function(){ pages
.afficherPage("admin") })
933 $("#menu .profile").click(function(){ pages
.afficherPage("profile") })
934 $("#menu .logout").click(function(){
935 util
.messageDialogue("Êtes-vous sur de vouloir vous délogger ?", messageType
.question
,
938 client
.deconnexion();
939 pages
.afficherPage("minichat", true)
945 $("#menu .register").click(function(){ pages
.afficherPage("register") })
946 $("#menu .about").click(function(){ pages
.afficherPage("about") })
948 pages
.ajouterPage(new PageMinichat(client
, formateur
, util
))
949 pages
.ajouterPage(new PageAdmin(client
, formateur
, util
))
950 pages
.ajouterPage(new PageProfile(client
, formateur
, util
))
951 pages
.ajouterPage(new PageRegister(client
, formateur
, util
))
952 pages
.ajouterPage(new PageAbout(client
, formateur
, util
))
953 pages
.afficherPage("minichat")