Commit 52f714f2de75e953319a3c8b93f0b3b554e89efb
1 parent
be009662
--no commit message
Showing
4 changed files
with
22 additions
and
7 deletions
Show diff stats
web/CXM_dojo.anubis
| @@ -825,7 +825,7 @@ public define List(HTML_Head_Tag) | @@ -825,7 +825,7 @@ public define List(HTML_Head_Tag) | ||
| 825 | ) | 825 | ) |
| 826 | = | 826 | = |
| 827 | with theme_name = | 827 | with theme_name = |
| 828 | - if file_exists(web_dir+"js/dojo/dijit/themes/"+theme_name+"/"+theme_name+".css")then theme_name else "claro", | 828 | + if file_exists(web_dir+"/public/js/dojo/dijit/themes/"+theme_name+"/"+theme_name+".css")then theme_name else "claro", |
| 829 | [ css(css_file("js/dojo/dijit/themes/"+theme_name+"/"+theme_name+".css")) . | 829 | [ css(css_file("js/dojo/dijit/themes/"+theme_name+"/"+theme_name+".css")) . |
| 830 | [ css(css_file("js/dojo/dijit/themes/"+theme_name+"/"+theme_name+"_rtl.css")) . dojo_defaults ] | 830 | [ css(css_file("js/dojo/dijit/themes/"+theme_name+"/"+theme_name+"_rtl.css")) . dojo_defaults ] |
| 831 | ] | 831 | ] |
web/CXM_jquery.anubis
| @@ -40,8 +40,9 @@ public define List(HTML_Head_Tag) | @@ -40,8 +40,9 @@ public define List(HTML_Head_Tag) | ||
| 40 | String theme_name | 40 | String theme_name |
| 41 | ) | 41 | ) |
| 42 | = | 42 | = |
| 43 | - if file_exists(web_dir+"/css/jquery/"+theme_name+"/jquery-ui-1.8.23.custom.css") then | 43 | + if file_exists(web_dir+"/public/css/jquery/"+theme_name+"/jquery-ui-1.8.23.custom.css") then |
| 44 | [ css(css_file("/css/jquery/"+theme_name+"/jquery-ui-1.8.23.custom.css")) . jquery_defaults ] | 44 | [ css(css_file("/css/jquery/"+theme_name+"/jquery-ui-1.8.23.custom.css")) . jquery_defaults ] |
| 45 | else | 45 | else |
| 46 | + println("Jquery Theme not found "+web_dir+"/css/jquery/"+theme_name+"/jquery-ui-1.8.23.custom.css"); | ||
| 46 | [ css(css_file("/css/jquery/redmond/jquery-ui-1.8.23.custom.css")) . jquery_defaults ] | 47 | [ css(css_file("/css/jquery/redmond/jquery-ui-1.8.23.custom.css")) . jquery_defaults ] |
| 47 | . | 48 | . |
web/CXM_jquery_tabs.anubis
| @@ -11,9 +11,20 @@ read calexium_lib/web/CXM_making_a_web_site.anubis | @@ -11,9 +11,20 @@ read calexium_lib/web/CXM_making_a_web_site.anubis | ||
| 11 | read tools/basis.anubis | 11 | read tools/basis.anubis |
| 12 | 12 | ||
| 13 | public type JQuery_tab: | 13 | public type JQuery_tab: |
| 14 | - jQuery_tab(String title, HTML_Off_Form content) | 14 | + jQuery_tab(String title, HTML_Partial_Content content) |
| 15 | . | 15 | . |
| 16 | 16 | ||
| 17 | + // Helper to be compatible with the first version of JQuery_tab which | ||
| 18 | + // take HTML_Off_Form as second argument instead of HTML_Partial_Content. | ||
| 19 | + | ||
| 20 | +public define JQuery_tab | ||
| 21 | + jQuery_tab | ||
| 22 | + ( | ||
| 23 | + String title, | ||
| 24 | + HTML_Off_Form content | ||
| 25 | + )= | ||
| 26 | + jQuery_tab(title, partial_content([], content)). | ||
| 27 | + | ||
| 17 | 28 | ||
| 18 | define HTML_Partial_Content | 29 | define HTML_Partial_Content |
| 19 | _jquery_tabs | 30 | _jquery_tabs |
| @@ -22,6 +33,7 @@ define HTML_Partial_Content | @@ -22,6 +33,7 @@ define HTML_Partial_Content | ||
| 22 | List(JQuery_tab) tabs, | 33 | List(JQuery_tab) tabs, |
| 23 | String tabs_titles, | 34 | String tabs_titles, |
| 24 | List(HTML_Off_Form) tabs_contents, | 35 | List(HTML_Off_Form) tabs_contents, |
| 36 | + List(HTML_Head_Tag) tabs_heads, | ||
| 25 | Int count | 37 | Int count |
| 26 | ) | 38 | ) |
| 27 | = | 39 | = |
| @@ -29,14 +41,15 @@ define HTML_Partial_Content | @@ -29,14 +41,15 @@ define HTML_Partial_Content | ||
| 29 | { | 41 | { |
| 30 | [ ] then | 42 | [ ] then |
| 31 | partial_content( | 43 | partial_content( |
| 32 | - [], | 44 | + reverse(tabs_heads), |
| 33 | sequence([ | 45 | sequence([ |
| 34 | literal("<ul>"+tabs_titles+"</ul>"), | 46 | literal("<ul>"+tabs_titles+"</ul>"), |
| 35 | sequence(reverse(tabs_contents)) | 47 | sequence(reverse(tabs_contents)) |
| 36 | ]) | 48 | ]) |
| 37 | ), | 49 | ), |
| 38 | [ h . t ] then | 50 | [ h . t ] then |
| 39 | - if h is jQuery_tab(title, content) then | 51 | + if h is jQuery_tab(title, p_content) then |
| 52 | + if p_content is partial_content(tags, content) then | ||
| 40 | _jquery_tabs( | 53 | _jquery_tabs( |
| 41 | tabs_container_id, | 54 | tabs_container_id, |
| 42 | t, | 55 | t, |
| @@ -50,6 +63,7 @@ define HTML_Partial_Content | @@ -50,6 +63,7 @@ define HTML_Partial_Content | ||
| 50 | . | 63 | . |
| 51 | tabs_contents | 64 | tabs_contents |
| 52 | ], | 65 | ], |
| 66 | + tags + tabs_heads, | ||
| 53 | count+1 | 67 | count+1 |
| 54 | ) | 68 | ) |
| 55 | } | 69 | } |
| @@ -63,7 +77,7 @@ public define HTML_Partial_Content | @@ -63,7 +77,7 @@ public define HTML_Partial_Content | ||
| 63 | List(JQuery_tab) tabs | 77 | List(JQuery_tab) tabs |
| 64 | ) | 78 | ) |
| 65 | = | 79 | = |
| 66 | - if _jquery_tabs(tabs_container_id, tabs, "", [], 0) is partial_content(tags, html) then | 80 | + if _jquery_tabs(tabs_container_id, tabs, "", [], [], 0) is partial_content(tags, html) then |
| 67 | partial_content( | 81 | partial_content( |
| 68 | [ | 82 | [ |
| 69 | js_inline(script("", "$(document).ready(function(){$('#"+tabs_container_id+"').tabs();});")) | 83 | js_inline(script("", "$(document).ready(function(){$('#"+tabs_container_id+"').tabs();});")) |
web/CXM_making_a_web_site.anubis
| @@ -4393,7 +4393,7 @@ define Printable_tree | @@ -4393,7 +4393,7 @@ define Printable_tree | ||
| 4393 | title(title) then | 4393 | title(title) then |
| 4394 | ["<title>"+title+"</title>" . _format_html_head(t, so_far)], | 4394 | ["<title>"+title+"</title>" . _format_html_head(t, so_far)], |
| 4395 | js(jsf) then | 4395 | js(jsf) then |
| 4396 | - ["<script src=\""+file_name(jsf)+"\"></script>" . _format_html_head(t, so_far)], | 4396 | + [add_js_files([jsf]) . _format_html_head(t, so_far)], |
| 4397 | js_inline(jsi) then | 4397 | js_inline(jsi) then |
| 4398 | ["<script>"+content(jsi)+"</script>" . _format_html_head(t, so_far)], | 4398 | ["<script>"+content(jsi)+"</script>" . _format_html_head(t, so_far)], |
| 4399 | css(cssf) then | 4399 | css(cssf) then |