Commit b206a5d06a0127c6bafb6c09e98de1a26e1e38c6

Authored by Steve MARECHAL
1 parent e15e9313

dojo_TabContainer added

calexium_lib/web/CXM_dojo.anubis
... ... @@ -127,10 +127,11 @@ public define HTML_Off_Form
127 127 (
128 128 String id,
129 129 String region,
  130 + String title,
130 131 HTML_Off_Form content
131 132 ) =
132 133 sequence([
133   - literal("<div id=\""+id+"\" dojoType=\"dijit.layout.ContentPane\" region=\""+region+"\" minSize=\"20\" splitter=\"true\">"),
  134 + literal("<div id=\"" + id + "\" dojoType=\"dijit.layout.ContentPane\" title=\"" + title + "\" region=\"" + region + "\">"),
134 135 content,
135 136 literal("</div>")
136 137 ]).
... ... @@ -139,25 +140,20 @@ public define HTML_Off_Form
139 140 dojo_TabContainer
140 141 (
141 142 String id,
142   - String region,
143 143 HTML_Off_Form content
144 144 ) =
145 145 sequence([
146   - literal("<div id=\""+id+"\" dojoType=\"dijit.layout.TabContainer\" region=\""+region+"\">"),
  146 + literal("<div id=\"" + id + "\" dojoType=\"dijit.layout.TabContainer\" style=\"width:54em;height:30em\">"),
147 147 content,
148 148 literal("</div>")
149 149 ]).
150 150  
  151 +
  152 +
151 153 public define HTML_Off_Form
152   - dojo_BorderContainer
  154 + dojo_tree
153 155 (
154 156 String id,
155   - HTML_Off_Form content
156   - ) =
157   - sequence([
158   - literal("<div id=\""+id+"\" dojoType=\"dijit.layout.BorderContainer\" title=\"Inbox\" design=\"sidebar\">"),
159   - content,
160   - literal("</div>")
161   - ]).
162   ->
  157 + )=
  158 + literal("<div id=\"" + id + "\"</div>").
163 159  
... ...
calexium_lib/web/CXM_making_a_web_site.anubis
... ... @@ -1484,7 +1484,8 @@ public type HTTP_Answer:
1484 1484 ByteArray content),
1485 1485 custom_tree(String mime_type,
1486 1486 Printable_tree content),
1487   - http_raw(Printable_tree).
  1487 + http_raw(Printable_tree),
  1488 + html_content(HTML_Off_Form content).
1488 1489  
1489 1490 public define HTTP_Answer
1490 1491 html_page
... ... @@ -2165,7 +2166,7 @@ public type Web_Site:
2165 2166  
2166 2167 We gather common (constant) informations in the following type:
2167 2168  
2168   -type CommonInfo:
  2169 +public type CommonInfo:
2169 2170 info(String common_name,
2170 2171 Word32 http_port,
2171 2172 Word32 https_port,
... ... @@ -3994,7 +3995,7 @@ define Printable_tree
3994 3995 (
3995 3996 CommonInfo cinfo,
3996 3997 String sn, // state_name
3997   - Var(Int) ic_v, // 'idnum' counter variable
  3998 + Var(Int) ic_v, // 'idnum' counter variable
3998 3999 HTML_Off_Form element,
3999 4000 Bool is_https,
4000 4001 ) =
... ... @@ -4316,6 +4317,16 @@ define Printable_tree
4316 4317 content
4317 4318 ],
4318 4319  
4319   - http_raw(Printable_tree content) then content
  4320 + http_raw(Printable_tree content) then content,
  4321 +
  4322 + html_content(HTML_Off_Form content_HTML) then
  4323 + with content = format(cinfo, state_name, ic_v, content_HTML, is_https),
  4324 + [ "HTTP/1.1 200 OK", crlf,
  4325 + format_headers(standard_headers),
  4326 + format_headers(standard_headers_for("text/html", length(content), success(charset))),
  4327 + format_headers(additional_headers),
  4328 + crlf .
  4329 + content
  4330 + ],
4320 4331 }.
4321 4332  
... ...