X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Feuphorik.js;h=893a32afcefad024173839cbbcdfea61d333dfe6;hp=cac44c8d93dfdd9ec92ef589d04e0e347f33b8a6;hb=808fb60f6c10dfcaccee94c6a49f768de84dc2ef;hpb=5d9992368bb386d2e606ae037c5478fe10ac70e8 diff --git a/js/euphorik.js b/js/euphorik.js index cac44c8..893a32a 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -23,7 +23,7 @@ var euphorik = {}; // le main $(document).ready( - function() { + function() { var fragment = new Fragment(); var formatter = new euphorik.Formatter(); var util = new euphorik.Util(formatter); @@ -34,16 +34,14 @@ $(document).ready( ); var client = new euphorik.Client(util, communication); var pages = new euphorik.Pages(fragment, communication); - + // Client authentification with the cookie information (if it exists). client.connectionCookie(); - + $("#menuCss").change(function() { client.setCss("styles/" + $("option:selected", this).attr("value") + "/euphorik.css"); }); - // FIXME : doesn't work under Opera - // see : http://dev.jquery.com/ticket/2892#preview $(window).unload(function() { client.flush(); }); - + $("#menu .minichat").click(function() { pages.displayPage("minichat"); }); $("#menu .admin").click(function() { pages.displayPage("admin"); }); $("#menu .profile").click(function() { pages.displayPage("profile"); }); @@ -60,19 +58,19 @@ $(document).ready( }); $("#menu .register").click(function(){ pages.displayPage("register"); }); $("#menu .about").click(function(){ pages.displayPage("about"); }); - + // TODO : simplification : such link[1] should be created and automatically open the right page without // explicitly add a page. // [1] : Terms of use $("#footer .termsOfUse").click(function(){ pages.displayPage("terms_of_use"); }); - + pages.addPage(new euphorik.PageMinichat(client, formatter, util, communication), true); pages.addPage(new euphorik.PageAdmin(client, formatter, util, communication)); pages.addPage(new euphorik.PageProfile(client, formatter, util)); pages.addPage(new euphorik.PageRegister(client, formatter, util)); pages.addPage(new euphorik.PageAbout(client, formatter, util, communication)); pages.addPage("terms_of_use"); - + pages.displayPage(); // display the default page } );