Commit 973a3fae2920e86f4dcf3d799ef5cf201ef62100
1 parent
8e2f648b
[+] add html_tooltip_ext (extended version) where it takes parameter "tooltip_ex…
…t" which can be processed in server side to be routed to the right processing function. This allow to have only one routing function for different kind of tooltip [-] revert the move of jquery files on the root of the website public directory. In fact the better location is inside the directory [-] remove the generate_trust_ticket callback of http_info type which never in use and generate some issues for storing http_info by serialization (Serialiaze doesn't allow to serialize function) [+] add datatable plugin "moment" for sorting column with date / time
Showing
6 changed files
with
55 additions
and
22 deletions
Show diff stats
web/CXM_html_tooltip.anubis
| ... | ... | @@ -84,7 +84,7 @@ public define HTML_Off_Form |
| 84 | 84 | ) = |
| 85 | 85 | actioner(same,same, link([id("help_" + keyword), class("jTipu jTip_"+class_suffix), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_ext", keyword)], []). |
| 86 | 86 | |
| 87 | -public define HTML_In_Form | |
| 87 | + public define HTML_In_Form | |
| 88 | 88 | html_tooltip_ext |
| 89 | 89 | ( |
| 90 | 90 | String title, |
| ... | ... | @@ -95,6 +95,17 @@ public define HTML_In_Form |
| 95 | 95 | with extra_args = format_extra_operands(ext_args), |
| 96 | 96 | literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_"+class_suffix+"\" name=\""+title+"\" href=\"/?a=ajax_show_tooltip&tooltip_ext="+keyword+extra_args+"\"></a>"). |
| 97 | 97 | |
| 98 | +public define HTML_In_Form | |
| 99 | + html_tooltip_ext | |
| 100 | + ( | |
| 101 | + String title, | |
| 102 | + String extend_type, | |
| 103 | + String class_suffix, | |
| 104 | + List((String, String)) ext_args | |
| 105 | + ) = | |
| 106 | + with extra_args = format_extra_operands(ext_args), | |
| 107 | + literal("<a id=\"jTip\" class=\"jTipu jTip_"+class_suffix+"\" name=\""+title+"\" href=\"/?a=ajax_show_tooltip&tooltip_ext="+extend_type+extra_args+"\"></a>"). | |
| 108 | + | |
| 98 | 109 | |
| 99 | 110 | href=\"/?a=ajax_show_tooltip&tooltip_id="+keyword+"\" id=\"help_"+keyword+HELP_HMS_MODE" class="jTip jTip_help" target="_blank" name="Aide sur la fonctionnalité 'No Limit'"> </a>"). |
| 100 | 111 | ... | ... |
web/CXM_jquery.anubis
| ... | ... | @@ -57,8 +57,8 @@ define List(HTML_Head_Tag) |
| 57 | 57 | jquery_defaults |
| 58 | 58 | = |
| 59 | 59 | [ |
| 60 | - js(js_file("/jquery/jquery-1.11.3.js")), | |
| 61 | - js(js_file("/jquery/jquery-ui-1.11.4/jquery-ui.min.js")), | |
| 60 | + js(js_file("/js/jquery/jquery-1.11.3.js")), | |
| 61 | + js(js_file("/js/jquery/jquery-ui-1.11.4/jquery-ui.min.js")), | |
| 62 | 62 | ]. |
| 63 | 63 | |
| 64 | 64 | /* Initialize jQuery in compatiblity mode with jQueryUI */ |
| ... | ... | @@ -69,11 +69,12 @@ public define List(HTML_Head_Tag) |
| 69 | 69 | String theme_name |
| 70 | 70 | ) |
| 71 | 71 | = |
| 72 | - if file_exists(web_dir+"/public/jquery/jquery-ui-1.11.4/theme/"+theme_name+"/jquery-ui.min.css") then | |
| 73 | - [ css(css_file("/jquery/jquery-ui-1.11.4/theme/"+theme_name+"/jquery-ui.min.css")), | |
| 74 | - css(css_file("/jquery/jquery-ui-1.11.4/theme/"+theme_name+"/jquery-ui.structure.min.css")), | |
| 75 | - css(css_file("/jquery/jquery-ui-1.11.4/theme/"+theme_name+"/jquery-ui.theme.min.css")) . jquery_defaults ] | |
| 72 | + if file_exists(web_dir+"/public/js/jquery/jquery-ui-1.11.4/theme/"+theme_name+"/jquery-ui.min.css") then | |
| 73 | + [ css(css_file("/js/jquery/jquery-ui-1.11.4/theme/"+theme_name+"/jquery-ui.min.css")), | |
| 74 | + css(css_file("/js/jquery/jquery-ui-1.11.4/theme/"+theme_name+"/jquery-ui.structure.min.css")), | |
| 75 | + css(css_file("/js/jquery/jquery-ui-1.11.4/theme/"+theme_name+"/jquery-ui.theme.min.css")) . jquery_defaults ] | |
| 76 | 76 | else |
| 77 | - println("Jquery Theme not found "+web_dir+"/css/jquery/"+theme_name+"/jquery-ui-1.10.4.custom.min.css"); | |
| 78 | - [ css(css_file("/css/jquery/jquery-ui-1.11.4.custom.min.css")) . jquery_defaults ] | |
| 77 | + println("Jquery Theme not found "+web_dir+"/public/js/jquery/jquery-ui-1.11.4/theme/"+theme_name+"/jquery-ui.min.css"); | |
| 78 | + //TODO change to real default jquery ui css | |
| 79 | + [ css(css_file("/js/jquery/jquery-ui-1.11.4/theme/"+theme_name+"/jquery-ui.min.css")) . jquery_defaults ] | |
| 79 | 80 | . | ... | ... |
web/CXM_multihost_http_server.anubis
| ... | ... | @@ -186,8 +186,8 @@ public type HTTP_Info: |
| 186 | 186 | String hostname, // hostname requested by the client |
| 187 | 187 | String uri, // URI requested by the client |
| 188 | 188 | List(HTTP_header) http_headers, // HTTP headers sent by the client |
| 189 | - Bool is_https, | |
| 190 | - One -> String generate_trust_ticket // may be used against denial of | |
| 189 | + Bool is_https | |
| 190 | + //One -> String generate_trust_ticket // may be used against denial of | |
| 191 | 191 | // service attacks |
| 192 | 192 | ). |
| 193 | 193 | |
| ... | ... | @@ -2397,7 +2397,7 @@ define One |
| 2397 | 2397 | read_www_url_encoded_web_args(to_string(body),0), |
| 2398 | 2398 | uri = uri(request_line), |
| 2399 | 2399 | ext = get_uri_extension(uri), |
| 2400 | - http_inf = http_info(ip_addr, host_name, uri, headers, is_SSL(connection), generate_tt), | |
| 2400 | + http_inf = http_info(ip_addr, host_name, uri, headers, is_SSL(connection)), | |
| 2401 | 2401 | (if member(journal_extensions(desc),ext) |
| 2402 | 2402 | then log_journal_msg(desc, |
| 2403 | 2403 | format_request(desc,connection,request_line,headers,all_web_args)) |
| ... | ... | @@ -2862,7 +2862,7 @@ define One |
| 2862 | 2862 | else |
| 2863 | 2863 | if (ext = ".awp" | ext = "") then |
| 2864 | 2864 | (with answer_headers_body = awp_handler(desc)(host_name, |
| 2865 | - http_info(ip_addr, host_name, uri, headers, is_SSL(connection), generate_tt), | |
| 2865 | + http_info(ip_addr, host_name, uri, headers, is_SSL(connection)), | |
| 2866 | 2866 | all_web_args, |
| 2867 | 2867 | is_SSL(connection)), |
| 2868 | 2868 | forget(reliable_write(connection, answer_headers_body))) | ... | ... |
web/jQuery/CXM_jquery_datatable.anubis
| ... | ... | @@ -14,6 +14,8 @@ read calexium_lib/web/jQuery/CXM_jquery_datatable_translation.anubis |
| 14 | 14 | read tools/basis.anubis |
| 15 | 15 | read system/string.anubis |
| 16 | 16 | read system/convert.anubis |
| 17 | +transmit calexium_lib/web/jQuery/CXM_jquery_datatable_plugins.anubis | |
| 18 | + | |
| 17 | 19 | |
| 18 | 20 | /* Initialize jQuery datatables */ |
| 19 | 21 | public define List(HTML_Head_Tag) |
| ... | ... | @@ -44,11 +46,11 @@ public define List(HTML_Head_Tag) |
| 44 | 46 | [ |
| 45 | 47 | //css(css_file("jquery/plug-in/DataTables-1.10.7/media/css/jquery.dataTables.min.css")), |
| 46 | 48 | //css(css_file("jquery/plug-in/DataTables-1.10.7/media/css/jquery.dataTables_themeroller.css")), |
| 47 | - js(js_file("jquery/plug-in/DataTables-1.10.7/media/js/jquery.dataTables.js")), | |
| 48 | - js(js_file("jquery/plug-in/DataTables-1.10.7/media/js/dataTables.jqueryui.js")) , //only for datatable 1.10 | |
| 49 | - css(css_file("jquery/plug-in/DataTables-1.10.7/media/css/dataTables.jqueryui.css")), //only for datatable 1.10 | |
| 50 | - css(css_file("jquery/plug-in/DataTables-1.10.7/extensions/Scroller/css/dataTables.scroller.min.css")), | |
| 51 | - js(js_file("jquery/plug-in/DataTables-1.10.7/extensions/Scroller/js/dataTables.scroller.js")), | |
| 49 | + js(js_file("js/jquery/plug-in/DataTables-1.10.7/media/js/jquery.dataTables.js")), | |
| 50 | + js(js_file("js/jquery/plug-in/DataTables-1.10.7/media/js/dataTables.jqueryui.js")) , //only for datatable 1.10 | |
| 51 | + css(css_file("js/jquery/plug-in/DataTables-1.10.7/media/css/dataTables.jqueryui.css")), //only for datatable 1.10 | |
| 52 | + css(css_file("js/jquery/plug-in/DataTables-1.10.7/extensions/Scroller/css/dataTables.scroller.min.css")), | |
| 53 | + js(js_file("js/jquery/plug-in/DataTables-1.10.7/extensions/Scroller/js/dataTables.scroller.js")), | |
| 52 | 54 | // css(css_file("jquery/plug-in/DataTables-1.10.7/extensions/Responsive/css/dataTables.responsive.css")), |
| 53 | 55 | // js(js_file("jquery/plug-in/DataTables-1.10.7/extensions/responsive/js/dataTables.responsive.js")), |
| 54 | 56 | ] | ... | ... |
| 1 | +/* | |
| 2 | + * Created by PyramIDE. | |
| 3 | + * User: フランスのトトロ | |
| 4 | + * Date: 25/05/2015 | |
| 5 | + * Time: 22:38 | |
| 6 | + * © Calexium | |
| 7 | + */ | |
| 8 | +read calexium_lib/web/CXM_jquery.anubis | |
| 9 | +read calexium_lib/web/CXM_making_a_web_site.anubis | |
| 10 | + | |
| 11 | +public define List(HTML_Head_Tag) jq_datatable_sorting | |
| 12 | + = | |
| 13 | + [ | |
| 14 | + js(js_file("js/jquery/plug-in/DataTables-1.10.7/plugins/sorting/moment.min.js")), | |
| 15 | + js(js_file("js/jquery/plug-in/DataTables-1.10.7/plugins/sorting/datetime-moment.js")), | |
| 16 | + js_inline(jquery_ready("$.fn.dataTable.moment( 'DD/MM/YYYY HH:mm:ss' );")), | |
| 17 | + | |
| 18 | + ]. | |
| 19 | + | ... | ... |
web/jQuery/CXM_jquery_datatable_translation.anubis
| ... | ... | @@ -14,15 +14,15 @@ public define String |
| 14 | 14 | String language, |
| 15 | 15 | String web_dir |
| 16 | 16 | )= |
| 17 | - | |
| 18 | - with file = if file_exists(web_dir+"/public/jquery/plug-in/DataTables-1.10.7/translation/"+language+".txt") then | |
| 17 | + with lang_file = web_dir+"/public/js/jquery/plug-in/DataTables-1.10.7/translation/"+language+".txt", | |
| 18 | + with file = if file_exists(lang_file) then | |
| 19 | 19 | language |
| 20 | 20 | else |
| 21 | - println("NOT FOUND : "+web_dir+"/public/jquery/plug-in/DataTables-1.10.7/translation/"+language+".txt"); | |
| 21 | + println("NOT FOUND : "+lang_file); | |
| 22 | 22 | "en", |
| 23 | 23 | |
| 24 | 24 | "\"oLanguage\": { |
| 25 | - \"sUrl\": \"/jquery/plug-in/DataTables-1.10.7/translation/"+file+".txt\" | |
| 25 | + \"sUrl\": \"/js/jquery/plug-in/DataTables-1.10.7/translation/"+file+".txt\" | |
| 26 | 26 | }". |
| 27 | 27 | |
| 28 | 28 | ... | ... |