diff --git a/web/widgets/button.anubis b/web/widgets/button.anubis
index c37f1f1..e642d5f 100644
--- a/web/widgets/button.anubis
+++ b/web/widgets/button.anubis
@@ -147,6 +147,19 @@ define List(CoreAttrs)
) =
core_attrs + [id(uid), style("cursor: pointer"), event(onclick, "CalexiumToolBox.make_confirm_dialog(this, "/* + to_js_string("/?a=" + url + format_extra_operands(extra_ops))+*/+ to_JS_String(jquery_button_get_onclick_action(actioner)) +");")].
+define List(CoreAttrs)
+ img_button_confirm_image_attrs
+ (
+ List(CoreAttrs) core_attrs,
+ String uid,
+ WEB_Action_Name web_action,
+ List((String, String)) extra_ops
+ ) =
+ //action to execute if confirmation is ok
+ with ok_action = to_JS_String("CalexiumToolBox.jq_query("+format_web_action_name_to_js(web_action, extra_ops)+")"),
+
+ core_attrs + [id(uid), style("cursor: pointer"), event(onclick, "CalexiumToolBox.make_confirm_dialog(this, "+ ok_action +");")].
+
public define HTML_Partial_Content
img_button_confirm
(
@@ -217,3 +230,23 @@ public define String
JQuery_Actioner actioner
)=
img_button_confirm(img_path, [], dlg_title, dlg_text, dlg_ok, dlg_cancel, actioner).
+
+
+public define String
+ img_button_confirm
+ (
+ String img_path,
+ List(CoreAttrs) core_attrs,
+ String dlg_title,
+ String dlg_text,
+ String dlg_ok,
+ String dlg_cancel,
+ WEB_Action_Name web_action,
+ List((String, String)) extra_ops
+ ) =
+ with uid = generate_random_string(20),
+ //with event_click = (CoreAttrs)event(onclick, "CalexiumToolBox.jq_query("+format_web_action_name_to_js(web_action, extra_ops)+")"),
+
+ "" +
+ "
"
+.
--
libgit2 0.21.4