-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProvision.kv
69 lines (62 loc) · 1.56 KB
/
Provision.kv
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
#: import main main
#: import ListItemButton kivy.uix.listview.ListItemButton
#: import ListAdapter kivy.adapters.listadapter.ListAdapter
ProvisionRoot:
<ProvisionRoot>:
GetOrg
<OrgButton>:
on_press: app.root.show_current_org(self.text)
<GetOrg>:
orientation: "vertical"
search_results: search_results_list
BoxLayout:
height: "40dp"
size_hint_y: None
TextInput:
id: search_box
size_hint_x: 50
Button:
text: "Get Org"
size_hint_x: 25
on_release: root.get_org()
Button:
size_hint_x: 25
text: "For Future Use"
ListView:
id: search_results_list
adapter:
ListAdapter(data=[], cls=main.OrgButton)
<show_current_org@BoxLayout>:
inventory:[]
org_id:""
orientation: "vertical"
Label:
text: "Org Menu"
size_hint_y:0.1
BoxLayout:
orientation: "vertical"
size_hint_y: 0.5
Button:
height:"25dp"
background_color: (0.7,0.7,0,1) if self.state == 'normal' else (0,1,0,1)
background_normal: ""
text: "Inventory"
on_release: app.root.show_current_org(root.org_id)
Button:
height:"25dp"
background_color: (0.7,0.7,0,1) if self.state == 'normal' else (0,1,0,1)
background_normal: ""
text: "Claim a Device (enter Serial in Text-Field below)"
on_release: app.root.claimDev(claimdev.text, root.org_id)
TextInput:
size_hint_y: 0.5
id: claimdev
Button:
text: "Exit Current Org"
background_color: (0.7,0.7,0,1) if self.state == 'normal' else (0,1,0,1)
background_normal: ""
on_release: app.root.show_GetOrg()
ListView:
id: inventory_list
adapter:
ListAdapter(data=root.inventory,cls=main.OrgButton)