diff --git a/web_controllers/language/language_management.anubis b/web_controllers/language/language_management.anubis index 6f8a2f1..1c6d36d 100644 --- a/web_controllers/language/language_management.anubis +++ b/web_controllers/language/language_management.anubis @@ -163,6 +163,19 @@ define HTML_Off_Form event(onclick, "language_changed('"+language_code+"');")], text(language)) . +define HTML_Off_Form + language_line + ( + String language_code, + String language, + String -> String action + )= + div([class("clickable"), event(onclick, action(language_code))],[ + img("/xlib/flags/24x24/"+language_code+".png"), + text(language) + ]) +. + public define HTML_Partial_Content flags_menu ( @@ -214,3 +227,49 @@ public define HTML_Partial_Content flags_menu(app_dictionnary, lang, show_symbolic) . + +public define HTML_Partial_Content + choose_lang_dialog + ( + String dictionary_collection_name, + String -> String action, + Bool show_symbolic, + )= + with make_line = (L3LangDicProperty dico_prop) |-> + if dico_prop is l3LangDicProperty( _, sha1, lang_code, user_def, creat, update) then + with lang_info = l3_get_language_info(lang_code), + language_line(lang_code, self_name(lang_info), action), + + partial_content([ + css(css_file("/xlib/css/flags_menu.css")), + js(js_file("/xlib/js/xlib.js")) + ], + [ + dl([ + //img([event(onmouseover, "showObject('l3-flag');"), event(onmouseout, "hideObject('l3-flag');")], "/xlib/flags/24x24/"+lang+".png" ), + dd([style("display: block"),id("l3-flag")], + ul( + map(make_line, l3_get_all_dicos(dictionary_collection_name))+ + [ + if show_symbolic then + language_line("symb", "symbolic", action) + else + empty + ] + )), + ]) //!dl + ] + ) +. + +public define HTML_Partial_Content + choose_lang_dialog + ( + WEB_Session _session, + String -> String action + ) = + with lang = _session.language, + app_dictionnary = get_dictionary(_session), + + choose_lang_dialog(app_dictionnary, action, false) +. -- libgit2 0.21.4