Commit 2549d33ee7074d974fa859175d9d5f5b7856ae9e

Authored by David RENÉ
1 parent 929a1c45

[+] add img button for load page

Showing 1 changed file with 44 additions and 0 deletions   Show diff stats
web/widgets/button.anubis
... ... @@ -89,6 +89,50 @@ public define HTML_Partial_Content
89 89 .
90 90  
91 91 public define HTML_Partial_Content
  92 + img_button_load_page
  93 + (
  94 + String img_path,
  95 + List(CoreAttrs) core_attrs,
  96 + WEB_Action_Name web_action,
  97 + List((String, String)) extra_args
  98 + )=
  99 + partial_content(
  100 + img([ event(onclick, load_page(web_action, extra_args)),
  101 + style("cursor: pointer") . core_attrs
  102 + ], img_path))
  103 +.
  104 +
  105 +public define HTML_Partial_Content
  106 + img_button_load_page
  107 + (
  108 + String img_path,
  109 + WEB_Action_Name web_action,
  110 + List((String, String)) extra_args
  111 + )=
  112 + img_button_load_page(img_path, [], web_action, extra_args)
  113 +.
  114 +
  115 +public define HTML_Partial_Content
  116 + img_button_load_page
  117 + (
  118 + String img_path,
  119 + List(CoreAttrs) core_attrs,
  120 + WEB_Action_Name web_action
  121 + )=
  122 + img_button_load_page(img_path, core_attrs, web_action, [])
  123 +.
  124 +
  125 +public define HTML_Partial_Content
  126 + img_button_load_page
  127 + (
  128 + String img_path,
  129 + WEB_Action_Name web_action
  130 + )=
  131 + img_button_load_page(img_path, [], web_action, [])
  132 +.
  133 +
  134 +
  135 +public define HTML_Partial_Content
92 136 img_button
93 137 (
94 138 String img_path,
... ...