X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Futil.js;h=7ca57609c5204129de0108c7b0a60c0f34152099;hp=aff9d6e00d578b7938e1ad5a18378c92e36531f0;hb=5dc140390551c133ac5525725a86854ca69679af;hpb=cf274dbe8b2049cfb3d2116d9298bfb8c1a38d11 diff --git a/js/util.js b/js/util.js index aff9d6e..7ca5760 100644 --- a/js/util.js +++ b/js/util.js @@ -59,7 +59,7 @@ euphorik.Util.prototype.messageDialog = function(message, type, buttons, format, var close = function() { $("#info").slideUp(100); }; close(); - $("#info .message").html(!thisUtil.formater || !format ? message : thisUtil.formater.traitementComplet(message)); + $("#info .message").html(!thisUtil.formater || !format ? message : thisUtil.formater.completeProcessing(message)); switch(type) { case euphorik.Util.messageType.informatif : $("#info #icone").attr("class", "information"); break; @@ -68,8 +68,8 @@ euphorik.Util.prototype.messageDialog = function(message, type, buttons, format, } $("#info .buttons").html(""); - objectEach(buttons, function(nom, bouton) { - $("#info .buttons").append("
" + nom + "
").find("div:last").click(bouton).click(close); + objectEach(buttons, function(name, bouton) { + $("#info .buttons").append("
" + name + "
").find("div:last").click(bouton).click(close); }); $("#info").slideDown(200); @@ -190,14 +190,6 @@ euphorik.Util.prototype.infoBulle = function(message, element, position) { ).click(cacherBulle); }; -/** - * Utilisé pour l'envoie de données avec la méthode ajax de jQuery. - * Obsolète : à virer - */ -/*euphorik.Util.prototype.jsonVersAction = function(json) { - return { action : JSON.stringify(json) }; -};*/ - /** * Retourne un hash md5 d'une chaine, dépend de md5.js. * @param chaine un string quelconque @@ -207,7 +199,7 @@ euphorik.Util.prototype.md5 = function(chaine) { return hex_md5(chaine); }; -// pompé de http://www.faqts.com/knowledge_base/view.phtml/aid/13562/fid/130 +// Taken from http://www.faqts.com/knowledge_base/view.phtml/aid/13562/fid/130 euphorik.Util.prototype.setSelectionRange = function(input, selectionStart, selectionEnd) { if (input.setSelectionRange) { input.focus(); @@ -261,9 +253,10 @@ euphorik.Util.prototype.replaceSelection = function(input, replaceString) { }; /** - * Rot13 d'une chaine, voir : http://fr.wikipedia.org/wiki/ROT13 + * Applies rot13 to a given string. See : http://en.wikipedia.org/wiki/ROT13. + * @param str the string. */ -euphorik.Util.prototype.rot13 = function(chaine) { +euphorik.Util.prototype.rot13 = function(str) { var ACode = 'A'.charCodeAt(0); var aCode = 'a'.charCodeAt(0); var MCode = 'M'.charCodeAt(0); @@ -283,5 +276,5 @@ euphorik.Util.prototype.rot13 = function(chaine) { (c > MCode && c <= ZCode || c > mCode && c <= zCode ? -13 : 0)) ) + f(ch, pos + 1); }; - return f(chaine, 0); + return f(str, 0); };