X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Feuphorik.js;h=228ea3ce3a25fd15024c6267399e4a58cdffd3ae;hp=e57cc4ee62e1f589f0e782af411965988e31b066;hb=ce1fba00ff3eaa6708d6070763f74a400273203b;hpb=02c593a29f7b83c68d57c5742c03690c11c1143c diff --git a/js/euphorik.js b/js/euphorik.js index e57cc4e..228ea3c 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -22,9 +22,7 @@ * Auteur : GBurri * Date : 6.11.2007 */ - - // tout euphorik est contenu dans cet objet var euphorik = {} // ;; euphorik.include = @@ -57,22 +55,30 @@ var euphorik = {} ;; euphorik.include("pageProfile") ;; euphorik.include("pageRegister") ;; euphorik.include("pageAbout") - - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -String.prototype.trim = function() -{ + + +// tout un tas d'améliorations des objets javascript ;) +/** + * Pour chaque propriété de l'objet execute f(p, v) ou p est le nom de la propriété et v sa valeur. + * Ne parcours pas les propriétés des prototypes. + */ +object.prototype.each = function(f) { + for (var b in boutons) { + if (boutons.hasOwnProperty(b)) { + f(b, boutons[b]) + } + } +} + +String.prototype.trim = function() { return jQuery.trim(this) // anciennement : this.replace(/^\s+|\s+$/g, ""); } -String.prototype.ltrim = function() -{ +String.prototype.ltrim = function() { return this.replace(/^\s+/, ""); } -String.prototype.rtrim = function() -{ +String.prototype.rtrim = function() { return this.replace(/\s+$/, ""); }