Commit 457fc6c99f46d41608e50ae992196031e35459b7
1 parent
7f18cce0
[ADD] add more helper for html_wave_box and typo
Showing
1 changed file
with
64 additions
and
34 deletions
Show diff stats
web/widgets/css_helper.anubis
| @@ -16,46 +16,56 @@ read calexium_lib/web/CXM_making_a_web_site.anubis | @@ -16,46 +16,56 @@ read calexium_lib/web/CXM_making_a_web_site.anubis | ||
| 16 | public define HTML_Partial_Content | 16 | public define HTML_Partial_Content |
| 17 | html_wave_box | 17 | html_wave_box |
| 18 | ( | 18 | ( |
| 19 | - String legend, | ||
| 20 | - HTML_Partial_Content content, | ||
| 21 | - List(CoreAttrs) attrs | 19 | + List(CoreAttrs) attrs, |
| 20 | + String legend, | ||
| 21 | + List(HTML_Partial_Content) content | ||
| 22 | )= | 22 | )= |
| 23 | - partial_content([], | ||
| 24 | - div(attrs, | ||
| 25 | - sequence( | ||
| 26 | - [ | 23 | + partial_content( |
| 24 | + div(attrs, [ | ||
| 27 | text([class("frame_wave")], legend), //legend | 25 | text([class("frame_wave")], legend), //legend |
| 28 | - div([class("frame_blk")], partial(content)) | ||
| 29 | - ]))). | 26 | + div([class("frame_blk")], content) |
| 27 | + ])) | ||
| 28 | +. | ||
| 30 | 29 | ||
| 31 | public define HTML_Partial_Content | 30 | public define HTML_Partial_Content |
| 32 | html_wave_box | 31 | html_wave_box |
| 33 | ( | 32 | ( |
| 34 | - String legend, | ||
| 35 | - HTML_Off_Form content, | ||
| 36 | - List(CoreAttrs) attrs | 33 | + List(CoreAttrs) attrs, |
| 34 | + String legend, | ||
| 35 | + List(HTML_Off_Form) content | ||
| 37 | )= | 36 | )= |
| 38 | - partial_content([], | 37 | + partial_content( |
| 39 | div(attrs, | 38 | div(attrs, |
| 40 | - sequence( | ||
| 41 | [ | 39 | [ |
| 42 | text([class("frame_wave")], legend), //legend | 40 | text([class("frame_wave")], legend), //legend |
| 43 | div([class("frame_blk")], content) | 41 | div([class("frame_blk")], content) |
| 44 | - ]))). | 42 | + ])) |
| 43 | +. | ||
| 45 | 44 | ||
| 46 | public define HTML_Off_Form | 45 | public define HTML_Off_Form |
| 47 | html_wave_box | 46 | html_wave_box |
| 48 | ( | 47 | ( |
| 49 | - String legend, | ||
| 50 | - HTML_Off_Form content, | ||
| 51 | - List(CoreAttrs) attrs | 48 | + List(CoreAttrs) attrs, |
| 49 | + String legend, | ||
| 50 | + List(HTML_Off_Form) content | ||
| 52 | )= | 51 | )= |
| 53 | div(attrs, | 52 | div(attrs, |
| 54 | - sequence( | ||
| 55 | [ | 53 | [ |
| 56 | text([class("frame_wave")], legend), //legend | 54 | text([class("frame_wave")], legend), //legend |
| 57 | - div([class("frame_blk")], content) | ||
| 58 | - ])). | 55 | + div([class("frame_blk")], content) |
| 56 | + ]) | ||
| 57 | +. | ||
| 58 | + | ||
| 59 | +public define HTML_Off_Form | ||
| 60 | + html_wave_box | ||
| 61 | + ( | ||
| 62 | + List(CoreAttrs) attrs, | ||
| 63 | + String legend, | ||
| 64 | + HTML_Off_Form content | ||
| 65 | + )= | ||
| 66 | + html_wave_box(attrs, legend, [content]) | ||
| 67 | +. | ||
| 68 | + | ||
| 59 | 69 | ||
| 60 | public define HTML_Off_Form | 70 | public define HTML_Off_Form |
| 61 | html_wave_box | 71 | html_wave_box |
| @@ -63,7 +73,8 @@ public define HTML_Off_Form | @@ -63,7 +73,8 @@ public define HTML_Off_Form | ||
| 63 | String legend, | 73 | String legend, |
| 64 | HTML_Off_Form content | 74 | HTML_Off_Form content |
| 65 | )= | 75 | )= |
| 66 | - html_wave_box(legend, content, [class("frame")]). | 76 | + html_wave_box([class("frame")], legend, content) |
| 77 | +. | ||
| 67 | 78 | ||
| 68 | public define HTML_Partial_Content | 79 | public define HTML_Partial_Content |
| 69 | html_wave_box | 80 | html_wave_box |
| @@ -71,16 +82,18 @@ public define HTML_Partial_Content | @@ -71,16 +82,18 @@ public define HTML_Partial_Content | ||
| 71 | String legend, | 82 | String legend, |
| 72 | HTML_Partial_Content content | 83 | HTML_Partial_Content content |
| 73 | )= | 84 | )= |
| 74 | - html_wave_box(legend, content, [class("frame")]). | 85 | + html_wave_box([class("frame")], legend, [content]) |
| 86 | +. | ||
| 75 | 87 | ||
| 76 | public define HTML_Partial_Content | 88 | public define HTML_Partial_Content |
| 77 | html_wave_box | 89 | html_wave_box |
| 78 | ( | 90 | ( |
| 79 | - String legend, | ||
| 80 | List(CoreAttrs) attrs, | 91 | List(CoreAttrs) attrs, |
| 92 | + String legend, | ||
| 81 | HTML_Partial_Content content | 93 | HTML_Partial_Content content |
| 82 | )= | 94 | )= |
| 83 | - html_wave_box(legend, content, [class("frame")]+attrs). | 95 | + html_wave_box([class("frame") . attrs] , legend, [content]) |
| 96 | +. | ||
| 84 | 97 | ||
| 85 | public define HTML_Partial_Content | 98 | public define HTML_Partial_Content |
| 86 | html_wave_box | 99 | html_wave_box |
| @@ -88,21 +101,21 @@ public define HTML_Partial_Content | @@ -88,21 +101,21 @@ public define HTML_Partial_Content | ||
| 88 | String legend, | 101 | String legend, |
| 89 | HTML_Off_Form content | 102 | HTML_Off_Form content |
| 90 | )= | 103 | )= |
| 91 | - html_wave_box(legend, content, [class("frame")]). | 104 | + html_wave_box([class("frame")], legend, [content]) |
| 105 | +. | ||
| 92 | 106 | ||
| 93 | public define HTML_Off_Form | 107 | public define HTML_Off_Form |
| 94 | html_wave_box_custom_size | 108 | html_wave_box_custom_size |
| 95 | ( | 109 | ( |
| 96 | - Int size, | ||
| 97 | - String legend, | ||
| 98 | - HTML_Off_Form content, | 110 | + Int size, |
| 111 | + String legend, | ||
| 112 | + List(HTML_Off_Form) content, | ||
| 99 | )= | 113 | )= |
| 100 | div([style("width: "+abs_to_decimal(size)+"px")], | 114 | div([style("width: "+abs_to_decimal(size)+"px")], |
| 101 | - sequence( | ||
| 102 | [ | 115 | [ |
| 103 | text([class("frame_wave")], legend), //legend | 116 | text([class("frame_wave")], legend), //legend |
| 104 | - div([class("frame_blk")], content) | ||
| 105 | - ])). | 117 | + div([class("frame_blk")], content) |
| 118 | + ]). | ||
| 106 | 119 | ||
| 107 | public define HTML_Off_Form | 120 | public define HTML_Off_Form |
| 108 | html_wave_box_wide | 121 | html_wave_box_wide |
| @@ -110,7 +123,7 @@ public define HTML_Off_Form | @@ -110,7 +123,7 @@ public define HTML_Off_Form | ||
| 110 | String legend, | 123 | String legend, |
| 111 | HTML_Off_Form content | 124 | HTML_Off_Form content |
| 112 | )= | 125 | )= |
| 113 | - html_wave_box(legend, content, [class("frame wide")]). | 126 | + html_wave_box([class("frame wide")], legend, [content]). |
| 114 | 127 | ||
| 115 | public define HTML_Partial_Content | 128 | public define HTML_Partial_Content |
| 116 | html_wave_box_wide | 129 | html_wave_box_wide |
| @@ -118,7 +131,7 @@ public define HTML_Partial_Content | @@ -118,7 +131,7 @@ public define HTML_Partial_Content | ||
| 118 | String legend, | 131 | String legend, |
| 119 | HTML_Partial_Content content | 132 | HTML_Partial_Content content |
| 120 | )= | 133 | )= |
| 121 | - html_wave_box(legend, content, [class("frame wide")]). | 134 | + html_wave_box([class("frame wide")], legend, content, ). |
| 122 | 135 | ||
| 123 | /**** CHANGELIST ****/ | 136 | /**** CHANGELIST ****/ |
| 124 | public type ChangeListItem: | 137 | public type ChangeListItem: |
| @@ -135,6 +148,23 @@ public define ChangeListItem | @@ -135,6 +148,23 @@ public define ChangeListItem | ||
| 135 | String value | 148 | String value |
| 136 | )= | 149 | )= |
| 137 | change_list_item(icon, label, text(value)). | 150 | change_list_item(icon, label, text(value)). |
| 151 | + | ||
| 152 | +public define ChangeListItem | ||
| 153 | + change_list_item | ||
| 154 | + ( | ||
| 155 | + String icon, | ||
| 156 | + String label, | ||
| 157 | + Int value | ||
| 158 | + )= | ||
| 159 | + change_list_item(icon, label, text(value)). | ||
| 160 | + | ||
| 161 | +public define ChangeListItem | ||
| 162 | + change_list_item | ||
| 163 | + ( | ||
| 164 | + String label, | ||
| 165 | + Int value | ||
| 166 | + )= | ||
| 167 | + change_list_item("", label, text(value)). | ||
| 138 | 168 | ||
| 139 | public define ChangeListItem | 169 | public define ChangeListItem |
| 140 | change_list_item | 170 | change_list_item |