Commit 7a53f1c12572de03f815376ca5ee3b04590c962c
1 parent
fed6db13
add support of cell in table description
Showing
30 changed files
with
83 additions
and
62 deletions
Show diff stats
ds_files/ds_types.anubis
| ... | ... | @@ -230,7 +230,10 @@ public define List(DS_Type) hayamiki_lib_types_description = |
| 230 | 230 | component(string, "column_name") |
| 231 | 231 | ]), |
| 232 | 232 | alternative("label", [ |
| 233 | - component(string, "label") | |
| 233 | + component(string, "label"), | |
| 234 | + ]), | |
| 235 | + alternative("cell", [ | |
| 236 | + component(list, extern_type("HK_Edit_View_Table_Cell", view_types+"hk_edit_view_table_cell.anubis"), "cell") | |
| 234 | 237 | ]) |
| 235 | 238 | ]), |
| 236 | 239 | ... | ... |
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_edit_view.anubis
view/types/hk_edit_view_table.anubis
view/types/hk_edit_view_table_cell.anubis
| 1 | 1 | /* |
| 2 | 2 | * Created by 伝作 (Densaku). |
| 3 | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-09 | |
| 5 | - * Time: 21:26:44 | |
| 4 | + * Date: 2017-04-10 | |
| 5 | + * Time: 09:51:00 | |
| 6 | 6 | * |
| 7 | 7 | */ |
| 8 | 8 | |
| ... | ... | @@ -10,14 +10,18 @@ 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_edit_view_table_cell.anubis | |
| 13 | 14 | |
| 14 | 15 | public type HK_Edit_View_Table_Cell: |
| 15 | - empty, | |
| 16 | + empty, | |
| 16 | 17 | column( |
| 17 | - String column_name | |
| 18 | + String column_name | |
| 18 | 19 | ), |
| 19 | 20 | label( |
| 20 | - String label | |
| 21 | + String label | |
| 22 | + ), | |
| 23 | + cell( | |
| 24 | + List(HK_Edit_View_Table_Cell) cell | |
| 21 | 25 | ) |
| 22 | 26 | . |
| 23 | 27 | |
| ... | ... | @@ -50,6 +54,12 @@ public define Message |
| 50 | 54 | // [type = String] label.label |
| 51 | 55 | forget(add_string(_hk_edit_view_table_cell_message, "label", _label)), |
| 52 | 56 | |
| 57 | + //Alternative cell | |
| 58 | + cell(__cell) then | |
| 59 | + forget(add_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__", "cell")); | |
| 60 | + // [type = List(HK_Edit_View_Table_Cell)] cell.cell | |
| 61 | + map_forget((HK_Edit_View_Table_Cell _cell) |-> add_message(_hk_edit_view_table_cell_message, "cell", to_Message(_cell)), __cell), | |
| 62 | + | |
| 53 | 63 | }; |
| 54 | 64 | _hk_edit_view_table_cell_message |
| 55 | 65 | . |
| ... | ... | @@ -79,6 +89,14 @@ public define Maybe(HK_Edit_View_Table_Cell) |
| 79 | 89 | |
| 80 | 90 | success(label(_label_)) |
| 81 | 91 | } |
| 92 | + else //Alternative cell | |
| 93 | + if __type_alt__ = "cell" then //Alternative cell | |
| 94 | + // [type = List(HK_Edit_View_Table_Cell)] cell.cell | |
| 95 | + with mb__cell_ = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Table_Cell)) from_Message(msg), find_messages(_hk_edit_view_table_cell_message, "cell")), | |
| 96 | + if mb__cell_ is {failure then failure, success(_cell_) then | |
| 97 | + | |
| 98 | + success(cell(_cell_)) | |
| 99 | + } | |
| 82 | 100 | else |
| 83 | 101 | failure //No valid Alternative found ! |
| 84 | 102 | else | ... | ... |
view/types/hk_edit_view_table_line.anubis
view/types/hk_fk_view.anubis
view/types/hk_form.anubis
view/types/hk_form_tab.anubis
view/types/hk_form_table.anubis
view/types/hk_form_table_attribute.anubis
view/types/hk_form_table_cell.anubis
view/types/hk_form_table_line.anubis