X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2Feuphorik.js;h=c1253b97e5b93f3190797bb0a39adcfb5c9ef5f9;hb=7ea77e03a1191ed84719ec018635cbe4a1b44259;hp=4a9261ac9ec20bb392653f1db27bacf5fa42c1a7;hpb=972919ab7f5651cd721eb6eec75f7150fdeaf347;p=euphorik.git diff --git a/js/euphorik.js b/js/euphorik.js index 4a9261a..c1253b9 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -26,10 +26,14 @@ $(document).ready( function() { var fragment = new Fragment(); var formateur = new euphorik.Formateur(); - var util = new euphorik.Util(formateur); - var communication = new Communication(); + var util = new euphorik.Util(formateur); + var communication = new euphorik.Communication( + function(data) { util.messageDialogue(data.error_message); }, + function() { util.showWaitBar(); }, + function() { util.hideWaitBar(); } + ); var client = new euphorik.Client(util, communication); - var pages = new euphorik.Pages(fragment); + var pages = new euphorik.Pages(fragment, communication); // connexion vers le serveur (utilise un cookie qui traine) client.connexionCookie(); @@ -57,17 +61,16 @@ $(document).ready( $("#menu .register").click(function(){ pages.afficherPage("register"); }); $("#menu .about").click(function(){ pages.afficherPage("about"); }); - // TODO : simplifier et pouvoir créer des liens par exemple : Conditions d'utilisation $("#footer .conditions").click(function(){ pages.afficherPage("conditions_utilisation"); }); - pages.ajouterPage(new euphorik.PageMinichat(client, formateur, util), true); - pages.ajouterPage(new euphorik.PageAdmin(client, formateur, util)); + pages.ajouterPage(new euphorik.PageMinichat(client, formateur, util, communication), true); + pages.ajouterPage(new euphorik.PageAdmin(client, formateur, util, communication)); pages.ajouterPage(new euphorik.PageProfile(client, formateur, util)); pages.ajouterPage(new euphorik.PageRegister(client, formateur, util)); - pages.ajouterPage(new euphorik.PageAbout(client, formateur, util)); + pages.ajouterPage(new euphorik.PageAbout(client, formateur, util, communication)); pages.ajouterPage("conditions_utilisation"); pages.afficherPage(); } -); \ No newline at end of file +);