Commit 50e33f380717408f619a93a6f32eeb20f9eff315

Authored by David RENÉ
1 parent 313825c8

make img_button with load_content

Showing 1 changed file with 39 additions and 1 deletions   Show diff stats
web/widgets/button.anubis
... ... @@ -16,7 +16,6 @@ read tools/basis.anubis
16 16 read tools/printable_tree.anubis
17 17  
18 18  
19   -
20 19 public define HTML_Partial_Content
21 20 img_button_flink
22 21 (
... ... @@ -91,6 +90,45 @@ public define HTML_Partial_Content
91 90 img_button
92 91 (
93 92 String img_path,
  93 + List(CoreAttrs) core_attrs,
  94 + WEB_Action_Name web_action,
  95 + List((String, String)) extra_args,
  96 + String target,
  97 + Bool replace
  98 + )=
  99 + partial_content(
  100 + img([ event(onclick, load_content(target, web_action, extra_args, replace)),
  101 + style("cursor: pointer") . core_attrs
  102 + ], img_path))
  103 +.
  104 +
  105 +public define HTML_Partial_Content
  106 + img_button
  107 + (
  108 + String img_path,
  109 + WEB_Action_Name web_action,
  110 + List((String, String)) extra_args,
  111 + String target,
  112 + Bool replace
  113 + )=
  114 + img_button(img_path, [], web_action, extra_args, target, replace)
  115 +.
  116 +
  117 +public define HTML_Partial_Content
  118 + img_button
  119 + (
  120 + String img_path,
  121 + WEB_Action_Name web_action,
  122 + List((String, String)) extra_args,
  123 + String target
  124 + )=
  125 + img_button(img_path, [], web_action, extra_args, target, false)
  126 +.
  127 +
  128 +public define HTML_Partial_Content
  129 + img_button
  130 + (
  131 + String img_path,
94 132 WEB_Action_Name web_action,
95 133 List((String, String)) extra_ops
96 134 )=
... ...