Commit 7ed7fe529878708ef0b0a37fcc8c504425431777
1 parent
4eca48b0
refactoring in progress... Not finished
Showing
36 changed files
with
582 additions
and
497 deletions
Show diff stats
model/types/hk_app.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_app_name.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_database.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_datetime_field_attr.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_display.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_edit_view.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| @@ -22,7 +22,7 @@ public type HK_Edit_View: | @@ -22,7 +22,7 @@ public type HK_Edit_View: | ||
| 22 | ), | 22 | ), |
| 23 | edit_view_table_form( | 23 | edit_view_table_form( |
| 24 | String view_name, | 24 | String view_name, |
| 25 | - HK_Edit_View_Table ev_table | 25 | + HK_Edit_View_Table form_table |
| 26 | ) | 26 | ) |
| 27 | . | 27 | . |
| 28 | 28 | ||
| @@ -54,12 +54,12 @@ public define Message | @@ -54,12 +54,12 @@ public define Message | ||
| 54 | map_forget((HK_FK_View _fk_view) |-> add_message(_hk_edit_view_message, "fk_view", to_Message(_fk_view)), __fk_view), | 54 | map_forget((HK_FK_View _fk_view) |-> add_message(_hk_edit_view_message, "fk_view", to_Message(_fk_view)), __fk_view), |
| 55 | 55 | ||
| 56 | //Alternative edit_view_table_form | 56 | //Alternative edit_view_table_form |
| 57 | - edit_view_table_form(_view_name, _ev_table) then | 57 | + edit_view_table_form(_view_name, _form_table) then |
| 58 | forget(add_string(_hk_edit_view_message, "__TYPE_ALT__", "edit_view_table_form")); | 58 | forget(add_string(_hk_edit_view_message, "__TYPE_ALT__", "edit_view_table_form")); |
| 59 | // [type = String] edit_view_table_form.view_name | 59 | // [type = String] edit_view_table_form.view_name |
| 60 | forget(add_string(_hk_edit_view_message, "view_name", _view_name)); | 60 | forget(add_string(_hk_edit_view_message, "view_name", _view_name)); |
| 61 | - // [type = HK_Edit_View_Table] edit_view_table_form.ev_table | ||
| 62 | - forget(add_message(_hk_edit_view_message, "ev_table", to_Message(_ev_table))), | 61 | + // [type = HK_Edit_View_Table] edit_view_table_form.form_table |
| 62 | + forget(add_message(_hk_edit_view_message, "form_table", to_Message(_form_table))), | ||
| 63 | 63 | ||
| 64 | }; | 64 | }; |
| 65 | _hk_edit_view_message | 65 | _hk_edit_view_message |
| @@ -92,11 +92,11 @@ public define Maybe(HK_Edit_View) | @@ -92,11 +92,11 @@ public define Maybe(HK_Edit_View) | ||
| 92 | if __type_alt__ = "edit_view_table_form" then //Alternative edit_view_table_form | 92 | if __type_alt__ = "edit_view_table_form" then //Alternative edit_view_table_form |
| 93 | // [type = String] edit_view_table_form.view_name | 93 | // [type = String] edit_view_table_form.view_name |
| 94 | if find_string(_hk_edit_view_message, "view_name") is {failure then failure, success(view_name) then | 94 | if find_string(_hk_edit_view_message, "view_name") is {failure then failure, success(view_name) then |
| 95 | - // [type = HK_Edit_View_Table] edit_view_table_form.ev_table | ||
| 96 | - if find_message(_hk_edit_view_message, "ev_table") is {failure then failure, success(ev_table_msg) then | ||
| 97 | - if (Maybe(HK_Edit_View_Table))from_Message(ev_table_msg) is {failure then failure, success(ev_table) then | 95 | + // [type = HK_Edit_View_Table] edit_view_table_form.form_table |
| 96 | + if find_message(_hk_edit_view_message, "form_table") is {failure then failure, success(form_table_msg) then | ||
| 97 | + if (Maybe(HK_Edit_View_Table))from_Message(form_table_msg) is {failure then failure, success(form_table) then | ||
| 98 | 98 | ||
| 99 | - success(edit_view_table_form(view_name, ev_table)) | 99 | + success(edit_view_table_form(view_name, form_table)) |
| 100 | }}} | 100 | }}} |
| 101 | else | 101 | else |
| 102 | failure //No valid Alternative found ! | 102 | failure //No valid Alternative found ! |
model/types/hk_edit_view_cell.anubis deleted
| 1 | -/* | ||
| 2 | - * Created by 伝作 (Densaku). | ||
| 3 | - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | ||
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | ||
| 6 | - * | ||
| 7 | - */ | ||
| 8 | - | ||
| 9 | -transmit system/muscle.anubis | ||
| 10 | -transmit system/convert.anubis | ||
| 11 | -transmit tools/basis.anubis | ||
| 12 | - | ||
| 13 | - | ||
| 14 | -public type HK_Edit_View_Cell: | ||
| 15 | - ev_cell( | ||
| 16 | - String column_name | ||
| 17 | - ) | ||
| 18 | -. | ||
| 19 | - | ||
| 20 | - HK_Edit_View_Cell message format | ||
| 21 | - ================================ | ||
| 22 | - | ||
| 23 | - | ||
| 24 | -public define Message | ||
| 25 | - to_Message | ||
| 26 | - ( | ||
| 27 | - HK_Edit_View_Cell _hk_edit_view_cell | ||
| 28 | - )= | ||
| 29 | - with _hk_edit_view_cell_message = message((Word32)0), // | ||
| 30 | - forget(add_string(_hk_edit_view_cell_message, "__TYPE__", "HK_Edit_View_Cell")); | ||
| 31 | - if _hk_edit_view_cell is | ||
| 32 | - { | ||
| 33 | - //Alternative ev_cell | ||
| 34 | - ev_cell(_column_name) then | ||
| 35 | - forget(add_string(_hk_edit_view_cell_message, "__TYPE_ALT__", "ev_cell")); | ||
| 36 | - // [type = String] ev_cell.column_name | ||
| 37 | - forget(add_string(_hk_edit_view_cell_message, "column_name", _column_name)), | ||
| 38 | - | ||
| 39 | - }; | ||
| 40 | - _hk_edit_view_cell_message | ||
| 41 | -. | ||
| 42 | - | ||
| 43 | -public define Maybe(HK_Edit_View_Cell) | ||
| 44 | - from_Message | ||
| 45 | - ( | ||
| 46 | - Message _hk_edit_view_cell_message | ||
| 47 | - )= | ||
| 48 | - if find_string(_hk_edit_view_cell_message, "__TYPE__") is {failure then failure, success(__type__) then | ||
| 49 | - if find_string(_hk_edit_view_cell_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | ||
| 50 | - if __type__ = "HK_Edit_View_Cell" then | ||
| 51 | - //Alternative ev_cell | ||
| 52 | - if __type_alt__ = "ev_cell" then //Alternative ev_cell | ||
| 53 | - // [type = String] ev_cell.column_name | ||
| 54 | - if find_string(_hk_edit_view_cell_message, "column_name") is {failure then failure, success(column_name) then | ||
| 55 | - | ||
| 56 | - success(ev_cell(column_name)) | ||
| 57 | - } | ||
| 58 | - else | ||
| 59 | - failure //No valid Alternative found ! | ||
| 60 | - else | ||
| 61 | - failure //Type not found in message ! | ||
| 62 | - }} | ||
| 63 | -. | ||
| 64 | - |
model/types/hk_edit_view_line.anubis deleted
| 1 | -/* | ||
| 2 | - * Created by 伝作 (Densaku). | ||
| 3 | - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | ||
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | ||
| 6 | - * | ||
| 7 | - */ | ||
| 8 | - | ||
| 9 | -transmit system/muscle.anubis | ||
| 10 | -transmit system/convert.anubis | ||
| 11 | -transmit tools/basis.anubis | ||
| 12 | - | ||
| 13 | -transmit hayamiki_lib/model/types/hk_edit_view_cell.anubis | ||
| 14 | - | ||
| 15 | -public type HK_Edit_View_Line: | ||
| 16 | - ev_line( | ||
| 17 | - List(HK_Edit_View_Cell) ev_cells | ||
| 18 | - ) | ||
| 19 | -. | ||
| 20 | - | ||
| 21 | - HK_Edit_View_Line message format | ||
| 22 | - ================================ | ||
| 23 | - | ||
| 24 | - | ||
| 25 | -public define Message | ||
| 26 | - to_Message | ||
| 27 | - ( | ||
| 28 | - HK_Edit_View_Line _hk_edit_view_line | ||
| 29 | - )= | ||
| 30 | - with _hk_edit_view_line_message = message((Word32)0), // | ||
| 31 | - forget(add_string(_hk_edit_view_line_message, "__TYPE__", "HK_Edit_View_Line")); | ||
| 32 | - if _hk_edit_view_line is | ||
| 33 | - { | ||
| 34 | - //Alternative ev_line | ||
| 35 | - ev_line(__ev_cells) then | ||
| 36 | - forget(add_string(_hk_edit_view_line_message, "__TYPE_ALT__", "ev_line")); | ||
| 37 | - // [type = List(HK_Edit_View_Cell)] ev_line.ev_cells | ||
| 38 | - map_forget((HK_Edit_View_Cell _ev_cells) |-> add_message(_hk_edit_view_line_message, "ev_cells", to_Message(_ev_cells)), __ev_cells), | ||
| 39 | - | ||
| 40 | - }; | ||
| 41 | - _hk_edit_view_line_message | ||
| 42 | -. | ||
| 43 | - | ||
| 44 | -public define Maybe(HK_Edit_View_Line) | ||
| 45 | - from_Message | ||
| 46 | - ( | ||
| 47 | - Message _hk_edit_view_line_message | ||
| 48 | - )= | ||
| 49 | - if find_string(_hk_edit_view_line_message, "__TYPE__") is {failure then failure, success(__type__) then | ||
| 50 | - if find_string(_hk_edit_view_line_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | ||
| 51 | - if __type__ = "HK_Edit_View_Line" then | ||
| 52 | - //Alternative ev_line | ||
| 53 | - if __type_alt__ = "ev_line" then //Alternative ev_line | ||
| 54 | - // [type = List(HK_Edit_View_Cell)] ev_line.ev_cells | ||
| 55 | - with mb_ev_cells = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Cell)) from_Message(msg), find_messages(_hk_edit_view_line_message, "ev_cells")), | ||
| 56 | - if mb_ev_cells is {failure then failure, success(ev_cells) then | ||
| 57 | - | ||
| 58 | - success(ev_line(ev_cells)) | ||
| 59 | - } | ||
| 60 | - else | ||
| 61 | - failure //No valid Alternative found ! | ||
| 62 | - else | ||
| 63 | - failure //Type not found in message ! | ||
| 64 | - }} | ||
| 65 | -. | ||
| 66 | - |
model/types/hk_edit_view_table.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| @@ -10,11 +10,11 @@ transmit system/muscle.anubis | @@ -10,11 +10,11 @@ transmit system/muscle.anubis | ||
| 10 | transmit system/convert.anubis | 10 | transmit system/convert.anubis |
| 11 | transmit tools/basis.anubis | 11 | transmit tools/basis.anubis |
| 12 | 12 | ||
| 13 | -transmit hayamiki_lib/model/types/hk_edit_view_line.anubis | 13 | +transmit hayamiki_lib/model/types/hk_edit_view_table_line.anubis |
| 14 | 14 | ||
| 15 | public type HK_Edit_View_Table: | 15 | public type HK_Edit_View_Table: |
| 16 | - ev_table( | ||
| 17 | - List(HK_Edit_View_Line) ev_lines | 16 | + table( |
| 17 | + List(HK_Edit_View_Table_Line) lines | ||
| 18 | ) | 18 | ) |
| 19 | . | 19 | . |
| 20 | 20 | ||
| @@ -31,11 +31,11 @@ public define Message | @@ -31,11 +31,11 @@ public define Message | ||
| 31 | forget(add_string(_hk_edit_view_table_message, "__TYPE__", "HK_Edit_View_Table")); | 31 | forget(add_string(_hk_edit_view_table_message, "__TYPE__", "HK_Edit_View_Table")); |
| 32 | if _hk_edit_view_table is | 32 | if _hk_edit_view_table is |
| 33 | { | 33 | { |
| 34 | - //Alternative ev_table | ||
| 35 | - ev_table(__ev_lines) then | ||
| 36 | - forget(add_string(_hk_edit_view_table_message, "__TYPE_ALT__", "ev_table")); | ||
| 37 | - // [type = List(HK_Edit_View_Line)] ev_table.ev_lines | ||
| 38 | - map_forget((HK_Edit_View_Line _ev_lines) |-> add_message(_hk_edit_view_table_message, "ev_lines", to_Message(_ev_lines)), __ev_lines), | 34 | + //Alternative table |
| 35 | + table(__lines) then | ||
| 36 | + forget(add_string(_hk_edit_view_table_message, "__TYPE_ALT__", "table")); | ||
| 37 | + // [type = List(HK_Edit_View_Table_Line)] table.lines | ||
| 38 | + map_forget((HK_Edit_View_Table_Line _lines) |-> add_message(_hk_edit_view_table_message, "lines", to_Message(_lines)), __lines), | ||
| 39 | 39 | ||
| 40 | }; | 40 | }; |
| 41 | _hk_edit_view_table_message | 41 | _hk_edit_view_table_message |
| @@ -49,13 +49,13 @@ public define Maybe(HK_Edit_View_Table) | @@ -49,13 +49,13 @@ public define Maybe(HK_Edit_View_Table) | ||
| 49 | if find_string(_hk_edit_view_table_message, "__TYPE__") is {failure then failure, success(__type__) then | 49 | if find_string(_hk_edit_view_table_message, "__TYPE__") is {failure then failure, success(__type__) then |
| 50 | if find_string(_hk_edit_view_table_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | 50 | if find_string(_hk_edit_view_table_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then |
| 51 | if __type__ = "HK_Edit_View_Table" then | 51 | if __type__ = "HK_Edit_View_Table" then |
| 52 | - //Alternative ev_table | ||
| 53 | - if __type_alt__ = "ev_table" then //Alternative ev_table | ||
| 54 | - // [type = List(HK_Edit_View_Line)] ev_table.ev_lines | ||
| 55 | - with mb_ev_lines = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Line)) from_Message(msg), find_messages(_hk_edit_view_table_message, "ev_lines")), | ||
| 56 | - if mb_ev_lines is {failure then failure, success(ev_lines) then | 52 | + //Alternative table |
| 53 | + if __type_alt__ = "table" then //Alternative table | ||
| 54 | + // [type = List(HK_Edit_View_Table_Line)] table.lines | ||
| 55 | + with mb_lines = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Table_Line)) from_Message(msg), find_messages(_hk_edit_view_table_message, "lines")), | ||
| 56 | + if mb_lines is {failure then failure, success(lines) then | ||
| 57 | 57 | ||
| 58 | - success(ev_table(ev_lines)) | 58 | + success(table(lines)) |
| 59 | } | 59 | } |
| 60 | else | 60 | else |
| 61 | failure //No valid Alternative found ! | 61 | failure //No valid Alternative found ! |
| 1 | +/* | ||
| 2 | + * Created by 伝作 (Densaku). | ||
| 3 | + * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | ||
| 4 | + * Date: 2017-04-04 | ||
| 5 | + * Time: 01:16:47 | ||
| 6 | + * | ||
| 7 | + */ | ||
| 8 | + | ||
| 9 | +transmit system/muscle.anubis | ||
| 10 | +transmit system/convert.anubis | ||
| 11 | +transmit tools/basis.anubis | ||
| 12 | + | ||
| 13 | + | ||
| 14 | +public type HK_Edit_View_Table_Cell: | ||
| 15 | + cell( | ||
| 16 | + String column_name | ||
| 17 | + ) | ||
| 18 | +. | ||
| 19 | + | ||
| 20 | + HK_Edit_View_Table_Cell message format | ||
| 21 | + ====================================== | ||
| 22 | + | ||
| 23 | + | ||
| 24 | +public define Message | ||
| 25 | + to_Message | ||
| 26 | + ( | ||
| 27 | + HK_Edit_View_Table_Cell _hk_edit_view_table_cell | ||
| 28 | + )= | ||
| 29 | + with _hk_edit_view_table_cell_message = message((Word32)0), // | ||
| 30 | + forget(add_string(_hk_edit_view_table_cell_message, "__TYPE__", "HK_Edit_View_Table_Cell")); | ||
| 31 | + if _hk_edit_view_table_cell is | ||
| 32 | + { | ||
| 33 | + //Alternative cell | ||
| 34 | + cell(_column_name) then | ||
| 35 | + forget(add_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__", "cell")); | ||
| 36 | + // [type = String] cell.column_name | ||
| 37 | + forget(add_string(_hk_edit_view_table_cell_message, "column_name", _column_name)), | ||
| 38 | + | ||
| 39 | + }; | ||
| 40 | + _hk_edit_view_table_cell_message | ||
| 41 | +. | ||
| 42 | + | ||
| 43 | +public define Maybe(HK_Edit_View_Table_Cell) | ||
| 44 | + from_Message | ||
| 45 | + ( | ||
| 46 | + Message _hk_edit_view_table_cell_message | ||
| 47 | + )= | ||
| 48 | + if find_string(_hk_edit_view_table_cell_message, "__TYPE__") is {failure then failure, success(__type__) then | ||
| 49 | + if find_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | ||
| 50 | + if __type__ = "HK_Edit_View_Table_Cell" then | ||
| 51 | + //Alternative cell | ||
| 52 | + if __type_alt__ = "cell" then //Alternative cell | ||
| 53 | + // [type = String] cell.column_name | ||
| 54 | + if find_string(_hk_edit_view_table_cell_message, "column_name") is {failure then failure, success(column_name) then | ||
| 55 | + | ||
| 56 | + success(cell(column_name)) | ||
| 57 | + } | ||
| 58 | + else | ||
| 59 | + failure //No valid Alternative found ! | ||
| 60 | + else | ||
| 61 | + failure //Type not found in message ! | ||
| 62 | + }} | ||
| 63 | +. | ||
| 64 | + |
| 1 | +/* | ||
| 2 | + * Created by 伝作 (Densaku). | ||
| 3 | + * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | ||
| 4 | + * Date: 2017-04-04 | ||
| 5 | + * Time: 01:16:47 | ||
| 6 | + * | ||
| 7 | + */ | ||
| 8 | + | ||
| 9 | +transmit system/muscle.anubis | ||
| 10 | +transmit system/convert.anubis | ||
| 11 | +transmit tools/basis.anubis | ||
| 12 | + | ||
| 13 | +transmit hayamiki_lib/model/types/hk_edit_view_table_cell.anubis | ||
| 14 | + | ||
| 15 | +public type HK_Edit_View_Table_Line: | ||
| 16 | + line( | ||
| 17 | + List(HK_Edit_View_Table_Cell) cells | ||
| 18 | + ) | ||
| 19 | +. | ||
| 20 | + | ||
| 21 | + HK_Edit_View_Table_Line message format | ||
| 22 | + ====================================== | ||
| 23 | + | ||
| 24 | + | ||
| 25 | +public define Message | ||
| 26 | + to_Message | ||
| 27 | + ( | ||
| 28 | + HK_Edit_View_Table_Line _hk_edit_view_table_line | ||
| 29 | + )= | ||
| 30 | + with _hk_edit_view_table_line_message = message((Word32)0), // | ||
| 31 | + forget(add_string(_hk_edit_view_table_line_message, "__TYPE__", "HK_Edit_View_Table_Line")); | ||
| 32 | + if _hk_edit_view_table_line is | ||
| 33 | + { | ||
| 34 | + //Alternative line | ||
| 35 | + line(__cells) then | ||
| 36 | + forget(add_string(_hk_edit_view_table_line_message, "__TYPE_ALT__", "line")); | ||
| 37 | + // [type = List(HK_Edit_View_Table_Cell)] line.cells | ||
| 38 | + map_forget((HK_Edit_View_Table_Cell _cells) |-> add_message(_hk_edit_view_table_line_message, "cells", to_Message(_cells)), __cells), | ||
| 39 | + | ||
| 40 | + }; | ||
| 41 | + _hk_edit_view_table_line_message | ||
| 42 | +. | ||
| 43 | + | ||
| 44 | +public define Maybe(HK_Edit_View_Table_Line) | ||
| 45 | + from_Message | ||
| 46 | + ( | ||
| 47 | + Message _hk_edit_view_table_line_message | ||
| 48 | + )= | ||
| 49 | + if find_string(_hk_edit_view_table_line_message, "__TYPE__") is {failure then failure, success(__type__) then | ||
| 50 | + if find_string(_hk_edit_view_table_line_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | ||
| 51 | + if __type__ = "HK_Edit_View_Table_Line" then | ||
| 52 | + //Alternative line | ||
| 53 | + if __type_alt__ = "line" then //Alternative line | ||
| 54 | + // [type = List(HK_Edit_View_Table_Cell)] line.cells | ||
| 55 | + with mb_cells = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Table_Cell)) from_Message(msg), find_messages(_hk_edit_view_table_line_message, "cells")), | ||
| 56 | + if mb_cells is {failure then failure, success(cells) then | ||
| 57 | + | ||
| 58 | + success(line(cells)) | ||
| 59 | + } | ||
| 60 | + else | ||
| 61 | + failure //No valid Alternative found ! | ||
| 62 | + else | ||
| 63 | + failure //Type not found in message ! | ||
| 64 | + }} | ||
| 65 | +. | ||
| 66 | + |
model/types/hk_fk_view.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_help_text.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_icon.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_int_choice.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_int_choices.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_list_view.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_model.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_model_attr.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_model_column.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_model_field.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_table.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_text_choice.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_text_choices.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
model/types/hk_text_field_attr.anubis
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | 4 | + * Date: 2017-04-04 |
| 5 | + * Time: 01:16:47 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 |
| 1 | +/* | ||
| 2 | + * Created by PyramIDE. | ||
| 3 | + * User: Totoro | ||
| 4 | + * Date: 15/11/2011 | ||
| 5 | + * Time: 20:32 | ||
| 6 | + */ | ||
| 7 | + | ||
| 8 | +read calexium_lib/web/CXM_making_a_web_site.anubis | ||
| 9 | +transmit calexium_lib/web/CXM_common.anubis | ||
| 10 | +read hayamiki_lib/types/hayamiki.anubis | ||
| 11 | +read hayamiki_lib/view/types/hk_form_table.anubis | ||
| 12 | + | ||
| 13 | +//public type VT_edit_selector: | ||
| 14 | +// vt_edit_selector((SQLite3DataBase db, HK_Referer referer, String filter) -> List((List(CoreAttrs), WebArgValue, String)) get). | ||
| 15 | +// | ||
| 16 | +// | ||
| 17 | +//public type VT_edit_entry: | ||
| 18 | +// hidden (String name, String value), | ||
| 19 | +// label (String s_name), | ||
| 20 | +// primary_key (String idx), | ||
| 21 | +// information (String s_name, String c_name, String v_name, Int width, HK_Help_Text help), //s_name = show_name for translation, v_name = string to show | ||
| 22 | +// text (String s_name, String c_name, String value, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name | ||
| 23 | +// password (String s_name, String c_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name | ||
| 24 | +// foreign_text(String s_name, String c_name, DB_id selected, VT_edit_selector selector, HK_Help_Text help), | ||
| 25 | +// choices_text(String s_name, String c_name, String selected, VT_edit_selector selector, HK_Help_Text help), | ||
| 26 | +// text_area (String s_name, String c_name, String value, HK_Text_Field_Attr area_att, HK_Help_Text help), //s_name = show_name for translate, c_name = table column name | ||
| 27 | +// boolean (String s_name, String c_name, Bool value, HK_Help_Text help), | ||
| 28 | +// integer (String s_name, String c_name, Int value, HK_Help_Text help), | ||
| 29 | +// float (String s_name, String c_name, Float value, HK_Help_Text help), | ||
| 30 | +// choices_int (String s_name, String c_name, Int selected, VT_edit_selector selector, HK_Help_Text help), | ||
| 31 | +// date (String s_name, String c_name, String value, HK_Help_Text help), | ||
| 32 | +// time (String s_name, String c_name, String value, HK_Help_Text help), | ||
| 33 | +// datetime (String s_name, String c_name, String value, HK_Help_Text help), | ||
| 34 | +// color (String s_name, String c_name, String value, HK_Help_Text help) | ||
| 35 | +//. | ||
| 36 | + | ||
| 37 | +//public define VT_edit_entry text (String s_name, String c_name, String value) = text(s_name, c_name, value, no_help_text). | ||
| 38 | +//public define VT_edit_entry foreign_text(String s_name, String c_name, DB_id selected, VT_edit_selector selector) = foreign_text(s_name, c_name, selected, selector, no_help_text). | ||
| 39 | +//public define VT_edit_entry text_area (String s_name, String c_name, String value) = text_area(s_name, c_name, value, none, no_help_text). | ||
| 40 | +//public define VT_edit_entry boolean(String s_name, String c_name, Bool value) = boolean(s_name, c_name, value, no_help_text). | ||
| 41 | +//public define VT_edit_entry integer(String s_name, String c_name, Int value) = integer(s_name, c_name, value, no_help_text). | ||
| 42 | +//public define VT_edit_entry float(String s_name, String c_name, Float value) = float(s_name, c_name, value, no_help_text). | ||
| 43 | +//public define VT_edit_entry information(String s_name, String c_name, String v_name, HK_Help_Text help) = information(s_name, c_name, v_name, 0, help). | ||
| 44 | + | ||
| 45 | + | ||
| 46 | +public type HK_Form_Tab: //HK_V_Edit_Tab: | ||
| 47 | + hk_ve_form_tab(String fk_table_name, String fk_col_name, String list_view_name) | ||
| 48 | +. | ||
| 49 | + | ||
| 50 | +public type HK_Form: //VT_edit: | ||
| 51 | + hk_form_in_list (String table_name, String view_name, List(HK_Form_Entry) list, List(HK_Form_Tab) tabs), | ||
| 52 | + hk_form_in_table(String table_name, String view_name, HK_Form_Table ve_table) | ||
| 53 | +. | ||
| 54 | + | ||
| 55 | + | ||
| 56 | +public type VT_view_model_entry: | ||
| 57 | + //hidden (String name, String value), | ||
| 58 | + primary_key , | ||
| 59 | + information (String label, String column_name, Int width, HK_Help_Text help), //s_name = show_name for translation, v_name = string to show | ||
| 60 | + text (String label, String column_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name | ||
| 61 | + password (String label, String column_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name | ||
| 62 | + foreign_text(String label, String column_name, HK_Form_Selector selector, HK_Help_Text help), | ||
| 63 | + choices_text(String label, String column_name, HK_Form_Selector selector, HK_Help_Text help), | ||
| 64 | + text_area (String label, String column_name, HK_Help_Text help), //s_name = show_name for translate, c_name = table column name | ||
| 65 | + boolean (String label, String column_name, HK_Help_Text help), | ||
| 66 | + integer (String label, String column_name, HK_Help_Text help), | ||
| 67 | + float (String label, String column_name, HK_Help_Text help), | ||
| 68 | + choices_int (String label, String column_name, HK_Form_Selector selector, HK_Help_Text help), | ||
| 69 | + date (String label, String column_name, HK_Help_Text help), | ||
| 70 | + time (String label, String column_name, HK_Help_Text help), | ||
| 71 | + datetime (String label, String column_name, HK_Help_Text help), | ||
| 72 | + color (String label, String column_name, HK_Help_Text help). | ||
| 73 | + | ||
| 74 | + | ||
| 75 | +public type VT_view_model: | ||
| 76 | + vt_view_model(List(VT_view_model_entry) list). | ||
| 77 | + | ||
| 78 | +public type VT_view_entry: | ||
| 79 | + text(String text), | ||
| 80 | + link(String id, String text), | ||
| 81 | + link_id_action(String id, String text, WEB_Action_Name link_id_action), | ||
| 82 | + icon(String icon_path). | ||
| 83 | + | ||
| 84 | +public type VT_view_row_header: | ||
| 85 | + vt_view_row_header(List(VT_view_entry) list). | ||
| 86 | + | ||
| 87 | +public type VT_view_row: | ||
| 88 | + vt_view_row(Int db_id, List(VT_view_entry) list). | ||
| 89 | + | ||
| 90 | +public type VT_View_DB_Calls: | ||
| 91 | + vt_view_db_calls( | ||
| 92 | + (SQLite3DataBase db, String clause) -> Int get_count, | ||
| 93 | + (SQLite3DataBase db, HK_Referer referer, String clause) -> JsonMember get_rows_json | ||
| 94 | +// (SQLite3DataBase db, String clause) -> List(VT_view_row) get_rows | ||
| 95 | + ) | ||
| 96 | +. | ||
| 97 | + | ||
| 98 | +public type VT_view: | ||
| 99 | + vt_view(String table_name, String view_name, VT_view_model view_model, VT_view_row_header header, VT_View_DB_Calls db_calls). | ||
| 100 | + | ||
| 101 | + | ||
| 102 | +public type HK_Form_action: | ||
| 103 | + new_entry, | ||
| 104 | + edit_entry(String idx). | ||
| 105 | + | ||
| 106 | +public define String default_select = "--------------------". //20 dash | ||
| 107 | +public define (List(CoreAttrs),WebArgValue,String) selector_default_entry = ([], wav("none"),default_select). |
| 1 | +/* | ||
| 2 | + * Created by PyramIDE. | ||
| 3 | + * User: フランスのトトロ aka (David RENÉ) | ||
| 4 | + * Date: 04/04/2017 | ||
| 5 | + * Time: 00:22 | ||
| 6 | + * © Calexium | ||
| 7 | + */ | ||
| 8 | + | ||
| 9 | + | ||
| 10 | +read calexium_lib/web/CXM_making_a_web_site.anubis | ||
| 11 | +transmit calexium_lib/web/CXM_common.anubis | ||
| 12 | +read hayamiki_lib/types/hayamiki.anubis | ||
| 13 | + | ||
| 14 | + | ||
| 15 | +public type HK_Form_Selector: | ||
| 16 | + hk_form_selector((SQLite3DataBase db, HK_Referer referer, String filter) -> List((List(CoreAttrs), WebArgValue, String)) get). | ||
| 17 | + | ||
| 18 | + | ||
| 19 | +public type HK_Form_Entry: //legacy VT_Edit | ||
| 20 | + hidden (String name, String value), | ||
| 21 | + label (String s_name), | ||
| 22 | + primary_key (String idx), | ||
| 23 | + information (String s_name, String c_name, String v_name, Int width, HK_Help_Text help), //s_name = show_name for translation, v_name = string to show | ||
| 24 | + text (String s_name, String c_name, String value, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name | ||
| 25 | + password (String s_name, String c_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name | ||
| 26 | + foreign_text(String s_name, String c_name, DB_id selected, HK_Form_Selector selector, HK_Help_Text help), | ||
| 27 | + choices_text(String s_name, String c_name, String selected, HK_Form_Selector selector, HK_Help_Text help), | ||
| 28 | + text_area (String s_name, String c_name, String value, HK_Text_Field_Attr area_att, HK_Help_Text help), //s_name = show_name for translate, c_name = table column name | ||
| 29 | + boolean (String s_name, String c_name, Bool value, HK_Help_Text help), | ||
| 30 | + integer (String s_name, String c_name, Int value, HK_Help_Text help), | ||
| 31 | + float (String s_name, String c_name, Float value, HK_Help_Text help), | ||
| 32 | + choices_int (String s_name, String c_name, Int selected, HK_Form_Selector selector, HK_Help_Text help), | ||
| 33 | + date (String s_name, String c_name, String value, HK_Help_Text help), | ||
| 34 | + time (String s_name, String c_name, String value, HK_Help_Text help), | ||
| 35 | + datetime (String s_name, String c_name, String value, HK_Help_Text help), | ||
| 36 | + color (String s_name, String c_name, String value, HK_Help_Text help) | ||
| 37 | +. | ||
| 38 | + | ||
| 39 | +public define HK_Form_Entry text (String s_name, String c_name, String value) = text (s_name, c_name, value, no_help_text). | ||
| 40 | +public define HK_Form_Entry foreign_text(String s_name, String c_name, DB_id selected, HK_Form_Selector selector) = foreign_text(s_name, c_name, selected, selector, no_help_text). | ||
| 41 | +public define HK_Form_Entry text_area (String s_name, String c_name, String value) = text_area (s_name, c_name, value, none, no_help_text). | ||
| 42 | +public define HK_Form_Entry boolean (String s_name, String c_name, Bool value) = boolean (s_name, c_name, value, no_help_text). | ||
| 43 | +public define HK_Form_Entry integer (String s_name, String c_name, Int value) = integer (s_name, c_name, value, no_help_text). | ||
| 44 | +public define HK_Form_Entry float (String s_name, String c_name, Float value) = float (s_name, c_name, value, no_help_text). | ||
| 45 | +public define HK_Form_Entry information (String s_name, String c_name, String v_name, HK_Help_Text help) = information(s_name, c_name, v_name, 0, help). |
| 1 | +/* | ||
| 2 | + * Created by 伝作 (Densaku). | ||
| 3 | + * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | ||
| 4 | + * Date: 2017-04-04 | ||
| 5 | + * Time: 01:16:47 | ||
| 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_line.anubis | ||
| 14 | + | ||
| 15 | +public type HK_Form_Table: | ||
| 16 | + hk_form_table( | ||
| 17 | + List(HK_Form_Table_Line) form_lines | ||
| 18 | + ) | ||
| 19 | +. | ||
| 20 | + | ||
| 21 | + HK_Form_Table message format | ||
| 22 | + ============================ | ||
| 23 | + | ||
| 24 | + | ||
| 25 | +public define Message | ||
| 26 | + to_Message | ||
| 27 | + ( | ||
| 28 | + HK_Form_Table _hk_form_table | ||
| 29 | + )= | ||
| 30 | + with _hk_form_table_message = message((Word32)0), // | ||
| 31 | + forget(add_string(_hk_form_table_message, "__TYPE__", "HK_Form_Table")); | ||
| 32 | + if _hk_form_table is | ||
| 33 | + { | ||
| 34 | + //Alternative hk_form_table | ||
| 35 | + hk_form_table(__form_lines) then | ||
| 36 | + forget(add_string(_hk_form_table_message, "__TYPE_ALT__", "hk_form_table")); | ||
| 37 | + // [type = List(HK_Form_Table_Line)] hk_form_table.form_lines | ||
| 38 | + map_forget((HK_Form_Table_Line _form_lines) |-> add_message(_hk_form_table_message, "form_lines", to_Message(_form_lines)), __form_lines), | ||
| 39 | + | ||
| 40 | + }; | ||
| 41 | + _hk_form_table_message | ||
| 42 | +. | ||
| 43 | + | ||
| 44 | +public define Maybe(HK_Form_Table) | ||
| 45 | + from_Message | ||
| 46 | + ( | ||
| 47 | + Message _hk_form_table_message | ||
| 48 | + )= | ||
| 49 | + if find_string(_hk_form_table_message, "__TYPE__") is {failure then failure, success(__type__) then | ||
| 50 | + if find_string(_hk_form_table_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | ||
| 51 | + if __type__ = "HK_Form_Table" then | ||
| 52 | + //Alternative hk_form_table | ||
| 53 | + if __type_alt__ = "hk_form_table" then //Alternative hk_form_table | ||
| 54 | + // [type = List(HK_Form_Table_Line)] hk_form_table.form_lines | ||
| 55 | + with mb_form_lines = map_escape(( Message msg ) |-> (Maybe(HK_Form_Table_Line)) from_Message(msg), find_messages(_hk_form_table_message, "form_lines")), | ||
| 56 | + if mb_form_lines is {failure then failure, success(form_lines) then | ||
| 57 | + | ||
| 58 | + success(hk_form_table(form_lines)) | ||
| 59 | + } | ||
| 60 | + else | ||
| 61 | + failure //No valid Alternative found ! | ||
| 62 | + else | ||
| 63 | + failure //Type not found in message ! | ||
| 64 | + }} | ||
| 65 | +. | ||
| 66 | + |
| 1 | +/* | ||
| 2 | + * Created by 伝作 (Densaku). | ||
| 3 | + * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | ||
| 4 | + * Date: 2017-04-04 | ||
| 5 | + * Time: 01:16:47 | ||
| 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 | +public type HK_Form_Table_Cell: | ||
| 16 | + hk_form_table_cell( | ||
| 17 | + HK_Form_Entry form_entry | ||
| 18 | + ) | ||
| 19 | +. | ||
| 20 | + | ||
| 21 | + HK_Form_Table_Cell message format | ||
| 22 | + ================================= | ||
| 23 | + | ||
| 24 | + | ||
| 25 | +public define Message | ||
| 26 | + to_Message | ||
| 27 | + ( | ||
| 28 | + HK_Form_Table_Cell _hk_form_table_cell | ||
| 29 | + )= | ||
| 30 | + with _hk_form_table_cell_message = message((Word32)0), // | ||
| 31 | + forget(add_string(_hk_form_table_cell_message, "__TYPE__", "HK_Form_Table_Cell")); | ||
| 32 | + if _hk_form_table_cell is | ||
| 33 | + { | ||
| 34 | + //Alternative hk_form_table_cell | ||
| 35 | + hk_form_table_cell(_form_entry) then | ||
| 36 | + forget(add_string(_hk_form_table_cell_message, "__TYPE_ALT__", "hk_form_table_cell")); | ||
| 37 | + // [type = HK_Form_Entry] hk_form_table_cell.form_entry | ||
| 38 | + forget(add_message(_hk_form_table_cell_message, "form_entry", to_Message(_form_entry))), | ||
| 39 | + | ||
| 40 | + }; | ||
| 41 | + _hk_form_table_cell_message | ||
| 42 | +. | ||
| 43 | + | ||
| 44 | +public define Maybe(HK_Form_Table_Cell) | ||
| 45 | + from_Message | ||
| 46 | + ( | ||
| 47 | + Message _hk_form_table_cell_message | ||
| 48 | + )= | ||
| 49 | + if find_string(_hk_form_table_cell_message, "__TYPE__") is {failure then failure, success(__type__) then | ||
| 50 | + if find_string(_hk_form_table_cell_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | ||
| 51 | + if __type__ = "HK_Form_Table_Cell" then | ||
| 52 | + //Alternative hk_form_table_cell | ||
| 53 | + if __type_alt__ = "hk_form_table_cell" then //Alternative hk_form_table_cell | ||
| 54 | + // [type = HK_Form_Entry] hk_form_table_cell.form_entry | ||
| 55 | + if find_message(_hk_form_table_cell_message, "form_entry") is {failure then failure, success(form_entry_msg) then | ||
| 56 | + if (Maybe(HK_Form_Entry))from_Message(form_entry_msg) is {failure then failure, success(form_entry) then | ||
| 57 | + | ||
| 58 | + success(hk_form_table_cell(form_entry)) | ||
| 59 | + }} | ||
| 60 | + else | ||
| 61 | + failure //No valid Alternative found ! | ||
| 62 | + else | ||
| 63 | + failure //Type not found in message ! | ||
| 64 | + }} | ||
| 65 | +. | ||
| 66 | + |
| 1 | +/* | ||
| 2 | + * Created by 伝作 (Densaku). | ||
| 3 | + * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | ||
| 4 | + * Date: 2017-04-04 | ||
| 5 | + * Time: 01:16:47 | ||
| 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 | +public type HK_Form_Table_Line: | ||
| 16 | + hk_form_table_line( | ||
| 17 | + List(HK_Form_Table_Cell) form_table_cells | ||
| 18 | + ) | ||
| 19 | +. | ||
| 20 | + | ||
| 21 | + HK_Form_Table_Line message format | ||
| 22 | + ================================= | ||
| 23 | + | ||
| 24 | + | ||
| 25 | +public define Message | ||
| 26 | + to_Message | ||
| 27 | + ( | ||
| 28 | + HK_Form_Table_Line _hk_form_table_line | ||
| 29 | + )= | ||
| 30 | + with _hk_form_table_line_message = message((Word32)0), // | ||
| 31 | + forget(add_string(_hk_form_table_line_message, "__TYPE__", "HK_Form_Table_Line")); | ||
| 32 | + if _hk_form_table_line is | ||
| 33 | + { | ||
| 34 | + //Alternative hk_form_table_line | ||
| 35 | + hk_form_table_line(__form_table_cells) then | ||
| 36 | + forget(add_string(_hk_form_table_line_message, "__TYPE_ALT__", "hk_form_table_line")); | ||
| 37 | + // [type = List(HK_Form_Table_Cell)] hk_form_table_line.form_table_cells | ||
| 38 | + map_forget((HK_Form_Table_Cell _form_table_cells) |-> add_message(_hk_form_table_line_message, "form_table_cells", to_Message(_form_table_cells)), __form_table_cells), | ||
| 39 | + | ||
| 40 | + }; | ||
| 41 | + _hk_form_table_line_message | ||
| 42 | +. | ||
| 43 | + | ||
| 44 | +public define Maybe(HK_Form_Table_Line) | ||
| 45 | + from_Message | ||
| 46 | + ( | ||
| 47 | + Message _hk_form_table_line_message | ||
| 48 | + )= | ||
| 49 | + if find_string(_hk_form_table_line_message, "__TYPE__") is {failure then failure, success(__type__) then | ||
| 50 | + if find_string(_hk_form_table_line_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | ||
| 51 | + if __type__ = "HK_Form_Table_Line" then | ||
| 52 | + //Alternative hk_form_table_line | ||
| 53 | + if __type_alt__ = "hk_form_table_line" then //Alternative hk_form_table_line | ||
| 54 | + // [type = List(HK_Form_Table_Cell)] hk_form_table_line.form_table_cells | ||
| 55 | + with mb_form_table_cells = map_escape(( Message msg ) |-> (Maybe(HK_Form_Table_Cell)) from_Message(msg), find_messages(_hk_form_table_line_message, "form_table_cells")), | ||
| 56 | + if mb_form_table_cells is {failure then failure, success(form_table_cells) then | ||
| 57 | + | ||
| 58 | + success(hk_form_table_line(form_table_cells)) | ||
| 59 | + } | ||
| 60 | + else | ||
| 61 | + failure //No valid Alternative found ! | ||
| 62 | + else | ||
| 63 | + failure //Type not found in message ! | ||
| 64 | + }} | ||
| 65 | +. | ||
| 66 | + |
view/types/hk_view_editor_cell.anubis deleted
| 1 | -/* | ||
| 2 | - * Created by 伝作 (Densaku). | ||
| 3 | - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | ||
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | ||
| 6 | - * | ||
| 7 | - */ | ||
| 8 | - | ||
| 9 | -transmit system/muscle.anubis | ||
| 10 | -transmit system/convert.anubis | ||
| 11 | -transmit tools/basis.anubis | ||
| 12 | - | ||
| 13 | -transmit hayamiki_lib/view/view_table_types.anubis | ||
| 14 | - | ||
| 15 | -public type HK_View_Editor_Cell: | ||
| 16 | - ve_cell( | ||
| 17 | - VT_edit_entry edit_entry | ||
| 18 | - ) | ||
| 19 | -. | ||
| 20 | - | ||
| 21 | - HK_View_Editor_Cell message format | ||
| 22 | - ================================== | ||
| 23 | - | ||
| 24 | - | ||
| 25 | -public define Message | ||
| 26 | - to_Message | ||
| 27 | - ( | ||
| 28 | - HK_View_Editor_Cell _hk_view_editor_cell | ||
| 29 | - )= | ||
| 30 | - with _hk_view_editor_cell_message = message((Word32)0), // | ||
| 31 | - forget(add_string(_hk_view_editor_cell_message, "__TYPE__", "HK_View_Editor_Cell")); | ||
| 32 | - if _hk_view_editor_cell is | ||
| 33 | - { | ||
| 34 | - //Alternative ve_cell | ||
| 35 | - ve_cell(_edit_entry) then | ||
| 36 | - forget(add_string(_hk_view_editor_cell_message, "__TYPE_ALT__", "ve_cell")); | ||
| 37 | - // [type = VT_edit_entry] ve_cell.edit_entry | ||
| 38 | - forget(add_message(_hk_view_editor_cell_message, "edit_entry", to_Message(_edit_entry))), | ||
| 39 | - | ||
| 40 | - }; | ||
| 41 | - _hk_view_editor_cell_message | ||
| 42 | -. | ||
| 43 | - | ||
| 44 | -public define Maybe(HK_View_Editor_Cell) | ||
| 45 | - from_Message | ||
| 46 | - ( | ||
| 47 | - Message _hk_view_editor_cell_message | ||
| 48 | - )= | ||
| 49 | - if find_string(_hk_view_editor_cell_message, "__TYPE__") is {failure then failure, success(__type__) then | ||
| 50 | - if find_string(_hk_view_editor_cell_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | ||
| 51 | - if __type__ = "HK_View_Editor_Cell" then | ||
| 52 | - //Alternative ve_cell | ||
| 53 | - if __type_alt__ = "ve_cell" then //Alternative ve_cell | ||
| 54 | - // [type = VT_edit_entry] ve_cell.edit_entry | ||
| 55 | - if find_message(_hk_view_editor_cell_message, "edit_entry") is {failure then failure, success(edit_entry_msg) then | ||
| 56 | - if (Maybe(VT_edit_entry))from_Message(edit_entry_msg) is {failure then failure, success(edit_entry) then | ||
| 57 | - | ||
| 58 | - success(ve_cell(edit_entry)) | ||
| 59 | - }} | ||
| 60 | - else | ||
| 61 | - failure //No valid Alternative found ! | ||
| 62 | - else | ||
| 63 | - failure //Type not found in message ! | ||
| 64 | - }} | ||
| 65 | -. | ||
| 66 | - |
view/types/hk_view_editor_line.anubis deleted
| 1 | -/* | ||
| 2 | - * Created by 伝作 (Densaku). | ||
| 3 | - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | ||
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | ||
| 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_view_editor_cell.anubis | ||
| 14 | - | ||
| 15 | -public type HK_View_Editor_Line: | ||
| 16 | - ve_line( | ||
| 17 | - List(HK_View_Editor_Cell) ve_cells | ||
| 18 | - ) | ||
| 19 | -. | ||
| 20 | - | ||
| 21 | - HK_View_Editor_Line message format | ||
| 22 | - ================================== | ||
| 23 | - | ||
| 24 | - | ||
| 25 | -public define Message | ||
| 26 | - to_Message | ||
| 27 | - ( | ||
| 28 | - HK_View_Editor_Line _hk_view_editor_line | ||
| 29 | - )= | ||
| 30 | - with _hk_view_editor_line_message = message((Word32)0), // | ||
| 31 | - forget(add_string(_hk_view_editor_line_message, "__TYPE__", "HK_View_Editor_Line")); | ||
| 32 | - if _hk_view_editor_line is | ||
| 33 | - { | ||
| 34 | - //Alternative ve_line | ||
| 35 | - ve_line(__ve_cells) then | ||
| 36 | - forget(add_string(_hk_view_editor_line_message, "__TYPE_ALT__", "ve_line")); | ||
| 37 | - // [type = List(HK_View_Editor_Cell)] ve_line.ve_cells | ||
| 38 | - map_forget((HK_View_Editor_Cell _ve_cells) |-> add_message(_hk_view_editor_line_message, "ve_cells", to_Message(_ve_cells)), __ve_cells), | ||
| 39 | - | ||
| 40 | - }; | ||
| 41 | - _hk_view_editor_line_message | ||
| 42 | -. | ||
| 43 | - | ||
| 44 | -public define Maybe(HK_View_Editor_Line) | ||
| 45 | - from_Message | ||
| 46 | - ( | ||
| 47 | - Message _hk_view_editor_line_message | ||
| 48 | - )= | ||
| 49 | - if find_string(_hk_view_editor_line_message, "__TYPE__") is {failure then failure, success(__type__) then | ||
| 50 | - if find_string(_hk_view_editor_line_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | ||
| 51 | - if __type__ = "HK_View_Editor_Line" then | ||
| 52 | - //Alternative ve_line | ||
| 53 | - if __type_alt__ = "ve_line" then //Alternative ve_line | ||
| 54 | - // [type = List(HK_View_Editor_Cell)] ve_line.ve_cells | ||
| 55 | - with mb_ve_cells = map_escape(( Message msg ) |-> (Maybe(HK_View_Editor_Cell)) from_Message(msg), find_messages(_hk_view_editor_line_message, "ve_cells")), | ||
| 56 | - if mb_ve_cells is {failure then failure, success(ve_cells) then | ||
| 57 | - | ||
| 58 | - success(ve_line(ve_cells)) | ||
| 59 | - } | ||
| 60 | - else | ||
| 61 | - failure //No valid Alternative found ! | ||
| 62 | - else | ||
| 63 | - failure //Type not found in message ! | ||
| 64 | - }} | ||
| 65 | -. | ||
| 66 | - |
view/types/hk_view_editor_table.anubis deleted
| 1 | -/* | ||
| 2 | - * Created by 伝作 (Densaku). | ||
| 3 | - * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | ||
| 4 | - * Date: 2017-04-03 | ||
| 5 | - * Time: 23:52:46 | ||
| 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_view_editor_line.anubis | ||
| 14 | - | ||
| 15 | -public type HK_View_Editor_Table: | ||
| 16 | - ve_table( | ||
| 17 | - List(HK_View_Editor_Line) ve_lines | ||
| 18 | - ) | ||
| 19 | -. | ||
| 20 | - | ||
| 21 | - HK_View_Editor_Table message format | ||
| 22 | - =================================== | ||
| 23 | - | ||
| 24 | - | ||
| 25 | -public define Message | ||
| 26 | - to_Message | ||
| 27 | - ( | ||
| 28 | - HK_View_Editor_Table _hk_view_editor_table | ||
| 29 | - )= | ||
| 30 | - with _hk_view_editor_table_message = message((Word32)0), // | ||
| 31 | - forget(add_string(_hk_view_editor_table_message, "__TYPE__", "HK_View_Editor_Table")); | ||
| 32 | - if _hk_view_editor_table is | ||
| 33 | - { | ||
| 34 | - //Alternative ve_table | ||
| 35 | - ve_table(__ve_lines) then | ||
| 36 | - forget(add_string(_hk_view_editor_table_message, "__TYPE_ALT__", "ve_table")); | ||
| 37 | - // [type = List(HK_View_Editor_Line)] ve_table.ve_lines | ||
| 38 | - map_forget((HK_View_Editor_Line _ve_lines) |-> add_message(_hk_view_editor_table_message, "ve_lines", to_Message(_ve_lines)), __ve_lines), | ||
| 39 | - | ||
| 40 | - }; | ||
| 41 | - _hk_view_editor_table_message | ||
| 42 | -. | ||
| 43 | - | ||
| 44 | -public define Maybe(HK_View_Editor_Table) | ||
| 45 | - from_Message | ||
| 46 | - ( | ||
| 47 | - Message _hk_view_editor_table_message | ||
| 48 | - )= | ||
| 49 | - if find_string(_hk_view_editor_table_message, "__TYPE__") is {failure then failure, success(__type__) then | ||
| 50 | - if find_string(_hk_view_editor_table_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then | ||
| 51 | - if __type__ = "HK_View_Editor_Table" then | ||
| 52 | - //Alternative ve_table | ||
| 53 | - if __type_alt__ = "ve_table" then //Alternative ve_table | ||
| 54 | - // [type = List(HK_View_Editor_Line)] ve_table.ve_lines | ||
| 55 | - with mb_ve_lines = map_escape(( Message msg ) |-> (Maybe(HK_View_Editor_Line)) from_Message(msg), find_messages(_hk_view_editor_table_message, "ve_lines")), | ||
| 56 | - if mb_ve_lines is {failure then failure, success(ve_lines) then | ||
| 57 | - | ||
| 58 | - success(ve_table(ve_lines)) | ||
| 59 | - } | ||
| 60 | - else | ||
| 61 | - failure //No valid Alternative found ! | ||
| 62 | - else | ||
| 63 | - failure //Type not found in message ! | ||
| 64 | - }} | ||
| 65 | -. | ||
| 66 | - |
| 1 | +/* | ||
| 2 | + * Created by PyramIDE. | ||
| 3 | + * User: フランスのトトロ aka (David RENÉ) | ||
| 4 | + * Date: 03/04/2017 | ||
| 5 | + * Time: 21:26 | ||
| 6 | + * © Calexium | ||
| 7 | + */ | ||
| 8 | + | ||
| 9 | +read calexium_lib/web/CXM_making_a_web_site.anubis | ||
| 10 | +read calexium_lib/web/CXM_form.anubis | ||
| 11 | +read hayamiki_lib/view/view_table_manager_types.anubis | ||
| 12 | +read hayamiki_lib/view/view_table_manager.anubis | ||
| 13 | +read hayamiki_lib/types/hayamiki.anubis | ||
| 14 | + | ||
| 15 | +public define Maybe(HTML_Partial_Content) | ||
| 16 | + view_editor_content | ||
| 17 | + ( | ||
| 18 | + SQLite3DataBase db, | ||
| 19 | + (String) -> String _T, | ||
| 20 | + String lang, | ||
| 21 | + String web_site_directory, | ||
| 22 | + List(Web_arg) lwa, | ||
| 23 | + String table, //table name | ||
| 24 | + String view_name, //view name to use | ||
| 25 | + VT_action action, //new_entry or edit an existing record | ||
| 26 | + VTM vtm, | ||
| 27 | + String clause, | ||
| 28 | + String fk_clause, | ||
| 29 | + HK_Referer referer | ||
| 30 | + ) = | ||
| 31 | + if vtm_get_edit(table, vtm.edit_list) is | ||
| 32 | + { | ||
| 33 | + failure then failure, | ||
| 34 | + success(vtm_e) then | ||
| 35 | + since vtm_e is vtm_edit(_, get_edit), | ||
| 36 | + success(edit_table_form(db, _T, lang, web_site_directory, lwa, get_edit(db, action, view_name), vtm, clause, fk_clause, referer)) | ||
| 37 | + }. |
view/view_table_types.anubis deleted
| 1 | -/* | ||
| 2 | - * Created by PyramIDE. | ||
| 3 | - * User: Totoro | ||
| 4 | - * Date: 15/11/2011 | ||
| 5 | - * Time: 20:32 | ||
| 6 | - */ | ||
| 7 | - | ||
| 8 | -read calexium_lib/web/CXM_making_a_web_site.anubis | ||
| 9 | -transmit calexium_lib/web/CXM_common.anubis | ||
| 10 | -read hayamiki_lib/types/hayamiki.anubis | ||
| 11 | - | ||
| 12 | -public type VT_edit_selector: | ||
| 13 | - vt_edit_selector((SQLite3DataBase db, HK_Referer referer, String filter) -> List((List(CoreAttrs), WebArgValue, String)) get). | ||
| 14 | - | ||
| 15 | - | ||
| 16 | -public type VT_edit_entry: | ||
| 17 | - hidden (String name, String value), | ||
| 18 | - label (String s_name), | ||
| 19 | - primary_key (String idx), | ||
| 20 | - information (String s_name, String c_name, String v_name, Int width, HK_Help_Text help), //s_name = show_name for translation, v_name = string to show | ||
| 21 | - text (String s_name, String c_name, String value, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name | ||
| 22 | - password (String s_name, String c_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name | ||
| 23 | - foreign_text(String s_name, String c_name, DB_id selected, VT_edit_selector selector, HK_Help_Text help), | ||
| 24 | - choices_text(String s_name, String c_name, String selected, VT_edit_selector selector, HK_Help_Text help), | ||
| 25 | - text_area (String s_name, String c_name, String value, HK_Text_Field_Attr area_att, HK_Help_Text help), //s_name = show_name for translate, c_name = table column name | ||
| 26 | - boolean (String s_name, String c_name, Bool value, HK_Help_Text help), | ||
| 27 | - integer (String s_name, String c_name, Int value, HK_Help_Text help), | ||
| 28 | - float (String s_name, String c_name, Float value, HK_Help_Text help), | ||
| 29 | - choices_int (String s_name, String c_name, Int selected, VT_edit_selector selector, HK_Help_Text help), | ||
| 30 | - date (String s_name, String c_name, String value, HK_Help_Text help), | ||
| 31 | - time (String s_name, String c_name, String value, HK_Help_Text help), | ||
| 32 | - datetime (String s_name, String c_name, String value, HK_Help_Text help), | ||
| 33 | - color (String s_name, String c_name, String value, HK_Help_Text help) | ||
| 34 | -. | ||
| 35 | - | ||
| 36 | -public define VT_edit_entry text (String s_name, String c_name, String value) = text(s_name, c_name, value, no_help_text). | ||
| 37 | -public define VT_edit_entry foreign_text(String s_name, String c_name, DB_id selected, VT_edit_selector selector) = foreign_text(s_name, c_name, selected, selector, no_help_text). | ||
| 38 | -public define VT_edit_entry text_area (String s_name, String c_name, String value) = text_area(s_name, c_name, value, none, no_help_text). | ||
| 39 | -public define VT_edit_entry boolean(String s_name, String c_name, Bool value) = boolean(s_name, c_name, value, no_help_text). | ||
| 40 | -public define VT_edit_entry integer(String s_name, String c_name, Int value) = integer(s_name, c_name, value, no_help_text). | ||
| 41 | -public define VT_edit_entry float(String s_name, String c_name, Float value) = float(s_name, c_name, value, no_help_text). | ||
| 42 | -public define VT_edit_entry information(String s_name, String c_name, String v_name, HK_Help_Text help) = information(s_name, c_name, v_name, 0, help). | ||
| 43 | - | ||
| 44 | - | ||
| 45 | -public type HK_V_Edit_Tab: | ||
| 46 | - hk_v_edit_tab(String fk_table_name, String fk_col_name, String list_view_name) | ||
| 47 | -. | ||
| 48 | - | ||
| 49 | -public type VT_edit: | ||
| 50 | - vt_edit_list_form(String table_name, String view_name, List(VT_edit_entry) list, List(HK_V_Edit_Tab) tabs), | ||
| 51 | - vt_edit_table_form(String table_name, String view_name, | ||
| 52 | - | ||
| 53 | - | ||
| 54 | -public type VT_view_model_entry: | ||
| 55 | - //hidden (String name, String value), | ||
| 56 | - primary_key , | ||
| 57 | - information (String label, String column_name, Int width, HK_Help_Text help), //s_name = show_name for translation, v_name = string to show | ||
| 58 | - text (String label, String column_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name | ||
| 59 | - password (String label, String column_name, HK_Help_Text help), //s_name = show_name for translation, c_name = table column name | ||
| 60 | - foreign_text(String label, String column_name, VT_edit_selector selector, HK_Help_Text help), | ||
| 61 | - choices_text(String label, String column_name, VT_edit_selector selector, HK_Help_Text help), | ||
| 62 | - text_area (String label, String column_name, HK_Help_Text help), //s_name = show_name for translate, c_name = table column name | ||
| 63 | - boolean (String label, String column_name, HK_Help_Text help), | ||
| 64 | - integer (String label, String column_name, HK_Help_Text help), | ||
| 65 | - float (String label, String column_name, HK_Help_Text help), | ||
| 66 | - choices_int (String label, String column_name, VT_edit_selector selector, HK_Help_Text help), | ||
| 67 | - date (String label, String column_name, HK_Help_Text help), | ||
| 68 | - time (String label, String column_name, HK_Help_Text help), | ||
| 69 | - datetime (String label, String column_name, HK_Help_Text help), | ||
| 70 | - color (String label, String column_name, HK_Help_Text help). | ||
| 71 | - | ||
| 72 | - | ||
| 73 | -public type VT_view_model: | ||
| 74 | - vt_view_model(List(VT_view_model_entry) list). | ||
| 75 | - | ||
| 76 | -public type VT_view_entry: | ||
| 77 | - text(String text), | ||
| 78 | - link(String id, String text), | ||
| 79 | - link_id_action(String id, String text, WEB_Action_Name link_id_action), | ||
| 80 | - icon(String icon_path). | ||
| 81 | - | ||
| 82 | -public type VT_view_row_header: | ||
| 83 | - vt_view_row_header(List(VT_view_entry) list). | ||
| 84 | - | ||
| 85 | -public type VT_view_row: | ||
| 86 | - vt_view_row(Int db_id, List(VT_view_entry) list). | ||
| 87 | - | ||
| 88 | -public type VT_View_DB_Calls: | ||
| 89 | - vt_view_db_calls( | ||
| 90 | - (SQLite3DataBase db, String clause) -> Int get_count, | ||
| 91 | - (SQLite3DataBase db, HK_Referer referer, String clause) -> JsonMember get_rows_json | ||
| 92 | -// (SQLite3DataBase db, String clause) -> List(VT_view_row) get_rows | ||
| 93 | - ) | ||
| 94 | -. | ||
| 95 | - | ||
| 96 | -public type VT_view: | ||
| 97 | - vt_view(String table_name, String view_name, VT_view_model view_model, VT_view_row_header header, VT_View_DB_Calls db_calls). | ||
| 98 | - | ||
| 99 | - | ||
| 100 | -public type VT_action: | ||
| 101 | - new_entry, | ||
| 102 | - edit_entry(String idx). | ||
| 103 | - | ||
| 104 | -public define String default_select = "--------------------". //20 dash | ||
| 105 | -public define (List(CoreAttrs),WebArgValue,String) selector_default_entry = ([], wav("none"),default_select). |
view/web_action.anubis
| @@ -11,6 +11,7 @@ read calexium_lib/web/CXM_making_a_web_site.anubis | @@ -11,6 +11,7 @@ read calexium_lib/web/CXM_making_a_web_site.anubis | ||
| 11 | here are defined all action managed by Hayamiki Controller | 11 | here are defined all action managed by Hayamiki Controller |
| 12 | 12 | ||
| 13 | public define WEB_Action_Name hkc_edit_table = controller_action("hk_c", "edit_table"). | 13 | public define WEB_Action_Name hkc_edit_table = controller_action("hk_c", "edit_table"). |
| 14 | +public define WEB_Action_Name hkc_view_editor = controller_action("hk_c", "view_editor"). | ||
| 14 | public define WEB_Action_Name hkc_grid_view = controller_action("hk_c", "grid_view"). | 15 | public define WEB_Action_Name hkc_grid_view = controller_action("hk_c", "grid_view"). |
| 15 | public define WEB_Action_Name hkc_grid_action = controller_action("hk_c", "grid_action"). | 16 | public define WEB_Action_Name hkc_grid_action = controller_action("hk_c", "grid_action"). |
| 16 | public define WEB_Action_Name hkc_list_view = controller_action("hk_c", "view_table"). | 17 | public define WEB_Action_Name hkc_list_view = controller_action("hk_c", "view_table"). |