Commit bc9219ca266359876570b1642e5f279da9a79d41

Authored by totoro
1 parent 7437969b

Create HTML_Label with tooltip in the input label

change HtmlId by HTML_Id
web/CXM_dojo.anubis
... ... @@ -67,11 +67,11 @@ public type Input_Type:
67 67 password.
68 68  
69 69 public type InputDial:
70   - input_dial(HtmlId id, Input_Type input_type, String label, Maybe(String) class),
71   - input_date(HtmlId id, String label),
72   - input_combo(HtmlId id, String label, List((List(CoreAttrs), WebArgValue, String)) list_data),
73   - input_check(HtmlId id, String label, Bool checked),
74   - input_hidden(HtmlId id, WebArgValue value).
  70 + input_dial(HTML_Id id, Input_Type input_type, String label, Maybe(String) class),
  71 + input_date(HTML_Id id, String label),
  72 + input_combo(HTML_Id id, String label, List((List(CoreAttrs), WebArgValue, String)) list_data),
  73 + input_check(HTML_Id id, String label, Bool checked),
  74 + input_hidden(HTML_Id id, WebArgValue value).
75 75  
76 76  
77 77 define List(HTML_Off_Form)
... ... @@ -92,7 +92,7 @@ public define HTML_Off_Form
92 92 dojo_combobox
93 93 (
94 94 WebArgName the_name,
95   - HtmlId the_id,
  95 + HTML_Id the_id,
96 96 String label,
97 97 List((List(CoreAttrs), WebArgValue, String)) list_data,
98 98 )=
... ... @@ -110,7 +110,7 @@ define HTML_Off_Form
110 110 _maybe_label
111 111 (
112 112 String label_text,
113   - HtmlId html_id
  113 + HTML_Id html_id
114 114 ) =
115 115 if length(label_text) > 0 then literal("<label for=\"" + html_id.id + "\">" + label_text + "</label>")
116 116 else literal("").
... ... @@ -119,7 +119,7 @@ public define HTML_Off_Form
119 119 dojo_checkbox
120 120 (
121 121 WebArgName the_name,
122   - HtmlId the_id,
  122 + HTML_Id the_id,
123 123 String label,
124 124 WebArgValue val,
125 125 Bool checked,
... ... @@ -316,7 +316,7 @@ define String to_String(DojoGridView view) =
316 316 public define String
317 317 dojo_make_grid_script
318 318 (
319   - HtmlId html_id,
  319 + HTML_Id html_id,
320 320 DojoGridLayout layout,
321 321 String layout_name,
322 322 String store_name,
... ... @@ -333,7 +333,7 @@ public define String
333 333 public define HTML_Off_Form
334 334 dojo_make_grid_script
335 335 (
336   - HtmlId html_id,
  336 + HTML_Id html_id,
337 337 List(String) columns,
338 338 Bool can_edit
339 339 )
... ... @@ -349,7 +349,7 @@ public define HTML_Off_Form
349 349 public define HTML_Off_Form
350 350 dojo_grid
351 351 (
352   - HtmlId html_id,
  352 + HTML_Id html_id,
353 353 Int rowsPerPage,
354 354 List(Table_Option) attributes,
355 355 )=
... ... @@ -361,7 +361,7 @@ public define HTML_Off_Form
361 361 public define HTML_Off_Form
362 362 dojo_grid
363 363 (
364   - HtmlId html_id,
  364 + HTML_Id html_id,
365 365 List(CoreAttrs) attributes,
366 366 // List(GridColumn) columns,
367 367 String colum1,
... ... @@ -558,7 +558,7 @@ public define HTML_Off_Form
558 558 (
559 559 List(CoreAttrs) attributes,
560 560 List(Text_Option) txt_attr,
561   - HtmlId html_id,
  561 + HTML_Id html_id,
562 562 String label,
563 563 HTML_Off_Form tooltip_content,
564 564 )=
... ... @@ -571,7 +571,7 @@ public define HTML_Off_Form
571 571 public define HTML_Off_Form
572 572 dojo_button
573 573 (
574   - HtmlId html_id,
  574 + HTML_Id html_id,
575 575 // Maybe(String) class,
576 576 String name,
577 577 String iconclass,
... ... @@ -595,7 +595,7 @@ public define HTML_Off_Form
595 595 public define HTML_In_Form
596 596 dojo_button
597 597 (
598   - HtmlId html_id,
  598 + HTML_Id html_id,
599 599 // Maybe(String) class,
600 600 String name,
601 601 String iconclass,
... ... @@ -642,7 +642,7 @@ public define HTML_Off_Form
642 642 dojo_editor
643 643 (
644 644 List(CoreAttrs) attributes,
645   - HtmlId html_id,
  645 + HTML_Id html_id,
646 646 WebArgName input_name,
647 647 HTML_Off_Form text,
648 648 )=
... ... @@ -653,7 +653,7 @@ public define HTML_Off_Form
653 653 public define HTML_In_Form
654 654 dojo_button
655 655 (
656   - HtmlId html_id,
  656 + HTML_Id html_id,
657 657 String name,
658 658 String iconclass,
659 659 Maybe(String) tip_msg,
... ... @@ -671,33 +671,33 @@ public define HTML_Off_Form
671 671 public define HTML_In_Form
672 672 dojo_checkbox
673 673 (
674   - List(InputAttrs) attributes,
  674 + List(CoreAttrs) attributes,
675 675 WebArgName name,
676   - HtmlId id,
677   - String label,
  676 + HTML_Id id,
  677 + String label_str,
678 678 WebArgValue val,
679 679 Bool checked,
680 680 )=
681   - check_box_r([attr("dojoType", "dijit.form.CheckBox") . attributes] , label, id, name, val, checked).
  681 + check_box_r([attr("dojoType", "dijit.form.CheckBox") . attributes] , label(label_str, no_help), id, name, val, checked).
682 682  
683 683 public define HTML_In_Form
684 684 dojo_combobox
685 685 (
686   - List(InputAttrs) attributes,
  686 + List(CoreAttrs) attributes,
687 687 WebArgName name,
688   - HtmlId id,
689   - String label,
  688 + HTML_Id id,
  689 + String label_str,
690 690 List((List(CoreAttrs),WebArgValue,String)) list_data,
691 691 InitialValue selected,
692 692 )=
693 693 // selector_c([attr("dojoType", "dijit.form.ComboBox") . attributes], label, id, name, 1, list_data, selected, non_mandatory).
694   - selector_c(attributes, label, id, name, 1, list_data, selected).
  694 + selector_c([attr("dojoType", "dijit.form.ComboBox") . attributes], label(label_str, no_help), id, name, 1, list_data, selected).
695 695  
696 696 public define HTML_Off_Form
697 697 dojo_toaster
698 698 (
699 699 List(CoreAttrs) attributes,
700   - HtmlId html_id,
  700 + HTML_Id html_id,
701 701 String message_topic,
702 702 Position_Direction position_direction,
703 703 Bool separator,
... ... @@ -720,7 +720,7 @@ public define HTML_Off_Form
720 720 (
721 721 List(CoreAttrs) attributes,
722 722 List(Text_Option) attributes_text,
723   - HtmlId html_id,
  723 + HTML_Id html_id,
724 724 String label
725 725 )=
726 726 sequence([
... ... @@ -733,7 +733,7 @@ public define HTML_Off_Form
733 733 (
734 734 List(CoreAttrs) attributes,
735 735 List(Text_Option) attributes_text,
736   - HtmlId html_id,
  736 + HTML_Id html_id,
737 737 String label,
738 738 Int progress,
739 739 Int maximum
... ...
web/CXM_form.anubis
... ... @@ -30,145 +30,167 @@ public type Width:
30 30 public type FormFieldWidth:
31 31 auto,
32 32 custom(Int).
33   -
34   -public type CXM_FormTooltip:
35   - tooltip(String title, String content, Int width).
36 33  
37 34 public type CXM_Form_Field:
38   - no_field, // empty field
  35 + no_field, // empty field
39 36  
40 37 //--- title field ---------------------------------------------------------------------
41   - title (String text),
42   -// title (Int text_size,
43   -// String text),
44   -// title_f (List(Text_Option) -> HTML_In_Form),
  38 + title(
  39 + String text
  40 + ),
45 41  
46 42 //--- message field -------------------------------------------------------------------
47   - message (String text),
  43 + message(
  44 + String text
  45 + ),
48 46  
49 47 //--- text input field ----------------------------------------------------------------
50   - input (List(InputAttrs) options,
51   - String label,
52   - HtmlId id,
53   - WebArgName web_arg_name,
54   - InitialValue init_value,
55   - Width width,
56   - Mandatory mandatory),
57   - input_readonly (List(InputAttrs) options,
58   - String label,
59   - HtmlId id,
60   - WebArgName web_arg_name,
61   - InitialValue init_value,
62   - Width width),
  48 + input(
  49 + List(CoreAttrs) options,
  50 + HTML_Label label,
  51 + HTML_Id id,
  52 + WebArgName web_arg_name,
  53 + InitialValue init_value,
  54 + Width width,
  55 + Mandatory mandatory
  56 + ),
  57 +
  58 + input_readonly(
  59 + List(CoreAttrs) options,
  60 + HTML_Label label,
  61 + HTML_Id id,
  62 + WebArgName web_arg_name,
  63 + InitialValue init_value,
  64 + Width width
  65 + ),
63 66  
64 67 //--- text area field -----------------------------------------------------------------
65   - text_area (List(TextAreaOption) options,
66   - String label,
67   - HtmlId id,
68   - WebArgName web_arg_name,
69   - InitialValue init_value,
70   - Width width,
71   - Int height,
72   - Mandatory mandatory),
  68 + text_area(
  69 + List(TextAreaOption) options,
  70 + HTML_Label label,
  71 + HTML_Id id,
  72 + WebArgName web_arg_name,
  73 + InitialValue init_value,
  74 + Width width,
  75 + Int height,
  76 + Mandatory mandatory
  77 + ),
73 78  
74 79 //--- password input field ------------------------------------------------------------
75   - password_input (List(InputAttrs) options,
76   - String label,
77   - HtmlId id,
78   - WebArgName web_arg_name,
79   - InitialValue init_value,
80   - Width width,
81   - Mandatory mandatory),
  80 + password_input(
  81 + List(CoreAttrs) options,
  82 + HTML_Label label,
  83 + HTML_Id id,
  84 + WebArgName web_arg_name,
  85 + InitialValue init_value,
  86 + Width width,
  87 + Mandatory mandatory),
82 88  
83 89 //--- hidden field ------------------------------------------------------------
84   - hidden (HtmlId id,
85   - WebArgName web_arg_name,
86   - WebArgValue init_value),
  90 + hidden(
  91 + HTML_Id id,
  92 + WebArgName web_arg_name,
  93 + WebArgValue init_value
  94 + ),
87 95 //--- explanation field ---------------------------------------------------------------
88   - explain (String text),
  96 + explain(
  97 + String text
  98 + ),
89 99  
90 100 //--- selector field ------------------------------------------------------------------
91   - selector (List(InputAttrs) options,
92   - String label,
93   - HtmlId id,
94   - WebArgName web_arg_name,
95   - Int size,
96   - List(String) items,
97   - Maybe(InitialValue) selected,
98   - Mandatory mandatory),
  101 + selector(
  102 + List(CoreAttrs) options,
  103 + HTML_Label label,
  104 + HTML_Id id,
  105 + WebArgName web_arg_name,
  106 + Int size,
  107 + List(String) items,
  108 + Maybe(InitialValue) selected,
  109 + Mandatory mandatory
  110 + ),
99 111  
100   - selector_c (List(InputAttrs) options,
101   - String label,
102   - HtmlId id,
103   - WebArgName web_arg_name,
104   - Int size,
105   - List((List(CoreAttrs), WebArgValue, String)) items,
106   - Maybe(InitialValue) selected,
107   - Mandatory mandatory),
  112 + selector_c(
  113 + List(CoreAttrs) options,
  114 + HTML_Label label,
  115 + HTML_Id id,
  116 + WebArgName web_arg_name,
  117 + Int size,
  118 + List((List(CoreAttrs), WebArgValue, String)) items,
  119 + Maybe(InitialValue) selected,
  120 + Mandatory mandatory
  121 + ),
108 122  
109   - selector_hide_show (List(InputAttrs) options,
110   - String label,
111   - HtmlId id,
  123 + selector_hide_show (List(CoreAttrs) options,
  124 + HTML_Label label,
  125 + HTML_Id id,
112 126 WebArgName web_arg_name,
113   - Int size,
  127 + Int size,
114 128 List((List(CoreAttrs), WebArgValue, String, HTML_Partial_Content)) items,
115 129 Maybe(InitialValue) selected,
116 130 Mandatory mandatory),
117 131  
118 132 //--- checkbox field ------------------------------------------------------------------
119   - checkbox (List(InputAttrs) options,
120   - String label,
121   - HtmlId id,
122   - WebArgName web_arg_name,
123   - WebArgValue web_arg_value,
124   - Bool checked,
125   - Mandatory mandatory),
  133 + checkbox (List(CoreAttrs) options,
  134 + HTML_Label label,
  135 + HTML_Id id,
  136 + WebArgName web_arg_name,
  137 + WebArgValue web_arg_value,
  138 + Bool checked,
  139 + Mandatory mandatory),
126 140  
127 141 // the same one, but with the tag on the right of the checkbox
128   - checkboxr (List(InputAttrs) options,
129   - String label,
130   - HtmlId id,
131   - WebArgName web_arg_name,
132   - WebArgValue web_arg_value,
133   - Bool checked,
134   - Mandatory mandatory),
  142 + checkboxr(
  143 + List(CoreAttrs) options,
  144 + HTML_Label label,
  145 + HTML_Id id,
  146 + WebArgName web_arg_name,
  147 + WebArgValue web_arg_value,
  148 + Bool checked,
  149 + Mandatory mandatory
  150 + ),
135 151  
136 152 //checkbox_hide_show
137   - checkbox_hide_show( List(InputAttrs) options,
138   - String label,
139   - WebArgName web_arg_name,
140   - WebArgValue web_arg_value,
141   - Bool checked,
142   - List(CXM_Form_Field) fields),
  153 + checkbox_hide_show(
  154 + List(CoreAttrs) options,
  155 + HTML_Label label,
  156 + WebArgName web_arg_name,
  157 + WebArgValue web_arg_value,
  158 + Bool checked,
  159 + List(CXM_Form_Field) fields
  160 + ),
143 161  
144 162 //--- radio-button field --------------------------------------------------------------
145   - radio_button (List(InputAttrs) options,
146   - String label,
147   - HtmlId id,
148   - WebArgName web_arg_name,
149   - WebArgValue web_arg_value,
150   - Bool checked,
151   - Mandatory mandatory),
  163 + radio_button(
  164 + List(CoreAttrs) options,
  165 + HTML_Label label,
  166 + HTML_Id id,
  167 + WebArgName web_arg_name,
  168 + WebArgValue web_arg_value,
  169 + Bool checked,
  170 + Mandatory mandatory
  171 + ),
152 172 //radio_button_hide_show
153 173 radio_button_hide_show(
154   - List(InputAttrs) options,
155   - String label,
156   - WebArgName web_arg_name,
157   - WebArgValue web_arg_value,
158   - Bool checked,
159   - List(CXM_Form_Field) fields),
  174 + List(CoreAttrs) options,
  175 + HTML_Label label,
  176 + WebArgName web_arg_name,
  177 + WebArgValue web_arg_value,
  178 + Bool checked,
  179 + List(CXM_Form_Field) fields
  180 + ),
160 181 // the same one, but with the tag on the right of the radio_button
161   - radio_buttonr (List(InputAttrs) options,
162   - String label,
163   - HtmlId id,
  182 + radio_buttonr (List(CoreAttrs) options,
  183 + HTML_Label label,
  184 + HTML_Id id,
164 185 WebArgName web_arg_name,
165 186 WebArgValue web_arg_value,
166 187 Bool checked,
167 188 Mandatory mandatory),
168 189  
169   - radio_button_list (List(InputAttrs) options,
170   - String label,
171   - HtmlId id,
  190 + radio_button_list(
  191 + List(CoreAttrs) options,
  192 + HTML_Label label,
  193 + HTML_Id id,
172 194 WebArgName web_arg_name,
173 195 List((WebArgValue, String)) web_arg_value,
174 196 Maybe(InitialValue) selected,
... ... @@ -189,24 +211,24 @@ public type CXM_Form_Field:
189 211 // preview (String html_text),
190 212  
191 213 //--- upload field -------------------------------------------------------------------
192   - upload (List(InputAttrs) options,
193   - String label,
194   - HtmlId id,
195   - WebArgName name,
196   - Width width,
197   - Mandatory mandatory),
198   -
199   - raw_in_form (HTML_In_Form html),
200   - raw_in_form (String label,
201   - HtmlId id,
202   - HTML_In_Form input),
  214 + upload (List(CoreAttrs) options,
  215 + HTML_Label label,
  216 + HTML_Id id,
  217 + WebArgName name,
  218 + Width width,
  219 + Mandatory mandatory),
  220 +
  221 + raw_in_form (HTML_In_Form html),
  222 + label_for ( String label,
  223 + HTML_Id id,
  224 + HTML_In_Form input),
203 225 div (List(CoreAttrs), HTML_In_Form content),
204 226 partial (HTML_Partial_Content p_content),
205 227 br,
206   - input_with_help (CXM_Form_Field field,
207   - Maybe(String) help_title,
208   - String help_text,
209   - Int width),
  228 +// input_with_help (CXM_Form_Field field,
  229 +// Maybe(String) help_title,
  230 +// String help_text,
  231 +// Int width),
210 232  
211 233 fieldset (List(CoreAttrs) options,
212 234 String legend,
... ... @@ -230,7 +252,7 @@ public type CXM_Form_Field:
230 252 public define CXM_Form_Field
231 253 fieldset
232 254 (
233   - HtmlId fieldSetId,
  255 + HTML_Id fieldSetId,
234 256 List(CXM_Form_Field) fields
235 257 ) =
236 258 fieldset([id(fieldSetId.id)], "", fields).
... ... @@ -252,39 +274,39 @@ public define CXM_Form_Field
252 274  
253 275 public define CXM_Form_Field
254 276 input(WebArgName n, InitialValue init_value, Width width)
255   - = input([], "", htmlId(n.name), n, init_value, width, non_mandatory).
  277 + = input([], no_label, html_Id(n.name), n, init_value, width, non_mandatory).
256 278  
257 279 public define CXM_Form_Field
258   - input(String label, WebArgName n, InitialValue init_value, Width width)
259   - = input([], label, htmlId(n.name), n, init_value, width, non_mandatory).
  280 + input(HTML_Label label, WebArgName n, InitialValue init_value, Width width)
  281 + = input([], label, html_Id(n.name), n, init_value, width, non_mandatory).
260 282  
261 283 public define CXM_Form_Field
262   - input(String label, WebArgName n, InitialValue init_value, Width width, Mandatory mand)
263   - = input([], label, htmlId(n.name), n, init_value, width, mand).
  284 + input(HTML_Label label, WebArgName n, InitialValue init_value, Width width, Mandatory mand)
  285 + = input([], label, html_Id(n.name), n, init_value, width, mand).
264 286  
265 287 public define CXM_Form_Field
266   - input_readonly(String label, WebArgName n, InitialValue init_value, Width width)
267   - = input_readonly([], label, htmlId(n.name), n, init_value, width).
  288 + input_readonly(HTML_Label label, WebArgName n, InitialValue init_value, Width width)
  289 + = input_readonly([], label, html_Id(n.name), n, init_value, width).
268 290  
269 291 public define CXM_Form_Field
270   - password_input(String label, WebArgName n, InitialValue init_value, Width width, Mandatory mand)
271   - = password_input([], label, htmlId(n.name), n, init_value, width, mand).
  292 + password_input(HTML_Label label, WebArgName n, InitialValue init_value, Width width, Mandatory mand)
  293 + = password_input([], label, html_Id(n.name), n, init_value, width, mand).
272 294  
273 295 public define CXM_Form_Field
274   - checkbox(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand)
275   - = checkbox([], label, htmlId(n.name), n, value, checked, mand).
  296 + checkbox(HTML_Label label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand)
  297 + = checkbox([], label, html_Id(n.name), n, value, checked, mand).
276 298  
277 299 public define CXM_Form_Field
278   - checkboxr(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand)
279   - = checkboxr([], label, htmlId(n.name), n, value, checked, mand).
  300 + checkboxr(HTML_Label label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand)
  301 + = checkboxr([], label, html_Id(n.name), n, value, checked, mand).
280 302  
281 303 public define CXM_Form_Field
282   - radio_button(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand)
283   - = radio_button([], label, htmlId(n.name), n, value, checked, mand).
  304 + radio_button(HTML_Label label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand)
  305 + = radio_button([], label, html_Id(n.name), n, value, checked, mand).
284 306  
285 307 public define CXM_Form_Field
286   - radio_buttonr(String label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand)
287   - = radio_buttonr([], label, htmlId(n.name), n, value, checked, mand).
  308 + radio_buttonr(HTML_Label label, WebArgName n, WebArgValue value, Bool checked, Mandatory mand)
  309 + = radio_buttonr([], label, html_Id(n.name), n, value, checked, mand).
288 310  
289 311 public define CXM_Form_Field
290 312 submit(String action_name, HtmlClass class, Maybe(String) label, String button_text, List((String,String)) extra_operands)
... ... @@ -295,18 +317,18 @@ public define CXM_Form_Field
295 317 = submit([], htmlClass(""), action_name, label, button_text, extra_operands).
296 318  
297 319 public define CXM_Form_Field
298   - upload(String label, HtmlId id, WebArgName name, Width width)
  320 + upload(HTML_Label label, HTML_Id id, WebArgName name, Width width)
299 321 = upload([], label, id, name, width, non_mandatory).
300 322  
301 323 public define CXM_Form_Field
302   - upload(String label, HtmlId id, WebArgName name, Width width, Mandatory mand)
  324 + upload(HTML_Label label, HTML_Id id, WebArgName name, Width width, Mandatory mand)
303 325 = upload([], label, id, name, width, mand).
304 326  
305   -public define CXM_Form_Field
  327 + public define CXM_Form_Field
306 328 input_with_help (CXM_Form_Field field, String help_text)
307 329 = input_with_help (field, failure, help_text, 250).
308 330  
309   -public define CXM_Form_Field
  331 + public define CXM_Form_Field
310 332 input_with_help (CXM_Form_Field field, String help_text, Int width)
311 333 = input_with_help (field, failure, help_text, width).
312 334  
... ... @@ -314,11 +336,11 @@ public define CXM_Form_Field
314 336 ip_input
315 337 (
316 338 String label,
317   - HtmlId id,
  339 + HTML_Id id,
318 340 WebArgName wan_prefix,
319 341 String ip
320 342 )=
321   - raw_in_form(
  343 + label_for(
322 344 label,
323 345 id,
324 346 ip_input(id, wan_prefix, ip)
... ... @@ -328,13 +350,13 @@ public define CXM_Form_Field
328 350 public define CXM_Form_Field
329 351 partial_ip_input
330 352 (
331   - String label,
332   - HtmlId id,
333   - WebArgName wan_prefix,
  353 + String label,
  354 + HTML_Id id,
  355 + WebArgName wan_prefix,
334 356 List(String) ip_fixed_part,
335 357 String ip
336 358 )=
337   - raw_in_form(
  359 + label_for(
338 360 label,
339 361 id,
340 362 partial_ip_input(id, wan_prefix, ip_fixed_part, ip)
... ... @@ -346,7 +368,7 @@ public define CXM_Form_Field
346 368 WebArgName web_arg_name,
347 369 WebArgValue value
348 370 )=
349   - hidden(htmlId(""), web_arg_name, value).
  371 + hidden(html_Id(""), web_arg_name, value).
350 372  
351 373  
352 374 //--- explanation field ---------------------
... ... @@ -384,11 +406,17 @@ public define HTML_In_Form
384 406 CXM_Form_Field ff,
385 407 List(Web_arg) lwa
386 408 ) =
387   - with star = (Mandatory m) |-> (String)
  409 + with star = (HTML_Label l, Mandatory m) |-> (HTML_Label)
388 410 if m is
389 411 {
390   - mandatory then "<span>*</span>",
391   - non_mandatory then ""
  412 + mandatory then
  413 + if l is
  414 + {
  415 + no_label then l,
  416 + label(str, help) then label(str + "<span>*</span>", help),
  417 + }
  418 +
  419 + non_mandatory then l
392 420 },
393 421 pixels = (Width width) |->
394 422 if width is
... ... @@ -398,51 +426,30 @@ public define HTML_In_Form
398 426 wide then 70,
399 427 custom(n) then n
400 428 },
401   - // special case out of the div("inputable") tag.
402   -// if ff is submit(attrs, action_name, mb_label, button_text, extra_operands) then
403   -// mf_format_form_field_inside_inputable(ff, star, pixels)
404   -// else if ff is hidden(name, init) then
405   -// mf_format_form_field_inside_inputable(ff, star, pixels)
406   -// else if ff is sub_fieldset(fieldset) then
407   -// mf_format_form_field_inside_inputable(ff, star, pixels)
408   -// else
409   -// div([class("inputable")],
410   -// mf_format_form_field_inside_inputable(ff, star, pixels))
411   -
412   -// sequence([
413   -// literal(" <tr class=\"form_row\">\n"),
414   -// mf_format_form_field_inside_inputable(ff, star, pixels, failure),
415   -// literal(" </tr>\n"),
416   -// ])
  429 +
417 430  
418 431 if ff is
419 432 {
420 433 no_field then
421   - literal(""),
  434 + empty,
422 435  
423 436 title(t) then
424 437 literal("<h2>" + t + "</h2>"),
425   -
426   -// title(s,t) then
427   -// text([h_center, size(s),bold,color(rgb(0,0,0))], t),
428   -//
429   -// title_f(t) then
430   -// t([h_center, size(16),bold,color(rgb(0,0,0))]),
431 438  
432 439 message(t) then
433 440 literal(t),
434 441  
435   - input(options, label, id, wan, default, w, mand) then
436   - text_input([class("in") . options], label + star(mand), id, wan, init(get_String(lwa, wan.name, default.value)), pixels(w)),
  442 + input(options, _label, id, wan, default, w, mand) then
  443 + text_input([class("in") . options], star(_label, mand), id, wan, init(get_String(lwa, wan.name, default.value)), pixels(w)),
437 444  
438   - input_readonly(options, label, id, name, init, w) then
439   - text_input_ro([class("in") . options], label, id, name, init, pixels(w)),
440   -
441   - text_area(options, label, id, wan, default, w, height, mand) then
442   - text_area([input_attrs([class("in")]) . options], label + star(mand), id, wan, init(get_String(lwa, wan.name, default.value)), pixels(w), height),
  445 + input_readonly(options, _label, id, name, init, w) then
  446 + text_input_ro([class("in") . options], _label, id, name, init, pixels(w)),
  447 +
  448 + text_area(options, _label, id, wan, default, w, height, mand) then
  449 + text_area([input_attrs([class("in")]) . options], star(_label, mand), id, wan, init(get_String(lwa, wan.name, default.value)), pixels(w), height),
443 450  
444   - password_input(options, label, id, name, init, w, mand) then
445   - password_input([class("in") . options], label + star(mand), id, name, init, pixels(w)),
  451 + password_input(options, _label, id, name, init, w, mand) then
  452 + password_input([class("in") . options], star(_label, mand), id, name, init, pixels(w)),
446 453  
447 454 hidden(id, name, init) then
448 455 hidden(id, name, init),
... ... @@ -450,55 +457,55 @@ public define HTML_In_Form
450 457 explain(t) then
451 458 div([class("sub")], literal(t)),
452 459  
453   - selector(options, label, id, wan, size, items, selected, mand) then
454   - if selected is
455   - {
456   - failure then selector([class("in") . options], label + star(mand), id, wan, size, items),
457   - success(default) then selector([class("in") . options], label + star(mand), id, wan, size, items, init(get_String(lwa, wan.name, default.value))),
458   - },
  460 + selector(options, _label, id, wan, size, items, selected, mand) then
  461 + if selected is
  462 + {
  463 + failure then selector([class("in") . options], star(_label, mand), id, wan, size, items),
  464 + success(default) then selector([class("in") . options], star(_label, mand), id, wan, size, items, init(get_String(lwa, wan.name, default.value))),
  465 + },
459 466  
460   - selector_c(options, label, id, wan, size, items, selected, mand) then
461   - if selected is
462   - {
463   - failure then selector_c([class("in") . options], label + star(mand), id, wan, size, items),
464   - success(default) then selector_c([class("in") . options], label + star(mand), id, wan, size, items, init(get_String(lwa, wan.name, default.value))),
465   - },
  467 + selector_c(options, _label, id, wan, size, items, selected, mand) then
  468 + if selected is
  469 + {
  470 + failure then selector_c([class("in") . options], star(_label, mand), id, wan, size, items),
  471 + success(default) then selector_c([class("in") . options], star(_label, mand), id, wan, size, items, init(get_String(lwa, wan.name, default.value))),
  472 + },
466 473  
467   - selector_hide_show(options, label, id, wan, size, items_with_partial, selected, mand) then
  474 + selector_hide_show(options, _label, id, wan, size, items_with_partial, selected, mand) then
468 475 with div_id = generate_random_string(15),
469 476 since construct_selector_hide_show(div_id, items_with_partial) is (items, partial_content_list),
470 477 sequence([
471   - selector_c([class("in"), class("cxm_selector_hide_show"), event(onchange, "select_hide_show('" + div_id + "', this);")], label + star(mand), id, wan, size, reverse(items), if selected is { failure then init(""), success(default) then init(get_String(lwa, wan.name, default.value)) } ),
  478 + selector_c([class("in"), class("cxm_selector_hide_show"), event(onchange, "select_hide_show('" + div_id + "', this);")], star(_label, mand), id, wan, size, reverse(items), if selected is { failure then init(""), success(default) then init(get_String(lwa, wan.name, default.value)) } ),
472 479 partial(partial_content(partial_content_list))
473 480 ]),
474 481  
475   - checkbox(options, label, id, wan, val, checked, mand) then
476   - check_box([class("in") . options], label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)),
  482 + checkbox(options, _label, id, wan, val, checked, mand) then
  483 + check_box([class("in") . options], star(_label, mand), id, wan, val, get_Bool(lwa, wan.name, checked)),
477 484  
478   - checkboxr(options, label, id, wan, val, checked, mand) then
479   - check_box_r([class("in") . options], label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)),
  485 + checkboxr(options, _label, id, wan, val, checked, mand) then
  486 + check_box_r([class("in") . options], star(_label, mand), id, wan, val, get_Bool(lwa, wan.name, checked)),
480 487  
481   - checkbox_hide_show(options, label, wan, val, checked, fields) then
  488 + checkbox_hide_show(options, _label, wan, val, checked, fields) then
482 489 with div_id = generate_random_string(15),
483 490 sequence([
484   - check_box([data("show_id", div_id), class("in"), class("cxm_checkbox_hide_show"), event(onclick, "checked_hide_show_element('"+div_id+"', this);")], label, htmlId(""), wan, val, get_Bool(lwa, wan.name, checked)),
  491 + check_box([data("show_id", div_id), class("in"), class("cxm_checkbox_hide_show"), event(onclick, "checked_hide_show_element('"+div_id+"', this);")], _label, html_Id(""), wan, val, get_Bool(lwa, wan.name, checked)),
485 492 div([id(div_id), style("display:"+if checked then "block" else "none")], sequence(map((CXM_Form_Field ff2) |-> div([class("form_field")], format_CXM_Form_Field(ff2, lwa)),fields)))
486 493 ]),
487 494  
488   - radio_button(options, label, id, wan, val, checked, mand) then
489   - radio_button([class("in"), event(onclick, "radio_hide_show_group('"+wan.name+"', this);") . options], label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)),
  495 + radio_button(options, _label, id, wan, val, checked, mand) then
  496 + radio_button([class("in"), event(onclick, "radio_hide_show_group('"+wan.name+"', this);") . options], star(_label, mand), id, wan, val, get_Bool(lwa, wan.name, checked)),
490 497  
491   - radio_button_hide_show(options, label, wan, val, checked, fields) then
  498 + radio_button_hide_show(options, _label, wan, val, checked, fields) then
492 499 with div_id = generate_random_string(15),
493 500 sequence([
494   - radio_button([data("show_id", div_id), class("in"), class("cxm_radio_hide_show"), event(onclick, "radio_hide_show_group('"+wan.name+"', this);")], label, htmlId(""), wan, val, get_Bool(lwa, wan.name, checked)),
  501 + radio_button([data("show_id", div_id), class("in"), class("cxm_radio_hide_show"), event(onclick, "radio_hide_show_group('"+wan.name+"', this);")], _label, html_Id(""), wan, val, get_Bool(lwa, wan.name, checked)),
495 502 div([id(div_id), style("display:"+if checked then "block" else "none")], sequence(map((CXM_Form_Field ff2) |-> div([class("form_field")], format_CXM_Form_Field(ff2, lwa)),fields)))
496 503 ]),
497 504  
498   - radio_buttonr(options, label, id, wan, val, checked, mand) then
499   - radio_button_r([class("in") . options], label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)),
  505 + radio_buttonr(options, _label, id, wan, val, checked, mand) then
  506 + radio_button_r([class("in") . options], star(_label, mand), id, wan, val, get_Bool(lwa, wan.name, checked)),
500 507  
501   - radio_button_list (options, label, id, wan, items, selected, mand, wide) then
  508 + radio_button_list (options, _label, id, wan, items, selected, mand, wide) then
502 509 with new_selected =
503 510 if get_String(lwa, wan.name) is
504 511 {
... ... @@ -507,15 +514,15 @@ public define HTML_In_Form
507 514 },
508 515  
509 516 sequence([
510   - literal("<label for=\"" + wan.name + "\">" + label + star(mand) + "</label>"),
  517 + //literal("<label for=\"" + wan.name + "\">" + label + star(_label, mand) + "</label>"),
511 518 div( [class("radiolist")], sequence(
512 519 with i = var((Int)-1),
513 520 itemclass = if wide then "radiolistitem_wide" else "radiolistitem",
514 521 map( ((WebArgValue, String) item) |->
515 522 i <- *i + 1;
516 523 if item is (wav, item_label) then
517   - with _id = if id is htmlId(the_id) then htmlId(the_id + "_radio_" + *i),
518   - div([class(itemclass)], radio_button_r(options, item_label, _id, wan, wav,
  524 + with _id = if id is html_Id(the_id) then html_Id(the_id + "_radio_" + *i),
  525 + div([class(itemclass)], radio_button_r(options, label(item_label), _id, wan, wav,
519 526 if new_selected is success(v) then wav.value = v.value else false)),
520 527 items))
521 528 ),
... ... @@ -525,14 +532,14 @@ public define HTML_In_Form
525 532 map((CXM_Form_Field ff2) |-> cell([],format_CXM_Form_Field(ff2, lwa)),fields))])
526 533 ,
527 534  
528   - upload(options, label, id, name, w, mand) then
529   - file_upload([class("in") . options], label + star(mand), id, name, pixels(w)),
  535 + upload(options, _label, id, name, w, mand) then
  536 + file_upload([class("in") . options], star(_label, mand), id, name, pixels(w)),
530 537  
531 538 raw_in_form(html) then html,
532 539 // div([class("in")], html),
533   - raw_in_form(label, id, input) then
  540 + label_for(label, id, input) then
534 541 sequence([
535   - if id is htmlId(_id) then
  542 + if id is html_Id(_id) then
536 543 literal("<label for=\"" + _id + "\">" + label + "</label>"),
537 544 input
538 545 ]),
... ... @@ -541,11 +548,10 @@ public define HTML_In_Form
541 548  
542 549 partial(p_content) then partial(p_content),
543 550 br then br,
544   - input_with_help(input, help_title, help_text, width) then
545   - sequence([
546   - format_CXM_Form_Field(input, lwa),
547   - html_tooltip(force_String(help_title), help_text, width),
548   - ]),
  551 +// input_with_help(input, help_title, help_text, width) then
  552 +// sequence([
  553 +// format_CXM_Form_Field(input, lwa, html_tooltip(force_String(help_title), help_text, width)),
  554 +// ]),
549 555  
550 556 fieldset(options, legend, fields) then
551 557 sequence([
... ... @@ -561,7 +567,7 @@ public define HTML_In_Form
561 567 blank_space(htmlClass) then
562 568 div([class(htmlClass.class)], literal("&nbsp")),
563 569  
564   - submit(attrs, htmlClass, action_name, mb_label, button_text, extra_operands) then
  570 + submit(attrs, htmlClass, action_name, Maybe(String) mb_label, button_text, extra_operands) then
565 571 actioner( same, // TODO change this to allow external URL
566 572 if mb_label is
567 573 {
... ... @@ -611,7 +617,7 @@ public define HTML_In_Form
611 617 public define HTML_Off_Form
612 618 cxm_form
613 619 (
614   - HtmlId form_Id,
  620 + HTML_Id form_Id,
615 621 List(CoreAttrs) options,
616 622 String action_name,
617 623 List((String,String)) extra_ops,
... ... @@ -637,12 +643,12 @@ public define HTML_Off_Form
637 643 List(Web_arg) lwa,
638 644 List(CXM_Form_Field) form_fields
639 645 )=
640   - cxm_form(htmlId(form_name), options, action_name, extra_ops, lwa, form_fields).
  646 + cxm_form(html_Id(form_name), options, action_name, extra_ops, lwa, form_fields).
641 647  
642 648 public define HTML_In_Form
643 649 cxm_fieldset
644 650 (
645   - HtmlId fieldSetId,
  651 + HTML_Id fieldSetId,
646 652 List(Web_arg) lwa,
647 653 List(CXM_Form_Field) fields
648 654 ) =
... ... @@ -657,7 +663,7 @@ public define HTML_Off_Form
657 663 List(CoreAttrs) options,
658 664 List(HTML_In_Form) fields
659 665 ) =
660   - cxm_form(htmlId(form_id), options, "", [], [], map((HTML_In_Form field) |-> raw_in_form(field), fields) ).
  666 + cxm_form(html_Id(form_id), options, "", [], [], map((HTML_In_Form field) |-> raw_in_form(field), fields) ).
661 667  
662 668 public define HTML_Off_Form
663 669 cxm_form
... ... @@ -667,7 +673,7 @@ public define HTML_Off_Form
667 673 List(Web_arg) lwa,
668 674 List(CXM_Form_Field) fields
669 675 ) =
670   - cxm_form(htmlId(form_id), options, "", [], lwa, fields).
  676 + cxm_form(html_Id(form_id), options, "", [], lwa, fields).
671 677  
672 678 public define HTML_Off_Form
673 679 cxm_form
... ... @@ -675,7 +681,7 @@ public define HTML_Off_Form
675 681 String form_id,
676 682 List(HTML_In_Form) fields
677 683 ) =
678   - cxm_form(htmlId(form_id), [], "", [], [], map((HTML_In_Form field) |-> raw_in_form(field), fields) ).
  684 + cxm_form(html_Id(form_id), [], "", [], [], map((HTML_In_Form field) |-> raw_in_form(field), fields) ).
679 685  
680 686 public define HTML_Off_Form
681 687 cxm_form
... ... @@ -692,4 +698,4 @@ public define HTML_Off_Form
692 698 String form_id,
693 699 List(CXM_Form_Field) fields
694 700 ) =
695   - cxm_form(htmlId(form_id), [], "", [], [], fields).
  701 + cxm_form(html_Id(form_id), [], "", [], [], fields).
... ...
web/CXM_generic_form.anubis
... ... @@ -250,7 +250,7 @@ define HTML_Row(HTML_In_Form)
250 250 [
251 251 cell([right ], text([size(10)],tag)),
252 252 cell([width(7) ], star(mand)),
253   - cell([left ], text_input([], "",htmlId(""), wan, init,if w is
  253 + cell([left ], text_input([], "",html_Id(""), wan, init,if w is
254 254 {
255 255 small then 10,
256 256 narrow then 50,
... ... @@ -261,7 +261,7 @@ define HTML_Row(HTML_In_Form)
261 261  
262 262 input(wan,w,init) then (List(HTML_Cell(HTML_In_Form)))
263 263 [
264   - cell([left,columns(3) ], text_input([], "", htmlId(""), wan,init,if w is
  264 + cell([left,columns(3) ], text_input([], "", html_Id(""), wan,init,if w is
265 265 {
266 266 small then 10,
267 267 narrow then 30,
... ... @@ -274,7 +274,7 @@ define HTML_Row(HTML_In_Form)
274 274 [
275 275 cell([right ], tag([size(10)])),
276 276 cell([width(7) ], star(mand)),
277   - cell([left ], text_input([], "", htmlId(""),wan,init,if w is
  277 + cell([left ], text_input([], "", html_Id(""),wan,init,if w is
278 278 {
279 279 small then 15,
280 280 narrow then 30,
... ... @@ -287,14 +287,14 @@ define HTML_Row(HTML_In_Form)
287 287 [
288 288 cell([right ], text([size(10)],tag)),
289 289 cell([width(7) ], star(mand)),
290   - cell([left ], password_input([], "",htmlId(""), wan, init(""), 30))
  290 + cell([left ], password_input([], "",html_Id(""), wan, init(""), 30))
291 291 ],
292 292  
293 293 password_input_f(wan,tag,mand) then (List(HTML_Cell(HTML_In_Form)))
294 294 [
295 295 cell([right ], tag([size(10)])),
296 296 cell([width(7) ], star(mand)),
297   - cell([left ], password_input([], "",htmlId(""), wan, init(""), 30))
  297 + cell([left ], password_input([], "",html_Id(""), wan, init(""), 30))
298 298 ],
299 299  
300 300 explain(t) then (List(HTML_Cell(HTML_In_Form)))
... ... @@ -329,8 +329,8 @@ define HTML_Row(HTML_In_Form)
329 329 cell([width(7)], star(mand)),
330 330 cell([left ], if selected is
331 331 {
332   - failure then selector([], "", htmlId(""), wan,1,items)
333   - success(sel) then selector([], "", htmlId(""), wan,1,items, sel)
  332 + failure then selector([], "", html_Id(""), wan,1,items)
  333 + success(sel) then selector([], "", html_Id(""), wan,1,items, sel)
334 334 })
335 335 ],
336 336  
... ... @@ -340,8 +340,8 @@ define HTML_Row(HTML_In_Form)
340 340 cell([width(7)], star(mand)),
341 341 cell([left ], if selected is
342 342 {
343   - failure then selector([], "", htmlId(""), wan,1,items)
344   - success(sel) then selector([], "", htmlId(""), wan,1,items, sel)
  343 + failure then selector([], "", html_Id(""), wan,1,items)
  344 + success(sel) then selector([], "", html_Id(""), wan,1,items, sel)
345 345 })
346 346 ],
347 347  
... ... @@ -351,8 +351,8 @@ define HTML_Row(HTML_In_Form)
351 351 cell([width(7)], star(mand)),
352 352 cell([left ], if selected is
353 353 {
354   - failure then selector_c([], "", htmlId(""), wan,1,items)
355   - success(sel) then selector_c([], "", htmlId(""), wan,1,items,sel)
  354 + failure then selector_c([], "", html_Id(""), wan,1,items)
  355 + success(sel) then selector_c([], "", html_Id(""), wan,1,items,sel)
356 356 })
357 357 ],
358 358  
... ... @@ -360,12 +360,12 @@ define HTML_Row(HTML_In_Form)
360 360 [
361 361 cell([right ], text([size(10)],tag)),
362 362 cell([width(7)], star(mand)),
363   - cell([left ], check_box([], "",htmlId(""),wan, wav(wan.name),checked))
  363 + cell([left ], check_box([], "",html_Id(""),wan, wav(wan.name),checked))
364 364 ],
365 365  
366 366 checkboxr(wan,tag,checked,mand) then (List(HTML_Cell(HTML_In_Form)))
367 367 [
368   - cell([right ], check_box([], "",htmlId(""),wan, wav(wan.name),checked)),
  368 + cell([right ], check_box([], "",html_Id(""),wan, wav(wan.name),checked)),
369 369 cell([width(7)], star(mand)),
370 370 cell([left ], text([size(10)],tag))
371 371 ],
... ... @@ -374,19 +374,19 @@ define HTML_Row(HTML_In_Form)
374 374 [
375 375 cell([right ], tag([size(10)])),
376 376 cell([width(7)], star(mand)),
377   - cell([left ], check_box([], "",htmlId(""),wan,wav(wan.name),checked))
  377 + cell([left ], check_box([], "",html_Id(""),wan,wav(wan.name),checked))
378 378 ],
379 379  
380 380 radio_button(wan,wav,tag,checked,mand) then (List(HTML_Cell(HTML_In_Form)))
381 381 [
382 382 cell([right ], text([size(10)],tag)),
383 383 cell([width(7)], star(mand)),
384   - cell([left ], radio_button([], "", htmlId(""), wan, wav, checked))
  384 + cell([left ], radio_button([], "", html_Id(""), wan, wav, checked))
385 385 ],
386 386  
387 387 radio_buttonr(wan,wav,tag,checked,mand) then (List(HTML_Cell(HTML_In_Form)))
388 388 [
389   - cell([right ], radio_button([], "", htmlId(""), wan, wav, checked)),
  389 + cell([right ], radio_button([], "", html_Id(""), wan, wav, checked)),
390 390 cell([width(7)], star(mand)),
391 391 cell([left ], text([size(10)],tag))
392 392 ],
... ...
web/CXM_html_tooltip.anubis
... ... @@ -11,7 +11,9 @@ read tools/basis.anubis
11 11 read calexium_lib/web/CXM_common.anubis
12 12 read calexium_lib/web/CXM_making_a_web_site.anubis
13 13  
14   -public define HTML_Off_Form
  14 +//public type HTML_Off_Form:...
  15 +
  16 + public define HTML_Off_Form
15 17 html_tooltip
16 18 (
17 19 String title,
... ... @@ -21,7 +23,7 @@ public define HTML_Off_Form
21 23  
22 24 actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword)], []).
23 25  
24   -public define HTML_Off_Form
  26 + public define HTML_Off_Form
25 27 html_tooltip
26 28 (
27 29 String title,
... ... @@ -32,7 +34,7 @@ public define HTML_Off_Form
32 34  
33 35 actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword), ("width", to_decimal(width))], []).
34 36  
35   -public define HTML_In_Form
  37 + public define HTML_In_Form
36 38 html_tooltip
37 39 (
38 40 String title,
... ... @@ -42,7 +44,7 @@ public define HTML_In_Form
42 44  
43 45 actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword)], []).
44 46  
45   -public define HTML_In_Form
  47 + public define HTML_In_Form
46 48 html_tooltip
47 49 (
48 50 String title,
... ... @@ -62,7 +64,7 @@ public define HTML_In_Form
62 64 ) =
63 65 actioner(same,same, link([id("help_" + keyword), class("jTip jTip_"+class_suffix), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_ext", keyword)], []).
64 66  
65   -public define HTML_Off_Form
  67 + public define HTML_Off_Form
66 68 html_tooltip_ext
67 69 (
68 70 String title,
... ... @@ -95,7 +97,7 @@ public define HTML_Off_Form
95 97 with extra_args = format_extra_operands(ext_args),
96 98 literal("<a id=\"help_"+keyword+"\" class=\"jTipu jTip_"+class_suffix+"\" name=\""+title+"\" href=\"/?a=ajax_show_tooltip&amp;tooltip_ext="+keyword+extra_args+"\"></a>").
97 99  
98   -public define HTML_In_Form
  100 + public define HTML_In_Form
99 101 html_tooltip_ext
100 102 (
101 103 String title,
... ...
web/CXM_jquery.anubis
... ... @@ -23,9 +23,9 @@ public type JQuery_Actioner:
23 23  
24 24 /* jQuery Selector - http://api.jquery.com/category/selectors/ */
25 25 public type JQuerySelector:
26   - element(HtmlId id),
  26 + element(HTML_Id id),
27 27 element_class(String name),
28   - childs(HtmlId id).
  28 + childs(HTML_Id id).
29 29  
30 30 define String
31 31 jquery_button_get_onclick_action_window_options
... ... @@ -101,13 +101,13 @@ public define String
101 101 if selector is
102 102 {
103 103 element(html_id) then
104   - if html_id is htmlId(id) then "'#" + id + "'",
  104 + if html_id is html_Id(id) then "'#" + id + "'",
105 105  
106 106 element_class(name) then
107 107 "'." + name + "'",
108 108  
109 109 childs(html_id) then
110   - if html_id is htmlId(id) then "'#" + id + " > *'"
  110 + if html_id is html_Id(id) then "'#" + id + " > *'"
111 111 }.
112 112  
113 113 /* */
... ...
web/CXM_making_a_web_site.anubis
... ... @@ -60,7 +60,8 @@ read CXM_multihost_http_server.anubis
60 60 read web/mime.anubis
61 61 read CXM_cookies.anubis
62 62 read CXM_json.anubis
63   -
  63 +//read CXM_html_tooltip.anubis
  64 +
64 65 * (1) Structure of a web site.
65 66  
66 67 First of all we need to explain what a web site should be made of. Ideally, the
... ... @@ -683,8 +684,8 @@ public type Reading_Way:
683 684 /**
684 685 * String value for 'id' attribut
685 686 */
686   -public type HtmlId:
687   - htmlId(String id).
  687 +public type HTML_Id:
  688 + html_Id(String id).
688 689  
689 690 /**
690 691 * String value for 'class' attribut
... ... @@ -710,7 +711,7 @@ public type WebArgValue:
710 711 public type InitialValue:
711 712 init(String value).
712 713  
713   -public define Printable_tree [HtmlId x . Printable_tree y] = str_pt(x.id, y).
  714 +public define Printable_tree [HTML_Id x . Printable_tree y] = str_pt(x.id, y).
714 715 public define Printable_tree [HtmlClass x . Printable_tree y] = str_pt(x.class, y).
715 716 public define Printable_tree [WebArgName x . Printable_tree y] = str_pt(x.name, y).
716 717 public define Printable_tree [WebArgValue x . Printable_tree y] = str_pt(x.value, y).
... ... @@ -1116,7 +1117,58 @@ public type HTML_Head_Tag:
1116 1117 css(CSS_File),
1117 1118 css_inline(String css_styles) /* Note: <style> and </style> tags are not necessaries */
1118 1119 .
  1120 +
  1121 + /* Label with help */
  1122 +
  1123 +
  1124 +
  1125 +public type HTML_tooltip:
  1126 + html_tooltip
  1127 + (
  1128 + String title,
  1129 + String keyword,
  1130 + Int width,
  1131 + ),
  1132 + html_tooltip_ext
  1133 + (
  1134 + String title,
  1135 + String extend_type,
  1136 + String class_suffix,
  1137 + List((String, String)) ext_args
  1138 + ).
  1139 +
  1140 +public define HTML_tooltip
  1141 + html_tooltip
  1142 + (
  1143 + String keyword,
  1144 + Int width
  1145 + )=
  1146 + html_tooltip("", keyword, width).
  1147 +
  1148 +public define HTML_tooltip
  1149 + html_tooltip
  1150 + (
  1151 + String title,
  1152 + String keyword
  1153 + )=
  1154 + html_tooltip(title, keyword, 0).
1119 1155  
  1156 +public type HTML_Help_Position:
  1157 + left,
  1158 + right.
  1159 +
  1160 +public type HTML_Help:
  1161 + no_help, //no help text available
  1162 + tooltip(HTML_tooltip,
  1163 + HTML_Help_Position).
  1164 +
  1165 +public type HTML_Label:
  1166 + no_label,
  1167 + label(
  1168 + String text, //label to show
  1169 + HTML_Help help //HTML help (tooltip with ajax call or not)
  1170 +
  1171 + ).
1120 1172 /* It contains
1121 1173 * - a List of HTML_Head_Tag representing necessaries head tags for the content. ex: jquery js files, js script, css specific styles, ...
1122 1174 * - a HTML_Off_Form representing the HTML code for the part of the page we want to display
... ... @@ -1169,25 +1221,25 @@ public type HTML_In_Form:
1169 1221 foreign_link (List(Text_Option), String url, String name),
1170 1222 private_download (String abs_path, String name, String extra_ext,
1171 1223 Maybe((String,List((String,String)))) action),
1172   - text_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width),
1173   - text_input_ro (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width),
1174   - password_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width),
1175   - text_area (List(TextAreaOption), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width, Int height),
1176   - file_upload (List(InputAttrs), String label, HtmlId id, WebArgName name, Int width),
1177   - selector (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int size, List(String) choices),
1178   - selector (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int size, List(String) choices, InitialValue selected),
  1224 + text_input (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, InitialValue init, Int width),
  1225 + text_input_ro (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, InitialValue init, Int width),
  1226 + password_input (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, InitialValue init, Int width),
  1227 + text_area (List(TextAreaOption), HTML_Label label, HTML_Id id, WebArgName name, InitialValue init, Int width, Int height),
  1228 + file_upload (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, Int width),
  1229 + selector (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, Int size, List(String) choices),
  1230 + selector (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, Int size, List(String) choices, InitialValue selected),
1179 1231 // List((String,String)) = List((code,name)) where :
1180 1232 // code is the web-arg value
1181 1233 // name appears in selector
1182   - selector_c (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int size, List((List(CoreAttrs),WebArgValue,String)) choices),
1183   - selector_c (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int size, List((List(CoreAttrs),WebArgValue,String)) choices, InitialValue selected),
1184   - radio_button (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked),
1185   - radio_button_r (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked),
1186   - check_box (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked),
1187   - check_box_r (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked),
  1234 + selector_c (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, Int size, List((List(CoreAttrs),WebArgValue,String)) choices),
  1235 + selector_c (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, Int size, List((List(CoreAttrs),WebArgValue,String)) choices, InitialValue selected),
  1236 + radio_button (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, WebArgValue value, Bool checked),
  1237 + radio_button_r (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, WebArgValue value, Bool checked),
  1238 + check_box (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, WebArgValue value, Bool checked),
  1239 + check_box_r (List(CoreAttrs), HTML_Label label, HTML_Id id, WebArgName name, WebArgValue value, Bool checked),
1188 1240 div (List(CoreAttrs), HTML_In_Form content),
1189 1241 div_empty (List(CoreAttrs)),
1190   - hidden (HtmlId id, WebArgName name, WebArgValue value),
  1242 + hidden (HTML_Id id, WebArgName name, WebArgValue value),
1191 1243 partial (HTML_Partial_Content),
1192 1244 br,
1193 1245 progress (List(CoreAttrs), Int value, Int max),
... ... @@ -1244,7 +1296,7 @@ public define HTML_In_Form
1244 1296 Int width,
1245 1297 Int height
1246 1298 ) =
1247   - text_area([], "", htmlId(""), name,init,width,height).
  1299 + text_area([], no_label, html_Id(""), name,init,width,height).
1248 1300  
1249 1301 public define HTML_In_Form
1250 1302 text_area
... ... @@ -1255,7 +1307,7 @@ public define HTML_In_Form
1255 1307 Int width,
1256 1308 Int height
1257 1309 ) =
1258   - text_area(options, "", htmlId(""), name,init,width,height).
  1310 + text_area(options, no_label, html_Id(""), name,init,width,height).
1259 1311  
1260 1312 public define HTML_In_Form
1261 1313 table
... ... @@ -1317,29 +1369,29 @@ public define HTML_In_Form
1317 1369 text([],s).
1318 1370  
1319 1371 public define HTML_In_Form
1320   - radio_button (List(InputAttrs) options, String label_text, WebArgName n, WebArgValue value, Bool checked)
1321   - = radio_button (options, label_text, htmlId(n.name), n, value, checked).
  1372 + radio_button (List(CoreAttrs) options, HTML_Label label, WebArgName n, WebArgValue value, Bool checked)
  1373 + = radio_button (options, label, html_Id(n.name), n, value, checked).
1322 1374  
1323 1375 public define HTML_In_Form
1324   - radio_button_r (List(InputAttrs) options, String label_text, WebArgName n, WebArgValue value, Bool checked)
1325   - = radio_button_r (options, label_text, htmlId(n.name), n, value, checked).
  1376 + radio_button_r (List(CoreAttrs) options, HTML_Label label, WebArgName n, WebArgValue value, Bool checked)
  1377 + = radio_button_r (options, label, html_Id(n.name), n, value, checked).
1326 1378  
1327 1379 public define HTML_In_Form
1328   - check_box (List(InputAttrs) options, String label_text, WebArgName n, WebArgValue value, Bool checked)
1329   - = check_box (options, label_text, htmlId(n.name), n, value, checked).
  1380 + check_box (List(CoreAttrs) options, HTML_Label label, WebArgName n, WebArgValue value, Bool checked)
  1381 + = check_box (options, label, html_Id(n.name), n, value, checked).
1330 1382  
1331 1383 public define HTML_In_Form
1332   - check_box_r (List(InputAttrs) options, String label_text, WebArgName n, WebArgValue value, Bool checked)
1333   - = check_box_r (options, label_text, htmlId(n.name), n, value, checked).
  1384 + check_box_r (List(CoreAttrs) options, HTML_Label label, WebArgName n, WebArgValue value, Bool checked)
  1385 + = check_box_r (options, label, html_Id(n.name), n, value, checked).
1334 1386  
1335 1387 public define HTML_In_Form
1336   - file_upload (WebArgName name, Int width)
1337   - = file_upload([], "", htmlId(""), name, width).
  1388 + file_upload (WebArgName n, Int width)
  1389 + = file_upload([], no_label, html_Id(n.name), n, width).
1338 1390  
1339 1391 public define HTML_In_Form
1340 1392 hidden (WebArgName name, WebArgValue value)
1341 1393 =
1342   - hidden(htmlId(""), name, value).
  1394 + hidden(html_Id(""), name, value).
1343 1395  
1344 1396 public type HTML_Body:...
1345 1397  
... ... @@ -1373,11 +1425,11 @@ public type HTML_Off_Form:
1373 1425 private_download (String abs_path, String name, String extra_ext,
1374 1426 Maybe((String,List((String,String)))) action),
1375 1427 label (String name),
1376   - form (HtmlId form_id, List(CoreAttrs), HTML_In_Form content),
1377   - form (HtmlId form_id, List(CoreAttrs),
  1428 + form (HTML_Id form_id, List(CoreAttrs), HTML_In_Form content),
  1429 + form (HTML_Id form_id, List(CoreAttrs),
1378 1430 String action_name, List((String,String)) extra_ops,
1379 1431 HTML_In_Form content),
1380   - in_form (HtmlId form_id, HTML_In_Form content),
  1432 + in_form (HTML_Id form_id, HTML_In_Form content),
1381 1433 div (List(CoreAttrs), HTML_Off_Form content),
1382 1434 div (List(CoreAttrs), HTML_Partial_Content p_content),
1383 1435 div_empty (List(CoreAttrs)),
... ... @@ -1408,7 +1460,7 @@ public define HTML_Off_Form
1408 1460 List(CoreAttrs) options,
1409 1461 HTML_In_Form content
1410 1462 ) =
1411   - form(htmlId(form_name), options, content).
  1463 + form(html_Id(form_name), options, content).
1412 1464  
1413 1465 public define HTML_Off_Form
1414 1466 form
... ... @@ -1419,7 +1471,7 @@ public define HTML_Off_Form
1419 1471 List((String,String)) extra_ops,
1420 1472 HTML_In_Form content
1421 1473 ) =
1422   - form(htmlId(form_name), options, action_name, extra_ops, content).
  1474 + form(html_Id(form_name), options, action_name, extra_ops, content).
1423 1475  
1424 1476  
1425 1477 public define HTML_Off_Form literal(Printable_tree t) = literal_pt(t).
... ... @@ -4155,16 +4207,96 @@ define Printable_tree
4155 4207  
4156 4208 // *** [5.8] Formating 'in form' elements.
4157 4209  
  4210 +
  4211 +public define Printable_tree
  4212 + format
  4213 + (
  4214 + HTML_tooltip tooltip
  4215 + )=
  4216 + if tooltip is
  4217 + {
  4218 + html_tooltip(title, keyword, width) then
  4219 + ["<a id=\"help_",keyword,"\" class=\"jTipu jTip_help\" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&amp;tooltip_id=",keyword,(if width > 0 then ["&width=",width,"\""] else ["\""]), "></a>"],
  4220 +
  4221 + html_tooltip_ext(title, extend_type, class_suffix, ext_args) then
  4222 + with extra_args = format_extra_operands(ext_args),
  4223 + ["<a id=\"jTip\" class=\"jTipu jTip_",class_suffix,"\" name=\"",title,"\" href=\"/?a=ajax_show_tooltip&amp;tooltip_ext=",extend_type+extra_args,"\"></a>"]
  4224 + }.
  4225 +
  4226 +public define HTML_Off_Form
  4227 + html_tooltip
  4228 + (
  4229 + String title,
  4230 + String keyword,
  4231 + ) =
  4232 + literal_pt(format(html_tooltip(title, keyword, 0))).
  4233 +
  4234 +public define HTML_In_Form
  4235 + html_tooltip
  4236 + (
  4237 + String title,
  4238 + String keyword,
  4239 + ) =
  4240 + literal_pt(format(html_tooltip(title, keyword, 0))).
  4241 +
  4242 +public define HTML_Off_Form
  4243 + html_tooltip
  4244 + (
  4245 + String keyword,
  4246 + Int size,
  4247 + ) =
  4248 + literal_pt(format(html_tooltip("", keyword, size))).
  4249 +
  4250 +public define HTML_In_Form
  4251 + html_tooltip
  4252 + (
  4253 + String keyword,
  4254 + Int size,
  4255 + ) =
  4256 + literal_pt(format(html_tooltip("", keyword, size))).
  4257 +
  4258 +public define Printable_tree
  4259 + format_help
  4260 + (
  4261 + Printable_tree label,
  4262 + HTML_Help _help
  4263 + ) =
  4264 + if _help is
  4265 + {
  4266 + no_help then label,
  4267 + tooltip(html_tooltip, position) then
  4268 + if position is
  4269 + {
  4270 + left then pt_pt(format(html_tooltip),label),
  4271 + right then pt_pt(label, format(html_tooltip))
  4272 + }
  4273 + }.
  4274 +
  4275 +
  4276 +
  4277 +public define HTML_Label
  4278 + label
  4279 + (
  4280 + String text
  4281 + )=
  4282 + label(text, no_help).
4158 4283  
4159 4284  
4160   -define Printable_tree
4161   - maybe_label
  4285 +public define Printable_tree
  4286 + format_label
4162 4287 (
4163   - String label_text,
4164   - HtmlId id
  4288 + HTML_Label _label,
  4289 + HTML_Id _id
4165 4290 ) =
4166   - if length(label_text) > 0 then ["<label for=\"",id,"\">",label_text,"</label>"]
4167   - else [].
  4291 + if _label is
  4292 + {
  4293 + no_label then [],
  4294 + label(text, help) then
  4295 + format_help(
  4296 + ["<label"+(if _id.id ="" then "" else " for=\""+_id.id+"\"")+">",text,"</label>"],
  4297 + help
  4298 + )
  4299 + }.
4168 4300  
4169 4301  
4170 4302 define Printable_tree
... ... @@ -4218,50 +4350,50 @@ define Printable_tree
4218 4350 private_download(url,name,extra,action) then
4219 4351 format(cinfo,sn,ic_v,any_private_download(url,name,extra,action),format_element,is_https, action_count, head_tags),
4220 4352 text_input(options, label_text, id, name, i, w) then
4221   - [ maybe_label(label_text, id),
  4353 + [ format_label(label_text, id),
4222 4354 "<input type=\"text\" name=\"",name,"\" id=\"",id,"\" size=\"",w,"\" value=\"",i,"\"",format_attrs([class("in") . options])," />"],
4223 4355 text_input_ro(options, label_text, id, name,i,w) then
4224   - [ maybe_label(label_text, id),
  4356 + [ format_label(label_text, id),
4225 4357 "<input readonly=\"readonly\" type=\"text\" name=\"",name,"\" id=\"",id,"\" size=\"",w,"\" value=\"",i,"\"",format_attrs([class("in") . options])," />"],
4226 4358 password_input(options, label_text, id, name,i,w) then
4227   - [ maybe_label(label_text, id),
  4359 + [ format_label(label_text, id),
4228 4360 "<input type=\"password\" name=\"",name,"\" id=\"",id,"\" size=\"",w,"\" value=\"",i,"\"",format_attrs([class("in") . options])," />"],
4229 4361 text_area(options,label_text, id, n,i,w,h) then
4230   - [ maybe_label(label_text, id), "<textarea ",format(options)," id=\"",id,"\" name=\"",n,"\" cols=\"",w,"\" rows=\"",h,"\">",i,"</textarea>"],
  4362 + [ format_label(label_text, id), "<textarea ",format(options)," id=\"",id,"\" name=\"",n,"\" cols=\"",w,"\" rows=\"",h,"\">",i,"</textarea>"],
4231 4363 file_upload(options, label, id, n, w) then
4232   - [ maybe_label(label, id),
  4364 + [ format_label(label, id),
4233 4365 "<input type=\"file\" id=\"",id,"\" size=\"",w,"\" name=\"",n,"\"",format_attrs([class("in") . options])," />"],
4234 4366 selector(options, label, id, n,s,cs) then
4235   - [ maybe_label(label, id),
  4367 + [ format_label(label, id),
4236 4368 "<select id=\"",id,"\" name=\"",n,"\" size=\"",s,"\" ",format_attrs([class("in") . options]),">",format_choices(cs),"</select>"],
4237 4369 selector(options, label, id, n,s,cs,sd) then
4238   - [ maybe_label(label, id),
  4370 + [ format_label(label, id),
4239 4371 "<select id=\"",id,"\" name=\"",n,"\" size=\"",s,"\" ",format_attrs([class("in") . options]),">",format_choices(cs,sd),"</select>"],
4240 4372 selector_c(options, label, id, n,s,cs) then
4241   - [ maybe_label(label, id),
  4373 + [ format_label(label, id),
4242 4374 "<select id=\"",id,"\" name=\"",n,"\" size=\"",s,"\" ",format_attrs([class("in") . options]),">",format_choices(cs),"</select>"],
4243 4375 selector_c(options, label, id, n,s,cs,sd) then
4244   - [ maybe_label(label, id),
  4376 + [ format_label(label, id),
4245 4377 "<select id=\"",id,"\" name=\"",n,"\" size=\"",s,"\" ",format_attrs([class("in") . options]),">",format_choices(cs,sd),"</select>"],
4246 4378  
4247   - radio_button(options, label_text, id, n, v, c) then
4248   - [ maybe_label(label_text, id),
  4379 + radio_button(options, label, id, n, v, c) then
  4380 + [ format_label(label, id),
4249 4381 "<input type=\"radio\" name=\"",n,"\" id=\"",id,"\" value=\"",v,"\"",(if c then " checked=\"checked\"" else ""),format_attrs([class("in") . options])," />"],
4250   - radio_button_r(options, label_text, id, n, v, c) then
  4382 + radio_button_r(options, label, id, n, v, c) then
4251 4383 [ "<input type=\"radio\" name=\"",n,"\" id=\"",id,"\" value=\"",v,"\"",(if c then " checked=\"checked\"" else ""),format_attrs([class("in") . options])," />",
4252   - maybe_label(label_text, id)],
4253   - check_box(options, label_text, id, n, v, c) then
4254   - [ maybe_label(label_text, id),
  4384 + format_label(label, id)],
  4385 + check_box(options, label, id, n, v, c) then
  4386 + [ format_label(label, id),
4255 4387 "<input type=\"checkbox\" name=\"",n,"\" id=\"",id,"\" value=\"",v,"\"",(if c then " checked=\"checked\" " else ""),format_attrs([class("in") . options])," />"]
4256   - check_box_r(options, label_text, id, n, v, c) then
  4388 + check_box_r(options, label, id, n, v, c) then
4257 4389 [ "<input type=\"checkbox\" name=\"",n,"\" id=\"",id,"\" value=\"",v,"\"",(if c then " checked=\"checked\" " else ""),format_attrs([class("in") . options])," />",
4258   - maybe_label(label_text, id)]
  4390 + format_label(label, id)]
4259 4391 div(options, e) then
4260 4392 format(cinfo,sn,ic_v,any_div(options, e),format_element,is_https, action_count, head_tags),
4261 4393 div_empty(options) then
4262 4394 format(cinfo,sn,ic_v,any_div_empty(options),format_element,is_https, action_count, head_tags),
4263 4395 hidden(_id, name, value) then
4264   - since _id is htmlId(id),
  4396 + since _id is html_Id(id),
4265 4397 ["<input type=\"hidden\"",(if id = "" then "" else " id=\""+id+"\"")," name=\"",name,"\" value=\"",value,"\" />"],
4266 4398 partial(p_content) then
4267 4399 if p_content is partial_content(tags, html_elements) then
... ... @@ -4444,7 +4576,7 @@ define Printable_tree
4444 4576 "://",common_name,":",to_decimal(http_port),"/\">",
4445 4577 // action is set dynamically by
4446 4578 // the actioner using JavaScript
4447   - if fn is htmlId(id) then
  4579 + if fn is html_Id(id) then
4448 4580 format(cinfo,id,sn,ic_v,c,is_https, action_count, head_tags),
4449 4581 "</form>"
4450 4582 ]
... ... @@ -4462,12 +4594,12 @@ define Printable_tree
4462 4594 // "://",common_name,":",http_port,"/\">",
4463 4595 // action is set dynamically by
4464 4596 // the actioner using JavaScript
4465   - if fn is htmlId(id) then
  4597 + if fn is html_Id(id) then
4466 4598 format(cinfo,id,sn,ic_v,c,is_https, action_count, head_tags),
4467 4599 "</form>"
4468 4600 ],
4469 4601 in_form(fn, content) then
4470   - if fn is htmlId(id) then
  4602 + if fn is html_Id(id) then
4471 4603 format(cinfo,id,sn,ic_v, content,is_https, action_count, head_tags),
4472 4604 div(options, e) then
4473 4605 format(cinfo, sn, ic_v, any_div(options, e), format_element, is_https, action_count, head_tags),
... ...
web/CXM_widgets.anubis
... ... @@ -14,23 +14,23 @@ read calexium_lib/web/CXM_making_a_web_site.anubis
14 14 public define HTML_In_Form
15 15 ip_input
16 16 (
17   - HtmlId the_id,
  17 + HTML_Id the_id,
18 18 WebArgName wan_prefix,
19 19 String ip
20 20 )=
21 21 with ip_fields = split(ip, '.'),
22   - if the_id is htmlId(id_str) then
  22 + if the_id is html_Id(id_str) then
23 23 if wan_prefix is wan(field_prefix) then
24 24 div([id(id_str)],
25 25 sequence(
26 26 [
27   - text_input([class("ip_input")], "", htmlId(""), wan(field_prefix+"_0"), init(force_nth(0,ip_fields,"")), 3),
  27 + text_input([class("ip_input")], no_label, html_Id(""), wan(field_prefix+"_0"), init(force_nth(0,ip_fields,"")), 3),
28 28 text("."),
29   - text_input([class("ip_input")], "", htmlId(""), wan(field_prefix+"_1"), init(force_nth(1,ip_fields,"")), 3),
  29 + text_input([class("ip_input")], no_label, html_Id(""), wan(field_prefix+"_1"), init(force_nth(1,ip_fields,"")), 3),
30 30 text("."),
31   - text_input([class("ip_input")], "", htmlId(""), wan(field_prefix+"_2"), init(force_nth(2,ip_fields,"")), 3),
  31 + text_input([class("ip_input")], no_label, html_Id(""), wan(field_prefix+"_2"), init(force_nth(2,ip_fields,"")), 3),
32 32 text("."),
33   - text_input([class("ip_input")], "", htmlId(""), wan(field_prefix+"_3"), init(force_nth(3,ip_fields,"")), 3),
  33 + text_input([class("ip_input")], no_label, html_Id(""), wan(field_prefix+"_3"), init(force_nth(3,ip_fields,"")), 3),
34 34 ]))
35 35 .
36 36  
... ... @@ -39,21 +39,21 @@ public define HTML_In_Form
39 39 public define HTML_In_Form
40 40 partial_ip_input
41 41 (
42   - HtmlId the_id,
  42 + HTML_Id the_id,
43 43 WebArgName wan_prefix,
44 44 List(String) ip_fixed_part,
45 45 String ip
46 46 )=
47 47 with ip_fields = split(ip, '.'),
48   - if the_id is htmlId(id_str) then
  48 + if the_id is html_Id(id_str) then
49 49 if wan_prefix is wan(field_prefix) then
50 50 with make_field = (Int index)
51 51 |-> if index < length(ip_fixed_part) then
52 52 text([], force_nth(index, ip_fixed_part, ""))
53 53 else
54 54 text_input([class("ip_input")],
55   - "",
56   - htmlId(""),
  55 + no_label,
  56 + html_Id(""),
57 57 wan(field_prefix + "_" + index),
58 58 init(force_nth(index, ip_fields, "")),
59 59 3),
... ...
web/widgets/css_helper.anubis
... ... @@ -188,7 +188,7 @@ public define HTML_Partial_Content
188 188 table([/*class("module"), */ attr("cellspacing","0")], make_changelist_rows(items, [], 1))))
189 189 .
190 190  
191   -public define HTML_Off_Form
  191 + public define HTML_Off_Form
192 192 html_tooltip
193 193 (
194 194 String title,
... ... @@ -209,7 +209,7 @@ public define HTML_Off_Form
209 209  
210 210 actioner(same,same, link([id("help_" + keyword), class("jTip jTip_help"), attr("target", "_blank")], " ", success(title)), "ajax_show_tooltip", [("tooltip_id", keyword), ("width", to_decimal(width))], []).
211 211  
212   -public define HTML_In_Form
  212 + public define HTML_In_Form
213 213 html_tooltip
214 214 (
215 215 String title,
... ...
web/widgets/fisheye_menu.anubis
... ... @@ -55,7 +55,7 @@ public define HTML_Partial_Content
55 55 if entries is
56 56 {
57 57 [] then partial_content([], literal("")),
58   - [_ . _] then partial_content(jquery_animate(childs(htmlId("top_menu")), size_on_hover(64, 64, 350, 1420)),
  58 + [_ . _] then partial_content(jquery_animate(childs(html_Id("top_menu")), size_on_hover(64, 64, 350, 1420)),
59 59  
60 60 div([id("top_menu"), style("min-height:70px!important;vertical-align:top;display:table-row")],
61 61 sequence([
... ...