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 | 16 | public define HTML_Partial_Content |
| 17 | 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 | 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 | 30 | public define HTML_Partial_Content |
| 32 | 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 | 38 | div(attrs, |
| 40 | - sequence( | |
| 41 | 39 | [ |
| 42 | 40 | text([class("frame_wave")], legend), //legend |
| 43 | 41 | div([class("frame_blk")], content) |
| 44 | - ]))). | |
| 42 | + ])) | |
| 43 | +. | |
| 45 | 44 | |
| 46 | 45 | public define HTML_Off_Form |
| 47 | 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 | 52 | div(attrs, |
| 54 | - sequence( | |
| 55 | 53 | [ |
| 56 | 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 | 70 | public define HTML_Off_Form |
| 61 | 71 | html_wave_box |
| ... | ... | @@ -63,7 +73,8 @@ public define HTML_Off_Form |
| 63 | 73 | String legend, |
| 64 | 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 | 79 | public define HTML_Partial_Content |
| 69 | 80 | html_wave_box |
| ... | ... | @@ -71,16 +82,18 @@ public define HTML_Partial_Content |
| 71 | 82 | String legend, |
| 72 | 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 | 88 | public define HTML_Partial_Content |
| 77 | 89 | html_wave_box |
| 78 | 90 | ( |
| 79 | - String legend, | |
| 80 | 91 | List(CoreAttrs) attrs, |
| 92 | + String legend, | |
| 81 | 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 | 98 | public define HTML_Partial_Content |
| 86 | 99 | html_wave_box |
| ... | ... | @@ -88,21 +101,21 @@ public define HTML_Partial_Content |
| 88 | 101 | String legend, |
| 89 | 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 | 107 | public define HTML_Off_Form |
| 94 | 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 | 114 | div([style("width: "+abs_to_decimal(size)+"px")], |
| 101 | - sequence( | |
| 102 | 115 | [ |
| 103 | 116 | text([class("frame_wave")], legend), //legend |
| 104 | - div([class("frame_blk")], content) | |
| 105 | - ])). | |
| 117 | + div([class("frame_blk")], content) | |
| 118 | + ]). | |
| 106 | 119 | |
| 107 | 120 | public define HTML_Off_Form |
| 108 | 121 | html_wave_box_wide |
| ... | ... | @@ -110,7 +123,7 @@ public define HTML_Off_Form |
| 110 | 123 | String legend, |
| 111 | 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 | 128 | public define HTML_Partial_Content |
| 116 | 129 | html_wave_box_wide |
| ... | ... | @@ -118,7 +131,7 @@ public define HTML_Partial_Content |
| 118 | 131 | String legend, |
| 119 | 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 | 136 | /**** CHANGELIST ****/ |
| 124 | 137 | public type ChangeListItem: |
| ... | ... | @@ -135,6 +148,23 @@ public define ChangeListItem |
| 135 | 148 | String value |
| 136 | 149 | )= |
| 137 | 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 | 169 | public define ChangeListItem |
| 140 | 170 | change_list_item | ... | ... |