Commit fac0e891f267eda67b27ee7596e1998e2d489348
1 parent
8b1c73d0
add img_button_ajax which fire WEB_action on click on button
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
web/widgets/button.anubis
| @@ -75,6 +75,18 @@ public define HTML_Partial_Content | @@ -75,6 +75,18 @@ public define HTML_Partial_Content | ||
| 75 | img_button(img_path, [], same, url, []). | 75 | img_button(img_path, [], same, url, []). |
| 76 | 76 | ||
| 77 | public define HTML_Partial_Content | 77 | public define HTML_Partial_Content |
| 78 | + img_button_ajax | ||
| 79 | + ( | ||
| 80 | + String img_path, | ||
| 81 | + WEB_Action_Name web_action, | ||
| 82 | + List((String, String)) extra_ops | ||
| 83 | + )= | ||
| 84 | + | ||
| 85 | + with event_click = (CoreAttrs)event(onclick, "CalexiumToolBox.jq_query("+format_web_action_name_to_js(web_action, extra_ops)+")"), | ||
| 86 | + partial_content(img([event_click, style("cursor: pointer")], img_path)) | ||
| 87 | +. | ||
| 88 | + | ||
| 89 | +public define HTML_Partial_Content | ||
| 78 | img_button | 90 | img_button |
| 79 | ( | 91 | ( |
| 80 | String img_path, | 92 | String img_path, |