From: Ummon Date: Thu, 23 Apr 2020 16:43:19 +0000 (+0200) Subject: Merge branch 'master' of gburri.org:euphorik X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=commitdiff_plain;h=808fb60f6c10dfcaccee94c6a49f768de84dc2ef;hp=-c Merge branch 'master' of gburri.org:euphorik --- 808fb60f6c10dfcaccee94c6a49f768de84dc2ef diff --combined .gitignore index 5b3f348,5b3f348..7c8641d --- a/.gitignore +++ b/.gitignore @@@ -1,3 -1,3 +1,5 @@@ *.iws *.beam --var/ ++var/ ++/BD ++/data diff --combined index.yaws index a32b301,99ce454..9b80ee1 --- a/index.yaws +++ b/index.yaws @@@ -46,7 -46,7 +46,7 @@@ - + @@@ -67,10 -67,10 +67,10 @@@
- % permet de prédéfinir la "class" du logo pour un ekMaster... + % To redefine the logo class for the ekMasters. out(A) -> - Est_ek_master = euphorik_bd:is_ek_master_from_cookie(yaws_api:find_cookie_val("cookie", A)), - {ehtml, {'div', [{id, "logo"}] ++ if Est_ek_master -> [{class, "ekMaster"}]; true -> [] end}}. + Is_ek_master = euphorik_bd:is_ek_master_from_cookie(yaws_api:find_cookie_val("cookie", A)), + {ehtml, {'div', [{id, "logo"}] ++ if Is_ek_master -> [{class, "ekMaster"}]; true -> [] end}}. @@@ -83,12 -83,12 +83,12 @@@ % parse les styles disponible out(A) -> - Stlyes_dir = A#arg.docroot ++ "/styles", - {ok, Liste_dir} = file:list_dir(Stlyes_dir), + Styles_dir = A#arg.docroot ++ "/styles", + {ok, Liste_dir} = file:list_dir(Styles_dir), {ehtml, lists:foldr( fun(Dir, Acc) -> - case file:consult(Stlyes_dir ++ "/" ++ Dir ++ "/infos.txt") of + case file:consult(Styles_dir ++ "/" ++ Dir ++ "/infos.txt") of {ok, [{nom, Nom}]} -> [{option, [{value, Dir}], Nom} | Acc]; _ -> diff --combined js/euphorik.js index cac44c8,3f45e2d..893a32a --- a/js/euphorik.js +++ b/js/euphorik.js @@@ -23,10 -23,10 +23,10 @@@ var euphorik = {} // le main $(document).ready( - function() { + function() { var fragment = new Fragment(); - var formater = new euphorik.Formater(); - var util = new euphorik.Util(formater); + var formatter = new euphorik.Formatter(); + var util = new euphorik.Util(formatter); var communication = new euphorik.Communication( function(data) { util.messageDialog(data.error_message); }, function() { util.showWaitBar(); }, @@@ -34,16 -34,14 +34,14 @@@ ); var client = new euphorik.Client(util, communication); var pages = new euphorik.Pages(fragment, communication); - + // Client authentification with the cookie information (if it exists). client.connectionCookie(); - + $("#menuCss").change(function() { client.setCss("styles/" + $("option:selected", this).attr("value") + "/euphorik.css"); }); - // FIXME : doesn't work under Opera - // see : http://dev.jquery.com/ticket/2892#preview $(window).unload(function() { client.flush(); }); - + $("#menu .minichat").click(function() { pages.displayPage("minichat"); }); $("#menu .admin").click(function() { pages.displayPage("admin"); }); $("#menu .profile").click(function() { pages.displayPage("profile"); }); @@@ -60,19 -58,19 +58,19 @@@ }); $("#menu .register").click(function(){ pages.displayPage("register"); }); $("#menu .about").click(function(){ pages.displayPage("about"); }); - + - // TODO: simplification : such link[1] should be created and automatically open the right page without + // TODO : simplification : such link[1] should be created and automatically open the right page without // explicitly add a page. // [1] : Terms of use $("#footer .termsOfUse").click(function(){ pages.displayPage("terms_of_use"); }); - + - pages.addPage(new euphorik.PageMinichat(client, formater, util, communication), true); - pages.addPage(new euphorik.PageAdmin(client, formater, util, communication)); - pages.addPage(new euphorik.PageProfile(client, formater, util)); - pages.addPage(new euphorik.PageRegister(client, formater, util)); - pages.addPage(new euphorik.PageAbout(client, formater, util, communication)); + pages.addPage(new euphorik.PageMinichat(client, formatter, util, communication), true); + pages.addPage(new euphorik.PageAdmin(client, formatter, util, communication)); + pages.addPage(new euphorik.PageProfile(client, formatter, util)); + pages.addPage(new euphorik.PageRegister(client, formatter, util)); + pages.addPage(new euphorik.PageAbout(client, formatter, util, communication)); pages.addPage("terms_of_use"); - + pages.displayPage(); // display the default page } ); Reading git-diff-tree failed