X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2FpageStatique.js;h=4580bf3260af4685cb5639db3ea8b3b6773d043e;hb=7ea77e03a1191ed84719ec018635cbe4a1b44259;hp=f5a4c2c077690c127bcc4ad5cde1a95d61819798;hpb=217c4d7a0d5f9fee3a8ef0a05ab8506c7f39d5e5;p=euphorik.git diff --git a/js/pageStatique.js b/js/pageStatique.js index f5a4c2c..4580bf3 100644 --- a/js/pageStatique.js +++ b/js/pageStatique.js @@ -19,14 +19,13 @@ /** * Correspond à une page html statique se nommant ".html" et se trouvant dans "/pages/". */ -euphorik.PageStatique = function(nom) { +euphorik.PageStatique = function(nom, communication) { this.nom = nom; + this.communication = communication; }; euphorik.PageStatique.prototype.contenu = function() { - var contenu = ""; - $.ajax({async: false, url: "pages/" + this.nom + ".html", success : function(page) { contenu += page; }}); - return contenu; + return this.communication.load("pages/" + this.nom + ".html"); }; euphorik.PageStatique.prototype.charger = function() {