Commit eb2fde090283bc3b3544600818bb68f2eafe3541
1 parent
455f1bc5
add icon view_list
add shortcut for row with only one cell as argument add shortcut for row with only one cell and one cell_option as arguments add shortcut for row with only one cell and list of cell_option as arguments add img_button with WEB_Action_Name as argument
Showing
3 changed files
with
53 additions
and
15 deletions
Show diff stats
web/CXM_making_a_web_site.anubis
| ... | ... | @@ -1033,25 +1033,41 @@ public type HTML_Footer_Row($T): |
| 1033 | 1033 | Same remark as for 'HTML_Cell($T)'. We define several convenience functions: |
| 1034 | 1034 | |
| 1035 | 1035 | public define HTML_Row($T) |
| 1036 | - row | |
| 1037 | - ( | |
| 1038 | - List(HTML_Cell($T)) cells | |
| 1039 | - ) = | |
| 1040 | - row([],cells). | |
| 1036 | + row | |
| 1037 | + ( | |
| 1038 | + List(HTML_Cell($T)) cells | |
| 1039 | + )= | |
| 1040 | + row([],cells). | |
| 1041 | 1041 | |
| 1042 | 1042 | public define HTML_Row($T) |
| 1043 | - row | |
| 1044 | - ( | |
| 1045 | - HTML_Cell($T) cell | |
| 1046 | - ) = | |
| 1047 | - row([],[cell]). | |
| 1043 | + row | |
| 1044 | + ( | |
| 1045 | + HTML_Cell($T) cell | |
| 1046 | + )= | |
| 1047 | + row([],[cell]). | |
| 1048 | + | |
| 1049 | +public define HTML_Row($T) | |
| 1050 | + row | |
| 1051 | + ( | |
| 1052 | + List(Cell_Option) options, | |
| 1053 | + HTML_Cell($T) cell | |
| 1054 | + )= | |
| 1055 | + row(options,[cell]). | |
| 1056 | + | |
| 1057 | +public define HTML_Row($T) | |
| 1058 | + row | |
| 1059 | + ( | |
| 1060 | + Cell_Option option, | |
| 1061 | + HTML_Cell($T) cell | |
| 1062 | + )= | |
| 1063 | + row([option],[cell]). | |
| 1048 | 1064 | |
| 1049 | 1065 | public define HTML_Header_Row($T) |
| 1050 | - header_row | |
| 1051 | - ( | |
| 1052 | - List(HTML_Header_Cell($T)) cells | |
| 1053 | - ) = | |
| 1054 | - header_row([],cells). | |
| 1066 | + header_row | |
| 1067 | + ( | |
| 1068 | + List(HTML_Header_Cell($T)) cells | |
| 1069 | + ) = | |
| 1070 | + header_row([],cells). | |
| 1055 | 1071 | |
| 1056 | 1072 | public define HTML_Header_Row($T) |
| 1057 | 1073 | header_row | ... | ... |
web/widgets/button.anubis
| ... | ... | @@ -42,7 +42,19 @@ public define HTML_Partial_Content |
| 42 | 42 | String url |
| 43 | 43 | )= |
| 44 | 44 | img_button_flink(img_path, [], same, url). |
| 45 | + | |
| 46 | +public define HTML_Partial_Content | |
| 47 | + img_button | |
| 48 | + ( | |
| 49 | + String img_path, | |
| 50 | + List(CoreAttrs) core_attrs, | |
| 51 | + Actioner_Target target, | |
| 52 | + WEB_Action_Name url, | |
| 53 | + List((String, String)) extra_ops | |
| 54 | + )= | |
| 55 | + partial_content(actioner(same, same, img_link(core_attrs+[style("cursor: pointer")], img_path, ""), url, extra_ops)). | |
| 45 | 56 | |
| 57 | + | |
| 46 | 58 | public define HTML_Partial_Content |
| 47 | 59 | img_button |
| 48 | 60 | ( |
| ... | ... | @@ -66,6 +78,15 @@ public define HTML_Partial_Content |
| 66 | 78 | img_button |
| 67 | 79 | ( |
| 68 | 80 | String img_path, |
| 81 | + WEB_Action_Name url, | |
| 82 | + List((String, String)) extra_ops | |
| 83 | + )= | |
| 84 | + img_button(img_path, [], same, url, extra_ops). | |
| 85 | + | |
| 86 | +public define HTML_Partial_Content | |
| 87 | + img_button | |
| 88 | + ( | |
| 89 | + String img_path, | |
| 69 | 90 | String url, |
| 70 | 91 | List((String, String)) extra_ops |
| 71 | 92 | )= | ... | ... |
web/widgets/icons_set.anubis
| ... | ... | @@ -23,6 +23,7 @@ public define String icn16_group = "icons/16x16/group.png". |
| 23 | 23 | public define String icn16_question = "icons/16x16/question.png". |
| 24 | 24 | public define String icn16_refresh = "icons/16x16/arrow_refresh.png". |
| 25 | 25 | public define String icn16_vcard_add = "icons/16x16/vcard_add.png". |
| 26 | +public define String icn16_view_list = "icons/16x16/view_list.png". | |
| 26 | 27 | public define String icn16_warning = "icons/16x16/warning.png". |
| 27 | 28 | |
| 28 | 29 | public define String icn16_true = "icons/16x16/check.png". | ... | ... |