From fed6db131cf6d306092a560ce5764ee87a6f4436 Mon Sep 17 00:00:00 2001 From: totoro Date: Sun, 9 Apr 2017 21:40:53 +0200 Subject: [PATCH] add HK_Form_Table_Attribute to HK_Form_Table --- ds_files/ds_types.anubis | 8 ++++++++ model/types/hk_app.anubis | 2 +- model/types/hk_app_name.anubis | 2 +- model/types/hk_database.anubis | 2 +- model/types/hk_datetime_field_attr.anubis | 2 +- model/types/hk_help_text.anubis | 2 +- model/types/hk_icon.anubis | 2 +- model/types/hk_int_choice.anubis | 2 +- model/types/hk_int_choices.anubis | 2 +- model/types/hk_model.anubis | 2 +- model/types/hk_model_attr.anubis | 2 +- model/types/hk_model_column.anubis | 2 +- model/types/hk_model_field.anubis | 2 +- model/types/hk_table.anubis | 2 +- model/types/hk_text_choice.anubis | 2 +- model/types/hk_text_choices.anubis | 2 +- model/types/hk_text_field_attr.anubis | 2 +- view/types/hk_display.anubis | 2 +- view/types/hk_edit_view.anubis | 2 +- view/types/hk_edit_view_table.anubis | 2 +- view/types/hk_edit_view_table_cell.anubis | 2 +- view/types/hk_edit_view_table_line.anubis | 2 +- view/types/hk_fk_view.anubis | 2 +- view/types/hk_form.anubis | 2 +- view/types/hk_form_tab.anubis | 2 +- view/types/hk_form_table.anubis | 6 ++++-- view/types/hk_form_table_attribute.anubis | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ view/types/hk_form_table_cell.anubis | 2 +- view/types/hk_form_table_line.anubis | 2 +- view/types/hk_list_view.anubis | 2 +- 30 files changed, 108 insertions(+), 29 deletions(-) create mode 100644 view/types/hk_form_table_attribute.anubis diff --git a/ds_files/ds_types.anubis b/ds_files/ds_types.anubis index 3ef3739..e7a35cc 100644 --- a/ds_files/ds_types.anubis +++ b/ds_files/ds_types.anubis @@ -210,8 +210,16 @@ public define List(DS_Type) hayamiki_lib_types_description = ]) ]), + ds_type("HK_Form_Table_Attribute", [ + alternative("hidden", [ + component(string, "name"), + component(string, "value") + ]) + ]), + ds_type("HK_Form_Table", no_message, [ alternative("hk_form_table", [ + component(list, extern_type("HK_Form_Table_Attribute", view_types+"hk_form_table_attribute.anubis"), "table_attr"), component(list, extern_type("HK_Form_Table_Line", view_types+"hk_form_table_line.anubis"), "form_lines") ]) ]), diff --git a/model/types/hk_app.anubis b/model/types/hk_app.anubis index 1663aad..43708f4 100644 --- a/model/types/hk_app.anubis +++ b/model/types/hk_app.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_app_name.anubis b/model/types/hk_app_name.anubis index 31ed274..69feaf0 100644 --- a/model/types/hk_app_name.anubis +++ b/model/types/hk_app_name.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_database.anubis b/model/types/hk_database.anubis index 80b7f5c..4fdd694 100644 --- a/model/types/hk_database.anubis +++ b/model/types/hk_database.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_datetime_field_attr.anubis b/model/types/hk_datetime_field_attr.anubis index 8063843..29e2003 100644 --- a/model/types/hk_datetime_field_attr.anubis +++ b/model/types/hk_datetime_field_attr.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_help_text.anubis b/model/types/hk_help_text.anubis index c439860..a5fe1b4 100644 --- a/model/types/hk_help_text.anubis +++ b/model/types/hk_help_text.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_icon.anubis b/model/types/hk_icon.anubis index 9b75856..bca9a29 100644 --- a/model/types/hk_icon.anubis +++ b/model/types/hk_icon.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_int_choice.anubis b/model/types/hk_int_choice.anubis index 9772a63..3d3c1d9 100644 --- a/model/types/hk_int_choice.anubis +++ b/model/types/hk_int_choice.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_int_choices.anubis b/model/types/hk_int_choices.anubis index c2e50f8..b7055a4 100644 --- a/model/types/hk_int_choices.anubis +++ b/model/types/hk_int_choices.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_model.anubis b/model/types/hk_model.anubis index 3ac6828..bfecc54 100644 --- a/model/types/hk_model.anubis +++ b/model/types/hk_model.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_model_attr.anubis b/model/types/hk_model_attr.anubis index 70b6ac7..1d45ad5 100644 --- a/model/types/hk_model_attr.anubis +++ b/model/types/hk_model_attr.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_model_column.anubis b/model/types/hk_model_column.anubis index 3f9b1b2..faad5a6 100644 --- a/model/types/hk_model_column.anubis +++ b/model/types/hk_model_column.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_model_field.anubis b/model/types/hk_model_field.anubis index c3890d7..5855a2f 100644 --- a/model/types/hk_model_field.anubis +++ b/model/types/hk_model_field.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_table.anubis b/model/types/hk_table.anubis index c9e4aea..01c139b 100644 --- a/model/types/hk_table.anubis +++ b/model/types/hk_table.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_text_choice.anubis b/model/types/hk_text_choice.anubis index b7a7c7e..5932fb5 100644 --- a/model/types/hk_text_choice.anubis +++ b/model/types/hk_text_choice.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_text_choices.anubis b/model/types/hk_text_choices.anubis index 878c39a..f1bece1 100644 --- a/model/types/hk_text_choices.anubis +++ b/model/types/hk_text_choices.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/model/types/hk_text_field_attr.anubis b/model/types/hk_text_field_attr.anubis index 652e1f6..f5624bc 100644 --- a/model/types/hk_text_field_attr.anubis +++ b/model/types/hk_text_field_attr.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_display.anubis b/view/types/hk_display.anubis index 520b7bc..cb762f6 100644 --- a/view/types/hk_display.anubis +++ b/view/types/hk_display.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_edit_view.anubis b/view/types/hk_edit_view.anubis index 76bfd07..ca53aba 100644 --- a/view/types/hk_edit_view.anubis +++ b/view/types/hk_edit_view.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_edit_view_table.anubis b/view/types/hk_edit_view_table.anubis index f2fa4f5..c33ad6f 100644 --- a/view/types/hk_edit_view_table.anubis +++ b/view/types/hk_edit_view_table.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_edit_view_table_cell.anubis b/view/types/hk_edit_view_table_cell.anubis index 486bca3..e20d8e9 100644 --- a/view/types/hk_edit_view_table_cell.anubis +++ b/view/types/hk_edit_view_table_cell.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_edit_view_table_line.anubis b/view/types/hk_edit_view_table_line.anubis index f730614..5471676 100644 --- a/view/types/hk_edit_view_table_line.anubis +++ b/view/types/hk_edit_view_table_line.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_fk_view.anubis b/view/types/hk_fk_view.anubis index f28cd4f..4e04d8b 100644 --- a/view/types/hk_fk_view.anubis +++ b/view/types/hk_fk_view.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_form.anubis b/view/types/hk_form.anubis index 61553c8..a038526 100644 --- a/view/types/hk_form.anubis +++ b/view/types/hk_form.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_form_tab.anubis b/view/types/hk_form_tab.anubis index fadc185..6382222 100644 --- a/view/types/hk_form_tab.anubis +++ b/view/types/hk_form_tab.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_form_table.anubis b/view/types/hk_form_table.anubis index c33f610..5986893 100644 --- a/view/types/hk_form_table.anubis +++ b/view/types/hk_form_table.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ @@ -11,9 +11,11 @@ transmit system/convert.anubis transmit tools/basis.anubis transmit hayamiki_lib/view/types/hk_form_table_line.anubis +transmit hayamiki_lib/view/types/hk_form_table_attribute.anubis public type HK_Form_Table: hk_form_table( - List(HK_Form_Table_Line) form_lines + List(HK_Form_Table_Attribute) table_attr, + List(HK_Form_Table_Line) form_lines ) . diff --git a/view/types/hk_form_table_attribute.anubis b/view/types/hk_form_table_attribute.anubis new file mode 100644 index 0000000..9f696ea --- /dev/null +++ b/view/types/hk_form_table_attribute.anubis @@ -0,0 +1,69 @@ +/* + * Created by 伝作 (Densaku). + * Types & Messages generator written by フランスのトトロ aka (David RENÉ) + * Date: 2017-04-09 + * Time: 21:26:44 + * + */ + +transmit system/muscle.anubis +transmit system/convert.anubis +transmit tools/basis.anubis + + +public type HK_Form_Table_Attribute: + hidden( + String name, + String value + ) +. + + HK_Form_Table_Attribute message format + ====================================== + + +public define Message + to_Message + ( + HK_Form_Table_Attribute _hk_form_table_attribute + )= + with _hk_form_table_attribute_message = message((Word32)0), // + forget(add_string(_hk_form_table_attribute_message, "__TYPE__", "HK_Form_Table_Attribute")); + if _hk_form_table_attribute is + { + //Alternative hidden + hidden(_name, _value) then + forget(add_string(_hk_form_table_attribute_message, "__TYPE_ALT__", "hidden")); + // [type = String] hidden.name + forget(add_string(_hk_form_table_attribute_message, "name", _name)); + // [type = String] hidden.value + forget(add_string(_hk_form_table_attribute_message, "value", _value)), + + }; + _hk_form_table_attribute_message +. + +public define Maybe(HK_Form_Table_Attribute) + from_Message + ( + Message _hk_form_table_attribute_message + )= + if find_string(_hk_form_table_attribute_message, "__TYPE__") is {failure then failure, success(__type__) then + if find_string(_hk_form_table_attribute_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then + if __type__ = "HK_Form_Table_Attribute" then + //Alternative hidden + if __type_alt__ = "hidden" then //Alternative hidden + // [type = String] hidden.name + if find_string(_hk_form_table_attribute_message, "name") is {failure then failure, success(_name_) then + // [type = String] hidden.value + if find_string(_hk_form_table_attribute_message, "value") is {failure then failure, success(_value_) then + + success(hidden(_name_, _value_)) + }} + else + failure //No valid Alternative found ! + else + failure //Type not found in message ! + }} +. + diff --git a/view/types/hk_form_table_cell.anubis b/view/types/hk_form_table_cell.anubis index 05587bc..cfa5c86 100644 --- a/view/types/hk_form_table_cell.anubis +++ b/view/types/hk_form_table_cell.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_form_table_line.anubis b/view/types/hk_form_table_line.anubis index 05c70a4..1703a31 100644 --- a/view/types/hk_form_table_line.anubis +++ b/view/types/hk_form_table_line.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ diff --git a/view/types/hk_list_view.anubis b/view/types/hk_list_view.anubis index ea22aa9..203de4a 100644 --- a/view/types/hk_list_view.anubis +++ b/view/types/hk_list_view.anubis @@ -2,7 +2,7 @@ * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) * Date: 2017-04-09 - * Time: 02:17:12 + * Time: 21:26:44 * */ -- libgit2 0.21.4