Commit 7d4afbd6af9d06323e5570aa8a6b03988cfeb082
1 parent
56c44e4d
add narrow_small in predefined Width input size which correspond to 20 characters
add html_tooltip_ext without class suffix when we intend to use awesome font
Showing
2 changed files
with
45 additions
and
12 deletions
Show diff stats
web/CXM_form.anubis
| ... | ... | @@ -22,9 +22,10 @@ public type Mandatory: // used to mark fields as mandatory. |
| 22 | 22 | non_mandatory. |
| 23 | 23 | |
| 24 | 24 | public type Width: |
| 25 | - small, | |
| 26 | - narrow, | |
| 27 | - wide, | |
| 25 | + small, //10 char | |
| 26 | + narrow_small, //20 char | |
| 27 | + narrow, //50 char | |
| 28 | + wide, //70 char | |
| 28 | 29 | custom(Int). |
| 29 | 30 | |
| 30 | 31 | public type FormFieldWidth: |
| ... | ... | @@ -421,10 +422,11 @@ public define HTML_In_Form |
| 421 | 422 | pixels = (Width width) |-> |
| 422 | 423 | if width is |
| 423 | 424 | { |
| 424 | - small then 10, | |
| 425 | - narrow then 50, | |
| 426 | - wide then 70, | |
| 427 | - custom(n) then n | |
| 425 | + small then 10, | |
| 426 | + narrow_small then 20, | |
| 427 | + narrow then 50, | |
| 428 | + wide then 70, | |
| 429 | + custom(n) then n | |
| 428 | 430 | }, |
| 429 | 431 | |
| 430 | 432 | |
| ... | ... | @@ -434,7 +436,7 @@ public define HTML_In_Form |
| 434 | 436 | empty, |
| 435 | 437 | |
| 436 | 438 | title(t) then |
| 437 | - literal("<h2>" + t + "</h2>"), | |
| 439 | + literal("<h3>" + t + "</h3>"), | |
| 438 | 440 | |
| 439 | 441 | message(t) then |
| 440 | 442 | literal(t), | ... | ... |
web/CXM_making_a_web_site.anubis
| ... | ... | @@ -962,8 +962,6 @@ public type Actioner_Aspect: |
| 962 | 962 | button (String url_off, String url_on), // rollover button |
| 963 | 963 | button (String url_off, String url_on, Int w, Int h), // idem with size |
| 964 | 964 | submit (List(CoreAttrs),String text), |
| 965 | -// immediate_selector (List(CoreAttrs),WebArgName name, Int size, List((List(CoreAttrs),WebArgValue,String)) choices), | |
| 966 | -// immediate_selector (List(CoreAttrs),WebArgName name, Int size, List((List(CoreAttrs),WebArgValue,String)) choices, InitialValue selected), | |
| 967 | 965 | immediate_selector (List(CoreAttrs),WebArgName name, Int size, List((List(CoreAttrs),WebArgValue,String)) choices, Maybe(InitialValue) selected, String onchange_fn), |
| 968 | 966 | |
| 969 | 967 | html (HTML_Off_Form). |
| ... | ... | @@ -1135,6 +1133,12 @@ public type HTML_tooltip: |
| 1135 | 1133 | String extend_type, |
| 1136 | 1134 | String class_suffix, |
| 1137 | 1135 | List((String, String)) ext_args |
| 1136 | + ), | |
| 1137 | + html_tooltip_ext //same without class suffix. This means we use awesome font | |
| 1138 | + ( | |
| 1139 | + String title, | |
| 1140 | + String extend_type, | |
| 1141 | + List((String, String)) ext_args | |
| 1138 | 1142 | ). |
| 1139 | 1143 | |
| 1140 | 1144 | public define HTML_tooltip |
| ... | ... | @@ -1161,7 +1165,15 @@ public type HTML_Help: |
| 1161 | 1165 | no_help, //no help text available |
| 1162 | 1166 | tooltip(HTML_tooltip, |
| 1163 | 1167 | HTML_Help_Position). |
| 1164 | - | |
| 1168 | + | |
| 1169 | +public define HTML_Help | |
| 1170 | + tooltip | |
| 1171 | + ( | |
| 1172 | + HTML_tooltip h_tooltip | |
| 1173 | + )= | |
| 1174 | + tooltip(h_tooltip, left) | |
| 1175 | +. | |
| 1176 | + | |
| 1165 | 1177 | public type HTML_Label: |
| 1166 | 1178 | no_label, |
| 1167 | 1179 | label( |
| ... | ... | @@ -4280,6 +4292,21 @@ define Printable_tree |
| 4280 | 4292 | // *** [5.8] Formating 'in form' elements. |
| 4281 | 4293 | |
| 4282 | 4294 | |
| 4295 | +//public define Printable_tree | |
| 4296 | +// format | |
| 4297 | +// ( | |
| 4298 | +// HTML_tooltip tooltip | |
| 4299 | +// )= | |
| 4300 | +// if tooltip is | |
| 4301 | +// { | |
| 4302 | +// html_tooltip(title, keyword, width) then | |
| 4303 | +// ["<a id=\"help_",keyword,"\" class=\"jTipu jTip_help\" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_id=",keyword,(if width > 0 then ["&width=",width,"\""] else ["\""]), "></a>"], | |
| 4304 | +// | |
| 4305 | +// html_tooltip_ext(title, extend_type, class_suffix, ext_args) then | |
| 4306 | +// with extra_args = format_extra_operands(ext_args), | |
| 4307 | +// ["<a id=\"jTip\" class=\"jTipu jTip_",class_suffix,"\" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_ext=",extend_type+extra_args,"\"></a>"] | |
| 4308 | +// }. | |
| 4309 | + | |
| 4283 | 4310 | public define Printable_tree |
| 4284 | 4311 | format |
| 4285 | 4312 | ( |
| ... | ... | @@ -4288,11 +4315,15 @@ public define Printable_tree |
| 4288 | 4315 | if tooltip is |
| 4289 | 4316 | { |
| 4290 | 4317 | html_tooltip(title, keyword, width) then |
| 4291 | - ["<a id=\"help_",keyword,"\" class=\"jTipu jTip_help\" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_id=",keyword,(if width > 0 then ["&width=",width,"\""] else ["\""]), "></a>"], | |
| 4318 | + ["<a id=\"help_",keyword,"\" class=\"jTipu \" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_id=",keyword,(if width > 0 then ["&width=",width,"\""] else ["\""]), "><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"], | |
| 4292 | 4319 | |
| 4293 | 4320 | html_tooltip_ext(title, extend_type, class_suffix, ext_args) then |
| 4294 | 4321 | with extra_args = format_extra_operands(ext_args), |
| 4295 | 4322 | ["<a id=\"jTip\" class=\"jTipu jTip_",class_suffix,"\" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_ext=",extend_type+extra_args,"\"></a>"] |
| 4323 | + | |
| 4324 | + html_tooltip_ext(title, extend_type, ext_args) then | |
| 4325 | + with extra_args = format_extra_operands(ext_args), | |
| 4326 | + ["<a id=\"jTip\" class=\"jTipu \" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&tooltip_ext=",extend_type+extra_args,"\"><i class=\"fa fa-info\" aria-hidden=\"true\" style=\"color:#2e6da4\"></i></a>"] | |
| 4296 | 4327 | }. |
| 4297 | 4328 | |
| 4298 | 4329 | public define HTML_Off_Form | ... | ... |