Commit b0635c56b0ff5113b85301a06aee7b71ce76bc22
1 parent
69ab6263
add hk_form_table_cell_table, which enable to add table inside cell
Showing
28 changed files
with
168 additions
and
177 deletions
Show diff stats
ds_files/ds_types.anubis
| ... | ... | @@ -200,31 +200,7 @@ public define List(DS_Type_File) hayamiki_lib_types_description = |
| 200 | 200 | ]) |
| 201 | 201 | ]), |
| 202 | 202 | |
| 203 | - ds_type("HK_Form_Table_Cell", no_message, [ | |
| 204 | - alternative("hk_form_table_cell", [ | |
| 205 | - component(extern_type("HK_Form_Entry", view_types+"hk_form_entry.anubis"), "form_entry") | |
| 206 | - ]) | |
| 207 | - ]), | |
| 208 | - | |
| 209 | - ds_type("HK_Form_Table_Line", no_message, [ | |
| 210 | - alternative("hk_form_table_line", [ | |
| 211 | - component(list, extern_type("HK_Form_Table_Cell", view_types+"hk_form_table_cell.anubis"), "form_table_cells") | |
| 212 | - ]) | |
| 213 | - ]), | |
| 214 | - | |
| 215 | - ds_type("HK_Form_Table_Attribute", [ | |
| 216 | - alternative("hidden", [ | |
| 217 | - component(string, "name"), | |
| 218 | - component(string, "value") | |
| 219 | - ]) | |
| 220 | - ]), | |
| 221 | - | |
| 222 | - ds_type("HK_Form_Table", no_message, [ | |
| 223 | - alternative("hk_form_table", [ | |
| 224 | - component(list, extern_type("HK_Form_Table_Attribute", view_types+"hk_form_table_attribute.anubis"), "table_attr"), | |
| 225 | - component(list, extern_type("HK_Form_Table_Line", view_types+"hk_form_table_line.anubis"), "form_lines") | |
| 226 | - ]) | |
| 227 | - ]), | |
| 203 | + | |
| 228 | 204 | |
| 229 | 205 | |
| 230 | 206 | |
| ... | ... | @@ -293,6 +269,38 @@ public define List(DS_Type_File) hayamiki_lib_types_description = |
| 293 | 269 | ]) |
| 294 | 270 | ]), |
| 295 | 271 | |
| 272 | + ]), | |
| 273 | + | |
| 274 | + ds_type_file(auto, name("hk_form_table"), | |
| 275 | + [ | |
| 276 | + ds_type("HK_Form_Table_Cell", no_message, [ | |
| 277 | + alternative("hk_form_table_cell", [ | |
| 278 | + component(extern_type("HK_Form_Entry", view_types+"hk_form_entry.anubis"), "form_entry") | |
| 279 | + ]), | |
| 280 | + alternative("hk_form_table_cell_table", [ | |
| 281 | + component(list, ds_type("HK_Form_Table_Line"), "form_lines") | |
| 282 | + ]) | |
| 283 | + ]), | |
| 284 | + | |
| 285 | + ds_type("HK_Form_Table_Line", no_message, [ | |
| 286 | + alternative("hk_form_table_line", [ | |
| 287 | + component(list, ds_type("HK_Form_Table_Cell"), "form_table_cells") | |
| 288 | + ]) | |
| 289 | + ]), | |
| 290 | + | |
| 291 | + ds_type("HK_Form_Table_Attribute", [ | |
| 292 | + alternative("hidden", [ | |
| 293 | + component(string, "name"), | |
| 294 | + component(string, "value") | |
| 295 | + ]) | |
| 296 | + ]), | |
| 297 | + | |
| 298 | + ds_type("HK_Form_Table", no_message, [ | |
| 299 | + alternative("hk_form_table", [ | |
| 300 | + component(list, ds_type("HK_Form_Table_Attribute"), "table_attr"), | |
| 301 | + component(list, ds_type("HK_Form_Table_Line"), "form_lines") | |
| 302 | + ]) | |
| 303 | + ]), | |
| 296 | 304 | ]) |
| 297 | 305 | |
| 298 | 306 | ] | ... | ... |
model/types/hk_app.anubis
model/types/hk_app_name.anubis
model/types/hk_database.anubis
model/types/hk_datetime_field_attr.anubis
model/types/hk_help_text.anubis
model/types/hk_icon.anubis
model/types/hk_int_choice.anubis
model/types/hk_int_choices.anubis
model/types/hk_model.anubis
model/types/hk_model_attr.anubis
model/types/hk_model_column.anubis
model/types/hk_model_field.anubis
model/types/hk_table.anubis
model/types/hk_text_choice.anubis
model/types/hk_text_choices.anubis
model/types/hk_text_field_attr.anubis
view/types/hk_display.anubis
view/types/hk_editor.anubis
view/types/hk_editor_table.anubis
| 1 | -/* | |
| 1 | +/* | |
| 2 | 2 | * Created by 伝作 (Densaku). |
| 3 | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | 4 | * Date: 2017-04-12 |
| 5 | - * Time: 22:22:45 | |
| 5 | + * Time: 23:52:21 | |
| 6 | 6 | * |
| 7 | 7 | */ |
| 8 | 8 | |
| ... | ... | @@ -13,6 +13,20 @@ transmit tools/basis.anubis |
| 13 | 13 | |
| 14 | 14 | public type HK_Editor_Table_Line:... |
| 15 | 15 | |
| 16 | +public define Maybe(HK_Editor_Table_Line) | |
| 17 | + from_Message | |
| 18 | + ( | |
| 19 | + Message _hk_editor_table_line_message | |
| 20 | + ) | |
| 21 | +. | |
| 22 | + | |
| 23 | +public define Message | |
| 24 | + to_Message | |
| 25 | + ( | |
| 26 | + HK_Editor_Table_Line _hk_editor_table_line | |
| 27 | + ). | |
| 28 | + | |
| 29 | + | |
| 16 | 30 | public type HK_Editor_Table_Cell: |
| 17 | 31 | empty, |
| 18 | 32 | column( |
| ... | ... | @@ -40,21 +54,9 @@ public type HK_Editor_Table: |
| 40 | 54 | ) |
| 41 | 55 | . |
| 42 | 56 | |
| 43 | -public define Maybe(HK_Editor_Table_Line) | |
| 44 | - from_Message | |
| 45 | - ( | |
| 46 | - Message _hk_editor_table_line_message | |
| 47 | - ) | |
| 48 | -. | |
| 49 | - | |
| 50 | 57 | HK_Editor_Table_Cell message format |
| 51 | 58 | =================================== |
| 52 | 59 | |
| 53 | -public define Message | |
| 54 | - to_Message | |
| 55 | - ( | |
| 56 | - HK_Editor_Table_Line _hk_editor_table_line | |
| 57 | - ). | |
| 58 | 60 | |
| 59 | 61 | public define Message |
| 60 | 62 | to_Message | ... | ... |
view/types/hk_fk_view.anubis
view/types/hk_form.anubis
view/types/hk_form_tab.anubis
view/types/hk_form_table.anubis
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | * Created by 伝作 (Densaku). |
| 3 | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | 4 | * Date: 2017-04-12 |
| 5 | - * Time: 22:22:45 | |
| 5 | + * Time: 23:52:21 | |
| 6 | 6 | * |
| 7 | 7 | */ |
| 8 | 8 | |
| ... | ... | @@ -10,9 +10,47 @@ transmit system/muscle.anubis |
| 10 | 10 | transmit system/convert.anubis |
| 11 | 11 | transmit tools/basis.anubis |
| 12 | 12 | |
| 13 | -transmit hayamiki_lib/view/types/hk_form_table_line.anubis | |
| 14 | -transmit hayamiki_lib/view/types/hk_form_table_attribute.anubis | |
| 13 | +transmit hayamiki_lib/view/types/hk_form_entry.anubis | |
| 15 | 14 | |
| 15 | +public type HK_Form_Table_Line:... | |
| 16 | + | |
| 17 | +public define Maybe(HK_Form_Table_Line) | |
| 18 | + from_Message | |
| 19 | + ( | |
| 20 | + Message _hk_form_table_line_message | |
| 21 | + ) | |
| 22 | +. | |
| 23 | + | |
| 24 | +public define Message | |
| 25 | + to_Message | |
| 26 | + ( | |
| 27 | + HK_Form_Table_Line _hk_form_table_line | |
| 28 | + ). | |
| 29 | + | |
| 30 | + | |
| 31 | +public type HK_Form_Table_Cell: | |
| 32 | + hk_form_table_cell( | |
| 33 | + HK_Form_Entry form_entry | |
| 34 | + ), | |
| 35 | + hk_form_table_cell_table( | |
| 36 | + List(HK_Form_Table_Line) form_lines | |
| 37 | + ) | |
| 38 | +. | |
| 39 | + | |
| 40 | + | |
| 41 | +public type HK_Form_Table_Line: | |
| 42 | + hk_form_table_line( | |
| 43 | + List(HK_Form_Table_Cell) form_table_cells | |
| 44 | + ) | |
| 45 | +. | |
| 46 | + | |
| 47 | + | |
| 48 | +public type HK_Form_Table_Attribute: | |
| 49 | + hidden( | |
| 50 | + String name, | |
| 51 | + String value | |
| 52 | + ) | |
| 53 | +. | |
| 16 | 54 | |
| 17 | 55 | |
| 18 | 56 | public type HK_Form_Table: |
| ... | ... | @@ -21,3 +59,59 @@ public type HK_Form_Table: |
| 21 | 59 | List(HK_Form_Table_Line) form_lines |
| 22 | 60 | ) |
| 23 | 61 | . |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + HK_Form_Table_Attribute message format | |
| 68 | + ====================================== | |
| 69 | + | |
| 70 | + | |
| 71 | +public define Message | |
| 72 | + to_Message | |
| 73 | + ( | |
| 74 | + HK_Form_Table_Attribute _hk_form_table_attribute | |
| 75 | + )= | |
| 76 | + with _hk_form_table_attribute_message = message((Word32)0), // | |
| 77 | + forget(add_string(_hk_form_table_attribute_message, "__TYPE__", "HK_Form_Table_Attribute")); | |
| 78 | + if _hk_form_table_attribute is | |
| 79 | + { | |
| 80 | + //Alternative hidden | |
| 81 | + hidden(_name, _value) then | |
| 82 | + forget(add_string(_hk_form_table_attribute_message, "__TYPE_ALT__", "hidden")); | |
| 83 | + // [type = String] hidden.name | |
| 84 | + forget(add_string(_hk_form_table_attribute_message, "name", _name)); | |
| 85 | + // [type = String] hidden.value | |
| 86 | + forget(add_string(_hk_form_table_attribute_message, "value", _value)), | |
| 87 | + | |
| 88 | + }; | |
| 89 | + _hk_form_table_attribute_message | |
| 90 | +. | |
| 91 | + | |
| 92 | +public define Maybe(HK_Form_Table_Attribute) | |
| 93 | + from_Message | |
| 94 | + ( | |
| 95 | + Message _hk_form_table_attribute_message | |
| 96 | + )= | |
| 97 | + if find_string(_hk_form_table_attribute_message, "__TYPE__") is {failure then failure, success(__type__) then | |
| 98 | + if find_string(_hk_form_table_attribute_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | |
| 99 | + if __type__ = "HK_Form_Table_Attribute" then | |
| 100 | + //Alternative hidden | |
| 101 | + if __type_alt__ = "hidden" then //Alternative hidden | |
| 102 | + // [type = String] hidden.name | |
| 103 | + if find_string(_hk_form_table_attribute_message, "name") is {failure then failure, success(_name_) then | |
| 104 | + // [type = String] hidden.value | |
| 105 | + if find_string(_hk_form_table_attribute_message, "value") is {failure then failure, success(_value_) then | |
| 106 | + | |
| 107 | + success(hidden(_name_, _value_)) | |
| 108 | + }} | |
| 109 | + else | |
| 110 | + failure //No valid Alternative found ! | |
| 111 | + else | |
| 112 | + failure //Type not found in message ! | |
| 113 | + }} | |
| 114 | +. | |
| 115 | + | |
| 116 | + | |
| 117 | + | ... | ... |
view/types/hk_form_table_attribute.anubis deleted
| 1 | -/* | |
| 2 | - * Created by 伝作 (Densaku). | |
| 3 | - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | |
| 4 | - * Date: 2017-04-12 | |
| 5 | - * Time: 22:22:45 | |
| 6 | - * | |
| 7 | - */ | |
| 8 | - | |
| 9 | -transmit system/muscle.anubis | |
| 10 | -transmit system/convert.anubis | |
| 11 | -transmit tools/basis.anubis | |
| 12 | - | |
| 13 | - | |
| 14 | - | |
| 15 | - | |
| 16 | -public type HK_Form_Table_Attribute: | |
| 17 | - hidden( | |
| 18 | - String name, | |
| 19 | - String value | |
| 20 | - ) | |
| 21 | -. | |
| 22 | - | |
| 23 | - HK_Form_Table_Attribute message format | |
| 24 | - ====================================== | |
| 25 | - | |
| 26 | - | |
| 27 | -public define Message | |
| 28 | - to_Message | |
| 29 | - ( | |
| 30 | - HK_Form_Table_Attribute _hk_form_table_attribute | |
| 31 | - )= | |
| 32 | - with _hk_form_table_attribute_message = message((Word32)0), // | |
| 33 | - forget(add_string(_hk_form_table_attribute_message, "__TYPE__", "HK_Form_Table_Attribute")); | |
| 34 | - if _hk_form_table_attribute is | |
| 35 | - { | |
| 36 | - //Alternative hidden | |
| 37 | - hidden(_name, _value) then | |
| 38 | - forget(add_string(_hk_form_table_attribute_message, "__TYPE_ALT__", "hidden")); | |
| 39 | - // [type = String] hidden.name | |
| 40 | - forget(add_string(_hk_form_table_attribute_message, "name", _name)); | |
| 41 | - // [type = String] hidden.value | |
| 42 | - forget(add_string(_hk_form_table_attribute_message, "value", _value)), | |
| 43 | - | |
| 44 | - }; | |
| 45 | - _hk_form_table_attribute_message | |
| 46 | -. | |
| 47 | - | |
| 48 | -public define Maybe(HK_Form_Table_Attribute) | |
| 49 | - from_Message | |
| 50 | - ( | |
| 51 | - Message _hk_form_table_attribute_message | |
| 52 | - )= | |
| 53 | - if find_string(_hk_form_table_attribute_message, "__TYPE__") is {failure then failure, success(__type__) then | |
| 54 | - if find_string(_hk_form_table_attribute_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | |
| 55 | - if __type__ = "HK_Form_Table_Attribute" then | |
| 56 | - //Alternative hidden | |
| 57 | - if __type_alt__ = "hidden" then //Alternative hidden | |
| 58 | - // [type = String] hidden.name | |
| 59 | - if find_string(_hk_form_table_attribute_message, "name") is {failure then failure, success(_name_) then | |
| 60 | - // [type = String] hidden.value | |
| 61 | - if find_string(_hk_form_table_attribute_message, "value") is {failure then failure, success(_value_) then | |
| 62 | - | |
| 63 | - success(hidden(_name_, _value_)) | |
| 64 | - }} | |
| 65 | - else | |
| 66 | - failure //No valid Alternative found ! | |
| 67 | - else | |
| 68 | - failure //Type not found in message ! | |
| 69 | - }} | |
| 70 | -. | |
| 71 | - |
view/types/hk_form_table_cell.anubis deleted
| 1 | -/* | |
| 2 | - * Created by 伝作 (Densaku). | |
| 3 | - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | |
| 4 | - * Date: 2017-04-12 | |
| 5 | - * Time: 22:22:45 | |
| 6 | - * | |
| 7 | - */ | |
| 8 | - | |
| 9 | -transmit system/muscle.anubis | |
| 10 | -transmit system/convert.anubis | |
| 11 | -transmit tools/basis.anubis | |
| 12 | - | |
| 13 | -transmit hayamiki_lib/view/types/hk_form_entry.anubis | |
| 14 | - | |
| 15 | - | |
| 16 | - | |
| 17 | -public type HK_Form_Table_Cell: | |
| 18 | - hk_form_table_cell( | |
| 19 | - HK_Form_Entry form_entry | |
| 20 | - ) | |
| 21 | -. |
view/types/hk_form_table_line.anubis deleted
| 1 | -/* | |
| 2 | - * Created by 伝作 (Densaku). | |
| 3 | - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | |
| 4 | - * Date: 2017-04-12 | |
| 5 | - * Time: 22:22:45 | |
| 6 | - * | |
| 7 | - */ | |
| 8 | - | |
| 9 | -transmit system/muscle.anubis | |
| 10 | -transmit system/convert.anubis | |
| 11 | -transmit tools/basis.anubis | |
| 12 | - | |
| 13 | -transmit hayamiki_lib/view/types/hk_form_table_cell.anubis | |
| 14 | - | |
| 15 | - | |
| 16 | - | |
| 17 | -public type HK_Form_Table_Line: | |
| 18 | - hk_form_table_line( | |
| 19 | - List(HK_Form_Table_Cell) form_table_cells | |
| 20 | - ) | |
| 21 | -. |