ADD gestion du fragment de url, voir #2
[euphorik.git] / js / pageStatique.js
diff --git a/js/pageStatique.js b/js/pageStatique.js
new file mode 100644 (file)
index 0000000..f5a4c2c
--- /dev/null
@@ -0,0 +1,33 @@
+// coding: utf-8
+// Copyright 2008 Grégory Burri
+//
+// This file is part of Euphorik.
+//
+// Euphorik is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Euphorik is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Euphorik.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+  * Correspond à une page html statique se nommant "<nom>.html" et se trouvant dans "/pages/".
+  */
+euphorik.PageStatique = function(nom) {
+   this.nom = nom;
+};
+
+euphorik.PageStatique.prototype.contenu = function() {
+   var contenu = "";
+   $.ajax({async: false, url: "pages/" + this.nom + ".html", success : function(page) { contenu += page; }});
+   return contenu;
+};
+
+euphorik.PageStatique.prototype.charger = function() {
+};