Commit 4dc487a75566cef2c111a641967cbac8c8914e57
1 parent
62179ae0
add no_action alternative in web_action_name.anubis
Showing
1 changed file
with
14 additions
and
6 deletions
Show diff stats
web/types/web_action_name.anubis
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | * Created by 伝作 (Densaku). |
| 3 | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | 4 | * Date: 2017-03-15 |
| 5 | - * Time: 02:17:19 | |
| 5 | + * Time: 02:27:54 | |
| 6 | 6 | * |
| 7 | 7 | */ |
| 8 | 8 | |
| ... | ... | @@ -12,17 +12,18 @@ transmit tools/basis.anubis |
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | public type WEB_Action_Name: |
| 15 | + no_action, | |
| 15 | 16 | controller_action( |
| 16 | - String controller, | |
| 17 | - String ac_name | |
| 17 | + String controller, | |
| 18 | + String ac_name | |
| 18 | 19 | ), |
| 19 | 20 | action_name( |
| 20 | - String ac_name | |
| 21 | + String ac_name | |
| 21 | 22 | ), |
| 22 | 23 | //url is raw action, hence we will only copy that url in final link |
| 23 | 24 | |
| 24 | 25 | url( |
| 25 | - String url_name | |
| 26 | + String url_name | |
| 26 | 27 | ) |
| 27 | 28 | . |
| 28 | 29 | |
| ... | ... | @@ -39,6 +40,10 @@ public define Message |
| 39 | 40 | forget(add_string(_web_action_name_message, "__TYPE__", "WEB_Action_Name")); |
| 40 | 41 | if _web_action_name is |
| 41 | 42 | { |
| 43 | + //Alternative no_action (NO TYPE) | |
| 44 | + no_action then | |
| 45 | + forget(add_string(_web_action_name_message, "__TYPE_ALT__", "no_action")), | |
| 46 | + | |
| 42 | 47 | //Alternative controller_action |
| 43 | 48 | controller_action(_controller, _ac_name) then |
| 44 | 49 | forget(add_string(_web_action_name_message, "__TYPE_ALT__", "controller_action")); |
| ... | ... | @@ -72,7 +77,10 @@ public define Maybe(WEB_Action_Name) |
| 72 | 77 | if find_string(_web_action_name_message, "__TYPE__") is {failure then failure, success(__type__) then |
| 73 | 78 | if find_string(_web_action_name_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then |
| 74 | 79 | if __type__ = "WEB_Action_Name" then |
| 75 | - //Alternative controller_action | |
| 80 | + //Alternative no_action (NO TYPE) | |
| 81 | + if __type_alt__ = "no_action" then | |
| 82 | + success(no_action) | |
| 83 | + else //Alternative controller_action | |
| 76 | 84 | if __type_alt__ = "controller_action" then //Alternative controller_action |
| 77 | 85 | // [type = String] controller_action.controller |
| 78 | 86 | if find_string(_web_action_name_message, "controller") is {failure then failure, success(controller) then | ... | ... |