From 2f39d22014e74796d551dbcd4abb5ed45d2fd874 Mon Sep 17 00:00:00 2001 From: totoro Date: Sun, 11 Jun 2017 04:09:48 +0200 Subject: [PATCH] add format_web_action_name with extra operands add jq_form_submit_and_close add cxm_button class to jquery_button --- web/CXM_making_a_web_site.anubis | 15 ++++++++++++--- web/jQuery/CXM_jq_form.anubis | 15 +++++++++++++++ web/jQuery/CXM_jquery_button.anubis | 4 ++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/web/CXM_making_a_web_site.anubis b/web/CXM_making_a_web_site.anubis index 3cf5a77..31c497f 100644 --- a/web/CXM_making_a_web_site.anubis +++ b/web/CXM_making_a_web_site.anubis @@ -3976,6 +3976,17 @@ public define String } . +public define String + format_web_action_name + ( + WEB_Action_Name action, + List((String,String)) extra_ops, + )= + format_web_action_name(action) + + + format_extra_operands(extra_ops) +. + define String make_actioner_url ( @@ -4003,9 +4014,7 @@ define String "https://"+common_name+":"+https_port+"/", } + //with action_string = - format_web_action_name(action) - + - format_extra_operands(extra_ops), + format_web_action_name(action, extra_ops), if target is { same then strict_url, diff --git a/web/jQuery/CXM_jq_form.anubis b/web/jQuery/CXM_jq_form.anubis index 17ea4cc..7d61c2c 100644 --- a/web/jQuery/CXM_jq_form.anubis +++ b/web/jQuery/CXM_jq_form.anubis @@ -10,6 +10,8 @@ // js/cxm/cxm.js // css/cxm/message.css +read calexium_lib/web/CXM_making_a_web_site.anubis + public define String jq_form_submit ( @@ -20,3 +22,16 @@ public define String with container_id_str = if length(container_id) > 0 then ", '" + container_id + "'" else "", "CalexiumToolBox.jq_form_submit('" + form_id + "', '" + url + "'"+container_id_str+");". +public define String + jq_form_submit_and_close + ( + String dialog_id, + String form_id, //id of the form ID handled by this function + WEB_Action_Name action, + List((String,String)) extra_ops + + )= + with dialog_id_str = if length(dialog_id) > 0 then ", '" + dialog_id + "'" else "", + with url = format_web_action_name(action, extra_ops), + "CalexiumToolBox.jq_form_submit_and_close('" + form_id + "', '" + url + "'"+dialog_id_str+");" +. diff --git a/web/jQuery/CXM_jquery_button.anubis b/web/jQuery/CXM_jquery_button.anubis index c692752..8984636 100644 --- a/web/jQuery/CXM_jquery_button.anubis +++ b/web/jQuery/CXM_jquery_button.anubis @@ -86,7 +86,6 @@ define HTML_Partial_Content [ onclick_action . html_tags ], [ literal("") - . html_buttons ] @@ -178,7 +177,8 @@ public define HTML_Partial_Content = if button is jQuery_button(bt_type, id, name, label, actioner, primary, secondary) then with onclick_action=jquery_button_get_onclick_action(id, actioner), - btn_seq = (HTML_Off_Form)sequence([literal("")]), +// btn_seq = (HTML_Off_Form)sequence([literal("")]), + btn_seq = (HTML_Off_Form)sequence([literal("")]), if jquery_icon_to_string(primary) = "" then if jquery_icon_to_string(secondary) = "" then partial_content( -- libgit2 0.21.4