X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2Feuphorik.js;h=4706eb878f3277310f13de45baf5ac4a06d6bd47;hb=09608ab29e1c39ea51b51a5f8669dcde36efb306;hp=214c0f89d4b5ccf885c7e1cd7a635e75b7549e4c;hpb=eb8708a7450d6c5147613fab28678b206aeb7c7e;p=euphorik.git diff --git a/js/euphorik.js b/js/euphorik.js index 214c0f8..4706eb8 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -25,11 +25,15 @@ var euphorik = {}; $(document).ready( function() { var fragment = new Fragment(); - var formateur = new euphorik.Formateur(); - var util = new euphorik.Util(formateur); - var communication = new euphorik.Communication(function(data) { util.messageDialogue(data.error_message); }); + var formateur = new euphorik.Formater(); + var util = new euphorik.Util(formater); + 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(); @@ -60,11 +64,11 @@ $(document).ready( // 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, communication), true); - pages.ajouterPage(new euphorik.PageAdmin(client, formateur, util)); - 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.PageMinichat(client, formater, util, communication), true); + pages.ajouterPage(new euphorik.PageAdmin(client, formater, util, communication)); + pages.ajouterPage(new euphorik.PageProfile(client, formater, util)); + pages.ajouterPage(new euphorik.PageRegister(client, formater, util)); + pages.ajouterPage(new euphorik.PageAbout(client, formater, util, communication)); pages.ajouterPage("conditions_utilisation"); pages.afficherPage();