//
// You should have received a copy of the GNU General Public License
// along with Euphorik. If not, see <http://www.gnu.org/licenses/>.
-\r
-/*jslint laxbreak:true */\r
+
+/*jslint laxbreak:true */
// tout euphorik est contenu dans cet objet
var euphorik = {};
var fragment = new Fragment();
var formateur = new euphorik.Formateur();
var util = new euphorik.Util(formateur);
- var client = new euphorik.Client(util);
- var pages = new euphorik.Pages(fragment);
+ var communication = new euphorik.Communication(
+ function(data) { util.messageDialogue(data.error_message); },
+ function() { util.showWaitBar(); },
+ function() { util.hideWaitBar(); }
+ );
+ var client = new euphorik.Client(util, communication);
+ var pages = new euphorik.Pages(fragment, communication);
// connexion vers le serveur (utilise un cookie qui traine)
client.connexionCookie();
// TODO : simplifier et pouvoir créer des liens par exemple : <span class="lien" href="conditions">Conditions d'utilisation</span>
$("#footer .conditions").click(function(){ pages.afficherPage("conditions_utilisation"); });
-
- pages.ajouterPage(new euphorik.PageMinichat(client, formateur, util), true);
- pages.ajouterPage(new euphorik.PageAdmin(client, formateur, util));
+
+ pages.ajouterPage(new euphorik.PageMinichat(client, formateur, util, communication), true);
+ pages.ajouterPage(new euphorik.PageAdmin(client, formateur, util, communication));
pages.ajouterPage(new euphorik.PageProfile(client, formateur, util));
pages.ajouterPage(new euphorik.PageRegister(client, formateur, util));
- pages.ajouterPage(new euphorik.PageAbout(client, formateur, util));
+ pages.ajouterPage(new euphorik.PageAbout(client, formateur, util, communication));
pages.ajouterPage("conditions_utilisation");
pages.afficherPage();
}
-);
\ No newline at end of file
+);