From 50e33f380717408f619a93a6f32eeb20f9eff315 Mon Sep 17 00:00:00 2001 From: totoro Date: Wed, 1 Apr 2020 09:59:22 +0900 Subject: [PATCH] make img_button with load_content --- web/widgets/button.anubis | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/web/widgets/button.anubis b/web/widgets/button.anubis index fe54923..417cc81 100644 --- a/web/widgets/button.anubis +++ b/web/widgets/button.anubis @@ -16,7 +16,6 @@ read tools/basis.anubis read tools/printable_tree.anubis - public define HTML_Partial_Content img_button_flink ( @@ -91,6 +90,45 @@ public define HTML_Partial_Content img_button ( String img_path, + List(CoreAttrs) core_attrs, + WEB_Action_Name web_action, + List((String, String)) extra_args, + String target, + Bool replace + )= + partial_content( + img([ event(onclick, load_content(target, web_action, extra_args, replace)), + style("cursor: pointer") . core_attrs + ], img_path)) +. + +public define HTML_Partial_Content + img_button + ( + String img_path, + WEB_Action_Name web_action, + List((String, String)) extra_args, + String target, + Bool replace + )= + img_button(img_path, [], web_action, extra_args, target, replace) +. + +public define HTML_Partial_Content + img_button + ( + String img_path, + WEB_Action_Name web_action, + List((String, String)) extra_args, + String target + )= + img_button(img_path, [], web_action, extra_args, target, false) +. + +public define HTML_Partial_Content + img_button + ( + String img_path, WEB_Action_Name web_action, List((String, String)) extra_ops )= -- libgit2 0.21.4