Commit 2f39d22014e74796d551dbcd4abb5ed45d2fd874
1 parent
837d2609
add format_web_action_name with extra operands
add jq_form_submit_and_close add cxm_button class to jquery_button
Showing
3 changed files
with
29 additions
and
5 deletions
Show diff stats
web/CXM_making_a_web_site.anubis
| ... | ... | @@ -3976,6 +3976,17 @@ public define String |
| 3976 | 3976 | } |
| 3977 | 3977 | . |
| 3978 | 3978 | |
| 3979 | +public define String | |
| 3980 | + format_web_action_name | |
| 3981 | + ( | |
| 3982 | + WEB_Action_Name action, | |
| 3983 | + List((String,String)) extra_ops, | |
| 3984 | + )= | |
| 3985 | + format_web_action_name(action) | |
| 3986 | + + | |
| 3987 | + format_extra_operands(extra_ops) | |
| 3988 | +. | |
| 3989 | + | |
| 3979 | 3990 | define String |
| 3980 | 3991 | make_actioner_url |
| 3981 | 3992 | ( |
| ... | ... | @@ -4003,9 +4014,7 @@ define String |
| 4003 | 4014 | "https://"+common_name+":"+https_port+"/", |
| 4004 | 4015 | } + |
| 4005 | 4016 | //with action_string = |
| 4006 | - format_web_action_name(action) | |
| 4007 | - + | |
| 4008 | - format_extra_operands(extra_ops), | |
| 4017 | + format_web_action_name(action, extra_ops), | |
| 4009 | 4018 | if target is |
| 4010 | 4019 | { |
| 4011 | 4020 | same then strict_url, | ... | ... |
web/jQuery/CXM_jq_form.anubis
| ... | ... | @@ -10,6 +10,8 @@ |
| 10 | 10 | // js/cxm/cxm.js |
| 11 | 11 | // css/cxm/message.css |
| 12 | 12 | |
| 13 | +read calexium_lib/web/CXM_making_a_web_site.anubis | |
| 14 | + | |
| 13 | 15 | public define String |
| 14 | 16 | jq_form_submit |
| 15 | 17 | ( |
| ... | ... | @@ -20,3 +22,16 @@ public define String |
| 20 | 22 | with container_id_str = if length(container_id) > 0 then ", '" + container_id + "'" else "", |
| 21 | 23 | "CalexiumToolBox.jq_form_submit('" + form_id + "', '" + url + "'"+container_id_str+");". |
| 22 | 24 | |
| 25 | +public define String | |
| 26 | + jq_form_submit_and_close | |
| 27 | + ( | |
| 28 | + String dialog_id, | |
| 29 | + String form_id, //id of the form ID handled by this function | |
| 30 | + WEB_Action_Name action, | |
| 31 | + List((String,String)) extra_ops | |
| 32 | + | |
| 33 | + )= | |
| 34 | + with dialog_id_str = if length(dialog_id) > 0 then ", '" + dialog_id + "'" else "", | |
| 35 | + with url = format_web_action_name(action, extra_ops), | |
| 36 | + "CalexiumToolBox.jq_form_submit_and_close('" + form_id + "', '" + url + "'"+dialog_id_str+");" | |
| 37 | +. | ... | ... |
web/jQuery/CXM_jquery_button.anubis
| ... | ... | @@ -86,7 +86,6 @@ define HTML_Partial_Content |
| 86 | 86 | [ onclick_action . html_tags ], |
| 87 | 87 | [ |
| 88 | 88 | literal("<button type=\""+to_String(bt_type)+"\" name=\""+name+"\">"+label+"</button>") |
| 89 | - | |
| 90 | 89 | . |
| 91 | 90 | html_buttons |
| 92 | 91 | ] |
| ... | ... | @@ -178,7 +177,8 @@ public define HTML_Partial_Content |
| 178 | 177 | = |
| 179 | 178 | if button is jQuery_button(bt_type, id, name, label, actioner, primary, secondary) then |
| 180 | 179 | with onclick_action=jquery_button_get_onclick_action(id, actioner), |
| 181 | - btn_seq = (HTML_Off_Form)sequence([literal("<button type=\""+to_String(bt_type)+"\" id=\""+id+"\" name=\""+name+"\">"), table([attr("cellspacing", "5")], [row([cell(text(label))])]), literal("</button>")]), | |
| 180 | +// btn_seq = (HTML_Off_Form)sequence([literal("<button type=\""+to_String(bt_type)+"\" id=\""+id+"\" name=\""+name+"\">"), table([attr("cellspacing", "5")], [row([cell(text(label))])]), literal("</button>")]), | |
| 181 | + btn_seq = (HTML_Off_Form)sequence([literal("<button class=\"cxm_button\" type=\""+to_String(bt_type)+"\" id=\""+id+"\" name=\""+name+"\">"+label+"</button>")]), | |
| 182 | 182 | if jquery_icon_to_string(primary) = "" then |
| 183 | 183 | if jquery_icon_to_string(secondary) = "" then |
| 184 | 184 | partial_content( | ... | ... |