this.texteAide = "<div id=\"aideCommandes\"><h1>Commandes</h1><ul>";
objectEach(
euphorik.Commandes.liste,
- function(nom, commande) {
+ function(name, commande) {
thisCommandes.texteAide += "<li><span class=\"usage\">" + thisCommandes.formater.traitementComplet(commande.usage) + "</span> : " + thisCommandes.formater.traitementComplet(commande.description) + "</li>";
}
);
return [euphorik.Commandes.statut.pas_une_commande, ''];
}
- var nomCommande = fragments[0].slice(1);
+ var commandName = fragments[0].slice(1);
var args = fragments.slice(1);
- if (nomCommande === "") {
+ if (commandName === "") {
return [euphorik.Commandes.statut.erreur_commande, 'La commande est vide'];
}
// commandes spéciales pour afficher l'aide : "?", "h", "help", "aide"
- if (nomCommande === "?" || nomCommande === "h" || nomCommande === "help" || nomCommande === "aide") {
+ if (commandName === "?" || commandName === "h" || commandName === "help" || commandName === "aide") {
this.util.messageDialog(
this.texteAide,
euphorik.Util.messageType.informatif,
return [euphorik.Commandes.statut.ok, ''];
}
- if (euphorik.Commandes.liste.hasOwnProperty(nomCommande)) {
- return euphorik.Commandes.liste[nomCommande].exec(args, this.client, this.pageMinichat);
+ if (euphorik.Commandes.liste.hasOwnProperty(commandName)) {
+ return euphorik.Commandes.liste[commandName].exec(args, this.client, this.pageMinichat);
}
- return [euphorik.Commandes.statut.erreur_commande, 'La commande /' + nomCommande + ' est inconnue'];
+ return [euphorik.Commandes.statut.erreur_commande, 'La commande /' + commandName + ' est inconnue'];
};
}\r
\r
var mess = this.getBase(action);\r
- objectEach(json, function(nom, val) {\r
- mess[nom] = val;\r
+ objectEach(json, function(name, val) {\r
+ mess[name] = val;\r
});
if (this.funDebutReq) {
};\r
\r
if (paramsSupp) {\r
- objectEach(paramsSupp, function(nom, val) {\r
- paramsAjax[nom] = val;\r
+ objectEach(paramsSupp, function(name, val) {\r
+ paramsAjax[name] = val;\r
});\r
}\r
\r
this.regexImg = new RegExp("^.*?\\.(gif|jpg|png|jpeg|bmp|tiff)$", "i");\r
this.regexDomaine = new RegExp("^(?:(?:" + this.protocoles + ")://)(.*?)(?:$|/).*$", "i");\r
this.regexTestProtocoleExiste = new RegExp("^(?:" + this.protocoles + ")://.*$", "i");\r
- this.regexNomProtocole = new RegExp("^(.*?)://");\r
+ this.regexProtocolName = new RegExp("^(.*?)://");\r
};\r
\r
/**\r
\r
euphorik.Formater.prototype.getSmilesHTML = function() {\r
var XHTML = "";\r
- objectEach(this.smiles, function(nom) {\r
- XHTML += "<img class=\"" + nom + "\" src=\"img/smileys/" + nom + ".gif\" alt =\"" + nom + "\" />";\r
+ objectEach(this.smiles, function(name) {\r
+ XHTML += "<img class=\"" + name + "\" src=\"img/smileys/" + name + ".gif\" alt =\"" + name + "\" />";\r
});\r
return XHTML;\r
};\r
* moyenne sur échantillon : 234ms\r
*/\r
euphorik.Formater.prototype.traiterSmiles = function(m) { \r
- objectEach(this.smiles, function(nom, smiles) {\r
+ objectEach(this.smiles, function(name, smiles) {\r
for (var i = 0; i < smiles.length; i++) {\r
- m = m.replace(smiles[i], "<img src=\"img/smileys/" + nom + ".gif\" alt =\"" + nom + "\" />");\r
+ m = m.replace(smiles[i], "<img src=\"img/smileys/" + name + ".gif\" alt =\"" + name + "\" />");\r
}\r
});\r
return m;\r
if (rechercheDomaine && rechercheDomaine.length >= 2) {\r
versionShort = rechercheDomaine[1];\r
} else {\r
- var nomProtocole = this.regexNomProtocole.exec(url);\r
- if (nomProtocole && nomProtocole.length >= 2) {\r
- versionShort = nomProtocole[1];\r
+ var protocolName = this.regexProtocolName.exec(url);\r
+ if (protocolName && protocolName.length >= 2) {\r
+ versionShort = protocolName[1];\r
}\r
}\r
}\r
};\r
\r
euphorik.Formater.prototype.supprimerSmiles = function(m) {\r
- objectEach(this.smiles, function(nom, smiles) {\r
+ objectEach(this.smiles, function(name, smiles) {\r
for (var i = 0; i < smiles.length; i++) {\r
m = m.replace(smiles[i], "");\r
}\r
// along with Euphorik. If not, see <http://www.gnu.org/licenses/>.\r
\r
euphorik.PageAbout = function(client, formater, util, communication) {\r
- this.nom = "about";\r
+ this.name = "about";\r
\r
this.client = client;\r
this.formater = formater;\r
euphorik.PageAdmin = function(client, formater, util, communication) {
- this.nom = "admin";
+ this.name = "admin";
this.client = client;
this.formater = formater;
/*jslint laxbreak:true */
euphorik.PageMinichat = function(client, formater, util, communication) {
- this.nom = "minichat";
+ this.name = "minichat";
this.client = client;
this.formater = formater;
// along with Euphorik. If not, see <http://www.gnu.org/licenses/>.\r
\r
euphorik.PageProfile = function(client, formater, util) {\r
- this.nom = "profile";\r
+ this.name = "profile";\r
\r
this.client = client;\r
this.formater = formater;\r
// along with Euphorik. If not, see <http://www.gnu.org/licenses/>.\r
\r
euphorik.PageRegister = function(client, formater, util) {\r
- this.nom = "register";\r
+ this.name = "register";\r
\r
this.client = client;\r
this.formater = formater;\r
/**
* Correspond à une page html statique se nommant "<nom>.html" et se trouvant dans "/pages/".
*/
-euphorik.PageStatique = function(nom, communication) {
- this.nom = nom;
+euphorik.PageStatique = function(name, communication) {
+ this.name = name;
this.communication = communication;
};
euphorik.PageStatique.prototype.contenu = function() {
- return this.communication.load("pages/" + this.nom + ".html");
+ return this.communication.load("pages/" + this.name + ".html");
};
euphorik.PageStatique.prototype.charger = function() {
page.pages = this; // la magie des langages dynamiques : le foutoire\r
page.fragment = this.fragment;\r
\r
- this.pages[page.nom] = page; \r
+ this.pages[page.name] = page; \r
\r
if (defaultPage) {\r
this.pageDefaut = page;\r
}\r
\r
$("#menu li").removeClass("courante");\r
- $("#menu li." + page.nom).addClass("courante");\r
+ $("#menu li." + page.name).addClass("courante");\r
\r
this.pageCourante = page;\r
var contenu = this.pageCourante.contenu();\r
\r
$("#page").html(contenu).removeClass().addClass(\r
- this.pageCourante.nom +\r
+ this.pageCourante.name +\r
// A page can bring some additionnals CSS classes\r
(this.pageCourante.classes ? " " + this.pageCourante.classes() : "")\r
);\r
this.pageCourante.charger();\r
}\r
\r
- this.fragment.setVal("page", this.pageCourante.nom);\r
+ this.fragment.setVal("page", this.pageCourante.name);\r
this.fragment.write();\r
};\r
}\r
\r
$("#info .buttons").html("");\r
- objectEach(buttons, function(nom, bouton) {\r
- $("#info .buttons").append("<div>" + nom + "</div>").find("div:last").click(bouton).click(close);\r
+ objectEach(buttons, function(name, bouton) {\r
+ $("#info .buttons").append("<div>" + name + "</div>").find("div:last").click(bouton).click(close);\r
});\r
\r
$("#info").slideDown(200);