web_stepper.anubis
2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
* Created by PyramIDE.
* User: フランスのトトロ aka (David RENÉ)
* Date: 23/04/2020
* Time: 19:48
* © David RENÉ
*/
transmit web_session.anubis
transmit xlib/generic/types/stepper.anubis
public type WEB_Step:...
//
//public type Step_status:
// initial,
// valid,
// no_valid.
public define WEB_Action_Name web_stepper_start = controller_action("web_stepper", "start").
public define List((String, String))
stepper_args
(
String uid,
String index,
List((String, String)) extra_args
)=
[("stepper_uid",uid), ("step", index) . extra_args]
.
public define List((String, String))
stepper_args
(
String uid,
String index
)=
stepper_args(uid, index, [])
.
public type Step_View_Status:
invisible,
locked,
selectable
.
public type WEB_Step_Status:
web_step_status(
String step_name,
Int index,
Step_Status status,
Step_View_Status v_status
)
.
public type WEB_Step_Session:
web_step_session(
//List(WEB_Step_Status) web_steps_status,
String current_step,
Session session
)
.
public type WEB_Step:
web_step(
String name, //step name
String full_description,
Int index, //step index
String thread, //thread name like general, VoIP, etc.
List(WEB_Step) childs,
(WEB_Step_Session stp_session) -> WEB_Step_Status status, //return the step status
(WEB_Step_Session stp_session, (String)->String _T) -> HTML_Partial_Content view, //return the view according to WEB_Step_Session
(WEB_Step_Session stp_session, (String)->String _T) -> HTML_Partial_Content buttons,
(WEB_Step_Session stp_session, WEB_Session web_session) -> WEB_Step_Session submit,
)
.
public type WEB_Stepper:
web_stepper(
String name, //name of the stepper
String uid, //uid of the stepper (currently same as name)
WEB_Action_Name web_controller,
(WEB_Session web_session) -> WEB_Step_Session start, //start function to call at very first time
List(WEB_Step) steps //All available steps in stepper
//Step_Session session
)
.