Commit beaa57dd46242200d3b915847f69b63ea46f2d21

Authored by Steve MARECHAL
1 parent 21568648

HTML_In_Form contentpane

Showing 1 changed file with 45 additions and 11 deletions   Show diff stats
calexium_lib/web/CXM_dojo.anubis
@@ -280,6 +280,18 @@ public define HTML_Off_Form @@ -280,6 +280,18 @@ public define HTML_Off_Form
280 attr("splitter", if splitter then "true" else "false") . attributes ], 280 attr("splitter", if splitter then "true" else "false") . attributes ],
281 content). 281 content).
282 282
  283 +public define HTML_In_Form
  284 + dojo_ContentPane
  285 + (
  286 + List(CoreAttrs) attributes,
  287 + BorderContainerRegion region,
  288 + Bool splitter,
  289 + HTML_In_Form content
  290 + ) =
  291 + div([ attr("dojoType", "dijit.layout.ContentPane"),
  292 + attr("region", to_String(region)),
  293 + attr("splitter", if splitter then "true" else "false") . attributes ],
  294 + content).
283 295
284 public define HTML_Off_Form 296 public define HTML_Off_Form
285 dojo_TabContainer 297 dojo_TabContainer
@@ -351,6 +363,29 @@ public define HTML_Off_Form @@ -351,6 +363,29 @@ public define HTML_Off_Form
351 "<span dojoType=\"dijit.Tooltip\" connectId=\"" + html_id.id + "\">" + tip + "</span>" 363 "<span dojoType=\"dijit.Tooltip\" connectId=\"" + html_id.id + "\">" + tip + "</span>"
352 }). 364 }).
353 365
  366 +public define HTML_In_Form
  367 + dojo_button
  368 + (
  369 + HtmlId html_id,
  370 + String name,
  371 + String iconclass,
  372 + Maybe(String) tip_msg,
  373 + String execute,
  374 + )=
  375 + literal("
  376 + <button dojoType=\"dijit.form.Button\" id=\"" + html_id.id + "\" iconClass=\"" + iconclass + "\" >"
  377 + + name
  378 + + "<script type=\"dojo/method\" event=\"onClick\">"
  379 + + execute
  380 + + "</script>"
  381 + + "</button>" +
  382 + if tip_msg is
  383 + {
  384 + failure then "",
  385 + success(tip) then
  386 + "<span dojoType=\"dijit.Tooltip\" connectId=\"" + html_id.id + "\">" + tip + "</span>"
  387 + }).
  388 +
354 389
355 public define HTML_Off_Form 390 public define HTML_Off_Form
356 dojo_declaration 391 dojo_declaration
@@ -363,12 +398,12 @@ public define HTML_Off_Form @@ -363,12 +398,12 @@ public define HTML_Off_Form
363 content). 398 content).
364 399
365 400
366 - public define HTML_In_Form 401 +public define HTML_In_Form
367 dojo_declaration 402 dojo_declaration
368 ( 403 (
369 String name, 404 String name,
370 List(CoreAttrs) attributes, 405 List(CoreAttrs) attributes,
371 - HTML_In_Form content 406 + HTML_In_Form content
372 )= 407 )=
373 div([attr("dojoType", "dijit.Declaration"), attr("widgetClass", name) . attributes ], 408 div([attr("dojoType", "dijit.Declaration"), attr("widgetClass", name) . attributes ],
374 content). 409 content).
@@ -377,9 +412,9 @@ public define HTML_In_Form @@ -377,9 +412,9 @@ public define HTML_In_Form
377 dojo_editor 412 dojo_editor
378 ( 413 (
379 List(CoreAttrs) attributes, 414 List(CoreAttrs) attributes,
380 - HtmlId html_id,  
381 - WebArgName input_name,  
382 - HTML_In_Form text, 415 + HtmlId html_id,
  416 + WebArgName input_name,
  417 + HTML_In_Form text,
383 )=/* 418 )=/*
384 text_area([input_attrs([ 419 text_area([input_attrs([
385 attr("dojoType", "dijit.Editor"), attr("style", "overflow:auto") . 420 attr("dojoType", "dijit.Editor"), attr("style", "overflow:auto") .
@@ -409,7 +444,7 @@ public define HTML_In_Form @@ -409,7 +444,7 @@ public define HTML_In_Form
409 "<span dojoType=\"dijit.Tooltip\" connectId=\"" + html_id.id + "\">" + tip + "</span>" 444 "<span dojoType=\"dijit.Tooltip\" connectId=\"" + html_id.id + "\">" + tip + "</span>"
410 }). 445 }).
411 446
412 -public define MF_FormField 447 +public define HTML_In_Form
413 dojo_checkbox 448 dojo_checkbox
414 ( 449 (
415 List(InputAttrs) attributes, 450 List(InputAttrs) attributes,
@@ -418,11 +453,10 @@ public define MF_FormField @@ -418,11 +453,10 @@ public define MF_FormField
418 String label, 453 String label,
419 WebArgValue val, 454 WebArgValue val,
420 Bool checked, 455 Bool checked,
421 - Mandatory mandatory,  
422 )= 456 )=
423 - checkboxr([attr("dojoType", "dijit.form.CheckBox") . attributes] , label, id, name, val, checked, mandatory). 457 + check_box_r([attr("dojoType", "dijit.form.CheckBox") . attributes] , label, id, name, val, checked).
424 458
425 -public define MF_FormField 459 +public define HTML_In_Form
426 dojo_combobox 460 dojo_combobox
427 ( 461 (
428 List(InputAttrs) attributes, 462 List(InputAttrs) attributes,
@@ -430,7 +464,7 @@ public define MF_FormField @@ -430,7 +464,7 @@ public define MF_FormField
430 HtmlId id, 464 HtmlId id,
431 String label, 465 String label,
432 List((WebArgValue,String)) list_data, 466 List((WebArgValue,String)) list_data,
433 - Maybe(InitialValue) selected, 467 + InitialValue selected,
434 )= 468 )=
435 // selector_c([attr("dojoType", "dijit.form.ComboBox") . attributes], label, id, name, 1, list_data, selected, non_mandatory). 469 // selector_c([attr("dojoType", "dijit.form.ComboBox") . attributes], label, id, name, 1, list_data, selected, non_mandatory).
436 - selector_c([], label, id, name, 1, list_data, selected, non_mandatory). 470 + selector_c([], label, id, name, 1, list_data, selected).