X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=js%2Feuphorik.js;fp=js%2Feuphorik.js;h=3f45e2d414a767daa35082e602c0cb256db04e31;hb=0fd41878c239877c274bd2bf58caf65b24977e52;hp=e3bd7200111b79fde0aea76e7648d04d4fae3fd7;hpb=cb02531d4a4b217997db3fdfe2661af18c576ddd;p=euphorik.git
diff --git a/js/euphorik.js b/js/euphorik.js
index e3bd720..3f45e2d 100755
--- a/js/euphorik.js
+++ b/js/euphorik.js
@@ -17,16 +17,16 @@
// along with Euphorik. If not, see .
/*jslint laxbreak:true */
-
+
// all euphorik is contained in this object
var euphorik = {};
// le main
$(document).ready(
- function() {
+ function() {
var fragment = new Fragment();
var formater = new euphorik.Formater();
- var util = new euphorik.Util(formater);
+ var util = new euphorik.Util(formater);
var communication = new euphorik.Communication(
function(data) { util.messageDialog(data.error_message); },
function() { util.showWaitBar(); },
@@ -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.
+
+ // 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, formater, util, communication), true);
pages.addPage(new euphorik.PageAdmin(client, formater, util, communication));
pages.addPage(new euphorik.PageProfile(client, formater, util));
pages.addPage(new euphorik.PageRegister(client, formater, util));
pages.addPage(new euphorik.PageAbout(client, formater, util, communication));
pages.addPage("terms_of_use");
-
+
pages.displayPage(); // display the default page
}
);