REPORT de la branche 1.1 : 477->494
[euphorik.git] / js / pageStatique.js
index f5a4c2c..4580bf3 100644 (file)
 /**
   * Correspond à une page html statique se nommant "<nom>.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() {