-
Notifications
You must be signed in to change notification settings - Fork 0
/
modals.py
76 lines (54 loc) · 1.88 KB
/
modals.py
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
import epyk as pk
# Create a basic report object
page = pk.Page()
page.headers.dev()
modal_confirm = page.ui.modals.validation(page.ui.title("Are you sure you want to delete it ?"))
modal_confirm.add_title("This is a title")
button1 = page.ui.buttons.remove("Show popup 1")
button1.style.css.margin_left = 10
button1.click([
modal_confirm.dom.show(),
])
modal_confirm = page.ui.modals.acknowledge(page.ui.title("Are you sure you want to delete it ?"))
button2 = page.ui.buttons.remove("Show popup 2")
button2.style.css.margin_left = 10
button2.click([
modal_confirm.dom.show(),
])
modal_popup = page.ui.modals.popup(page.ui.title("Are you sure you want to delete it ?"))
modal_popup.add(page.ui.texts.paragraph('Test'))
button3 = page.ui.buttons.remove("Show popup 3")
button3.style.css.margin_left = 10
button3.click([
modal_popup.dom.show(),
])
modal_error = page.ui.modals.error(page.ui.text("Are you sure you want to delete it ?"))
button4 = page.ui.buttons.remove("Show popup error")
button4.style.css.margin_left = 10
button4.click([
modal_error.dom.show(),
])
modal_info = page.ui.modals.info(page.ui.text("Are you sure you want to delete it ?"))
button5 = page.ui.buttons.remove("Show popup info")
button5.style.css.margin_left = 10
button5.click([
modal_info.dom.show(),
])
modal_success = page.ui.modals.success(page.ui.text("Are you sure you want to delete it ?"))
button6 = page.ui.buttons.large("Show popup Success")
button6.style.css.margin_left = 10
button6.click([
modal_success.dom.show(),
])
input = page.ui.input()
input.style.css.text_align = "left"
modal_loading = page.ui.modals.loading("Loading...", options={"background": False})
input.enter([
modal_loading.build(input.dom.content),
])
button7 = page.ui.buttons.large("Show popup Loading")
button7.style.css.margin_left = 10
button7.click([
modal_loading.build(input.dom.content),
modal_loading.dom.show(),
])