From 73eeebd801f82fd9b9eeba3c5757bb26e01ec648 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Fri, 6 Feb 2009 08:31:31 +0000 Subject: [PATCH] MOD french -> english (4) --- js/chat/conversations.js | 6 +++--- js/client.js | 41 +++++++++++++++++++++++++++++----------- js/util.js | 10 +++++----- 3 files changed, 38 insertions(+), 19 deletions(-) diff --git a/js/chat/conversations.js b/js/chat/conversations.js index b3f18f3..5ba27d8 100644 --- a/js/chat/conversations.js +++ b/js/chat/conversations.js @@ -272,15 +272,15 @@ euphorik.Conversations.prototype.nouvelleConversation = function(num) { this.conversations[num].setFunPage( function(num) { // page suivante - thisConversations.client.pageSuivante(num - 1); + thisConversations.client.nextPage(num - 1); thisConversations.rafraichirMessages(true); }, function(num) { // page précédente - thisConversations.client.pagePrecedente(num - 1); + thisConversations.client.previousPage(num - 1); thisConversations.rafraichirMessages(true); }, function(num) { // retour à la page une - if (thisConversations.client.goPremierePage(num - 1)) { + if (thisConversations.client.goFirstPage(num - 1)) { thisConversations.rafraichirMessages(true); } } diff --git a/js/client.js b/js/client.js index 917ae8e..0b77e65 100644 --- a/js/client.js +++ b/js/client.js @@ -58,6 +58,10 @@ euphorik.Client.statusType = { disconnected : 2 }; +/** + * Reset all the local personal data. Does not erase the remote data. + * This function is used during disconnecting. + */ euphorik.Client.prototype.resetPersonalData = function() { this.id = 0; this.nick = euphorik.conf.defaultNick; @@ -74,14 +78,20 @@ euphorik.Client.prototype.resetPersonalData = function() { this.mainConversationPage = 1; this.ekMaster = false; this.ostentatiousMaster = "light"; - - // les conversations, une conversation est un objet possédant les propriétés suivantes : - // - root (entier) - // - page (entier) - // - reduit (bool) + + // The user opened conversations. + // Each conversation object owns theses properties : + // - root (integer) + // - page (integer) + // - isCollapsed (bool) this.conversations = []; }; +/** + * Set the CSS. Dynamically change the href to the CSS in the DOM. + * @css The relative path to the CSS file, for example : + * "styles/1/euphorik.css". + */ euphorik.Client.prototype.setCss = function(css) { if (this.css === css || !css) { return; @@ -89,12 +99,17 @@ euphorik.Client.prototype.setCss = function(css) { this.css = css; $("link#mainCss").attr("href", this.css); + if (this.autoflush) { this.flush(true); } }; -euphorik.Client.prototype.pageSuivante = function(numConv) { +/** + * Change the current page to the next one for the given conversation. + * @numConv The number of the conversation. + */ +euphorik.Client.prototype.nextPage = function(numConv) { if (numConv < 0 && this.mainConversationPage > 1) { this.mainConversationPage -= 1; } else if (this.conversations[numConv].page > 1) { @@ -102,7 +117,11 @@ euphorik.Client.prototype.pageSuivante = function(numConv) { } }; -euphorik.Client.prototype.pagePrecedente = function(numConv) { +/** + * Change the current page to the previous one for the given conversation. + * @numConv The number of the conversation. + */ +euphorik.Client.prototype.previousPage = function(numConv) { if (numConv < 0) { this.mainConversationPage += 1; } else { @@ -114,7 +133,7 @@ euphorik.Client.prototype.pagePrecedente = function(numConv) { * Définit la première page pour la conversation donnée. * @return true si la page a changé sinon false */ -euphorik.Client.prototype.goPremierePage = function(numConv) +euphorik.Client.prototype.goFirstPage = function(numConv) { if (numConv < 0) { if (this.mainConversationPage === 1) { @@ -148,7 +167,7 @@ euphorik.Client.prototype.ajouterConversation = function(racine) { return false; } - this.conversations.push({root : racine, page : 1, reduit : false}); + this.conversations.push({root : racine, page : 1, isCollapsed : false}); if (this.autoflush) { this.flush(true); } @@ -175,7 +194,7 @@ euphorik.Client.prototype.supprimerConversation = function(num) { euphorik.Client.prototype.getJSONConversations = function() { var conversations = []; this.conversations.each(function(i, conv) { - conversations.push({ "root" : conv.root, "minimized" : conv.reduit }); + conversations.push({ "root" : conv.root, "minimized" : conv.isCollapsed }); }); return conversations; }; @@ -359,7 +378,7 @@ euphorik.Client.prototype.chargerDonnees = function(data) { // les conversations this.conversations = data.profile.conversations; this.conversations.map(function(conv) { - return { root : conv.root, page : 1, reduit : conv.minimized }; + return { root : conv.root, page : 1, isCollapsed : conv.minimized }; }); this.majBulle(); diff --git a/js/util.js b/js/util.js index 4a86faf..9e19ed7 100644 --- a/js/util.js +++ b/js/util.js @@ -19,11 +19,11 @@ /*jslint laxbreak:true */ /** - * Cet objet regroupe des fonctions utilitaires (helpers) permettant notamment de : - * - afficher une boite de message - * - afficher une bulle d'aide lié à un élément - * - manipuler le curseur et réaliser des sélections sur des zones de saisie () - * @formater permet de formater les messages affichés à l'aide de messageDialog (facultatif), voir "formater.js". + * This object brings some utility functions. + * - Print a message box to display some information for the user. + * - Set a tooltip for a HTML element. + * - Some text manipulation for input area. + * @formater an object for string format */ euphorik.Util = function (formater) { $("#info .fermer").click(function() { -- 2.43.0