'formater' -> 'formatter'
[euphorik.git] / js / euphorik.js
index 107a5c0..cac44c8 100755 (executable)
@@ -17,7 +17,7 @@
 // along with Euphorik.  If not, see <http://www.gnu.org/licenses/>.
 
 /*jslint laxbreak:true */
-\r
+
 // all euphorik is contained in this object
 var euphorik = {};
 
@@ -25,8 +25,8 @@ var euphorik = {};
 $(document).ready(
    function() { 
       var fragment = new Fragment();
-      var formater = new euphorik.Formater();
-      var util = new euphorik.Util(formater); 
+      var formatter = new euphorik.Formatter();
+      var util = new euphorik.Util(formatter);
       var communication = new euphorik.Communication(
          function(data) { util.messageDialog(data.error_message); },
          function() { util.showWaitBar(); },
@@ -34,14 +34,14 @@ $(document).ready(
       );
       var client = new euphorik.Client(util, communication);
       var pages = new euphorik.Pages(fragment, communication);
-      
-      // connexion vers le serveur (utilise un cookie qui traine)
-      client.connexionCookie();
+           
+      // 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
-      // voir : http://dev.jquery.com/ticket/2892#preview
+      // see : http://dev.jquery.com/ticket/2892#preview
       $(window).unload(function() { client.flush(); });
       
       $("#menu .minichat").click(function() { pages.displayPage("minichat"); });
@@ -51,7 +51,7 @@ $(document).ready(
          util.messageDialog("Are you sure you want to log out?", euphorik.Util.messageType.question,
             {
                "Yes" : function() {
-                  client.deconnexion();
+                  client.disconnect();
                   pages.displayPage("minichat", true);
                },
                "No" : function() {}
@@ -61,17 +61,17 @@ $(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\r
-      //  explicitly add a page.\r
-      // [1] : <a class="lien" href="conditions">Conditions d'utilisation</a>
-      $("#footer .conditions").click(function(){ pages.displayPage("conditions_utilisation"); });
+      // TODO : simplification : such link[1] should be created and automatically open the right page without
+      //  explicitly add a page.
+      // [1] : <a class="pageLink" href="termes_of_use">Terms of use</a>
+      $("#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("conditions_utilisation");
+      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
    }