Commit 763be6874362b7cfa6a8d73604f9c94502091ffb

Authored by Cédric RICARD
1 parent d384a763

XHTML cleanup

Allowing to define the states folder
Showing 1 changed file with 9 additions and 8 deletions   Show diff stats
calexium_lib/web/CXM_making_a_web_site.anubis
@@ -2114,6 +2114,7 @@ public define Web_Site @@ -2114,6 +2114,7 @@ public define Web_Site
2114 ( 2114 (
2115 List(String) common_names, // for example: ["www.our-business.com"] 2115 List(String) common_names, // for example: ["www.our-business.com"]
2116 String site_directory, 2116 String site_directory,
  2117 + String state_directory,
2117 One -> One init, 2118 One -> One init,
2118 (HTTP_Info) -> (Maybe($SessionTicket), Maybe($State), List(HTTP_header)) initial_state, 2119 (HTTP_Info) -> (Maybe($SessionTicket), Maybe($State), List(HTTP_header)) initial_state,
2119 ($State expired, 2120 ($State expired,
@@ -2143,7 +2144,7 @@ public define Web_Site @@ -2143,7 +2144,7 @@ public define Web_Site
2143 // 2144 //
2144 with web_sites_directory = make_directory(my_anubis_directory+"/web_sites"), 2145 with web_sites_directory = make_directory(my_anubis_directory+"/web_sites"),
2145 base_directory = make_directory(site_directory), 2146 base_directory = make_directory(site_directory),
2146 - state_directory = make_directory(site_directory+"/states"), 2147 + // state_directory = make_directory(site_directory+"/states"),
2147 forget(make_directory(site_directory+"/public")); 2148 forget(make_directory(site_directory+"/public"));
2148 // 2149 //
2149 // construct tool functions 2150 // construct tool functions
@@ -2656,7 +2657,7 @@ public define Printable_tree @@ -2656,7 +2657,7 @@ public define Printable_tree
2656 if l is 2657 if l is
2657 { 2658 {
2658 [ ] then [ ], 2659 [ ] then [ ],
2659 - [h . t] then ["<option>",h . format_choices(t)] 2660 + [h . t] then ["<option>", h, "</option>\n" . format_choices(t)]
2660 }. 2661 }.
2661 2662
2662 2663
@@ -2670,8 +2671,8 @@ public define Printable_tree @@ -2670,8 +2671,8 @@ public define Printable_tree
2670 { 2671 {
2671 [ ] then [ ], 2672 [ ] then [ ],
2672 [h . t] then if h = selected.value 2673 [h . t] then if h = selected.value
2673 - then ["<option selected>",h . format_choices(t)]  
2674 - else ["<option>",h . format_choices(t,selected)] 2674 + then ["<option selected>", h, "</option>\n" . format_choices(t)]
  2675 + else ["<option>", h, "</option>\n" . format_choices(t,selected)]
2675 }. 2676 }.
2676 2677
2677 2678
@@ -2685,7 +2686,7 @@ public define Printable_tree @@ -2685,7 +2686,7 @@ public define Printable_tree
2685 [ ] then [ ], 2686 [ ] then [ ],
2686 [h . t] then 2687 [h . t] then
2687 if h is (val,item) 2688 if h is (val,item)
2688 - then ["<option value=\""+val.value+"\">",item . format_choices(t)] 2689 + then ["<option value=\""+val.value+"\">", item, "</option>\n" . format_choices(t)]
2689 }. 2690 }.
2690 2691
2691 public define Printable_tree 2692 public define Printable_tree
@@ -2700,8 +2701,8 @@ public define Printable_tree @@ -2700,8 +2701,8 @@ public define Printable_tree
2700 [h . t] then 2701 [h . t] then
2701 if h is (val,item) then 2702 if h is (val,item) then
2702 if val.value = selected.value 2703 if val.value = selected.value
2703 - then ["<option value=\""+val.value+"\" selected=\"selected\">",item . format_choices(t)]  
2704 - else ["<option value=\""+val.value+"\">",item . format_choices(t,selected)] 2704 + then ["<option value=\""+val.value+"\" selected=\"selected\">", item, "</option>\n" . format_choices(t)]
  2705 + else ["<option value=\""+val.value+"\">", item, "</option>\n" . format_choices(t,selected)]
2705 }. 2706 }.
2706 2707
2707 2708
@@ -3755,7 +3756,7 @@ define Printable_tree @@ -3755,7 +3756,7 @@ define Printable_tree
3755 "<input type=\"file\" id=\"",id,"\" size=\"",w,"\" name=\"o",n,"\" />"], 3756 "<input type=\"file\" id=\"",id,"\" size=\"",w,"\" name=\"o",n,"\" />"],
3756 selector(opts, label, id, n,s,cs) then 3757 selector(opts, label, id, n,s,cs) then
3757 ["<label for=\"",id,"\">",label,"</label>", 3758 ["<label for=\"",id,"\">",label,"</label>",
3758 - "<select name=\"o",n,"\" size=\"",s,"\" ",format_attrs(opts),">",format_choices(cs),"</select>"], 3759 + "<select id=\"",id,"\" name=\"o",n,"\" size=\"",s,"\" ",format_attrs(opts),">",format_choices(cs),"</select>"],
3759 selector(opts, label, id, n,s,cs,sd) then 3760 selector(opts, label, id, n,s,cs,sd) then
3760 ["<label for=\"",id,"\">",label,"</label>", 3761 ["<label for=\"",id,"\">",label,"</label>",
3761 "<select name=\"o",n,"\" size=\"",s,"\" ",format_attrs(opts),">",format_choices(cs,sd),"</select>"], 3762 "<select name=\"o",n,"\" size=\"",s,"\" ",format_attrs(opts),">",format_choices(cs,sd),"</select>"],