glib-web 4.11.2 → 4.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6425e97b504cd239d61b88d1ca636fbb5da75d6ccc9bd72ed75905fb3d3d83f
|
4
|
+
data.tar.gz: a93a58d86b0a593a6b7ba5dd8fd9c0156754273317fd1844e182d1f2984ae61a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 930d634554a8c80295757893b9eb5996d05469906673860ff3dac26705772bd453c52242c2e89ee37fb4e1565900a18c079ef4e86717828a681d6de42b7177d4
|
7
|
+
data.tar.gz: 174d1ec5746418db41d5f419d66147285d772e3f239706593966cbfb802bdb4b5dd855b21758d10ec30b64a898cb4f700cf0904ce880547812167baf29a7cb19
|
@@ -28,67 +28,74 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
28
28
|
template.fields_text width: 'matchParent', name: 'question', label: 'Question', placeholder: 'Question'
|
29
29
|
|
30
30
|
form.panels_responsive id: 'responsive_{{entry_index}}', childViews: ->(column) do
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
31
|
+
options = [:rating, :yes_no, :choices]
|
32
|
+
template.fields_select \
|
33
|
+
width: 'matchParent',
|
34
|
+
name: 'type',
|
35
|
+
label: 'Answer Type',
|
36
|
+
placeholder: 'Answer Type',
|
37
|
+
options: options.map { |o| { text: o.to_s.humanize, value: o } },
|
38
|
+
onChangeAndLoad: ->(action) do
|
39
|
+
action.runMultiple childActions: ->(multiple) do
|
40
|
+
multiple.logics_set \
|
41
|
+
cacheData: true, # This is so that the the new data is retained when the `dynamicGroup` gets re-rendered.
|
42
|
+
debug: true,
|
43
|
+
targetId: 'responsive_{{entry_index}}', dataBuilder: ->(set) do
|
44
|
+
set.panels_responsive width: 'matchParent', accessory: ->(accessory) do
|
45
|
+
accessory.footer childViews: ->(footer) do
|
46
|
+
footer.fields_check \
|
47
|
+
width: 'matchParent',
|
48
|
+
id: 'check_{{entry_index}}',
|
49
|
+
name: 'enabled',
|
50
|
+
label: 'Enable',
|
51
|
+
checkValue: true
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
footer.panels_split width: 'matchParent', content: ->(split) do
|
54
|
+
split.right childViews: ->(right) do
|
55
|
+
right.label text: 'This should be right-aligned'
|
56
|
+
end
|
56
57
|
end
|
57
58
|
end
|
58
59
|
end
|
59
|
-
end
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
60
|
+
end, onSet: ->(subaction) do
|
61
|
+
subaction.logics_set \
|
62
|
+
targetId: 'check_{{entry_index}}',
|
63
|
+
conditionalData: {
|
64
|
+
value: {
|
65
|
+
"==": [{ "var": 'user[evaluation][{{entry_index}}][type]' }, 'rating']
|
66
|
+
}
|
66
67
|
}
|
67
|
-
|
68
|
-
end
|
68
|
+
end
|
69
69
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
70
|
+
multiple.logics_set \
|
71
|
+
targetId: 'choices_panel_{{entry_index}}',
|
72
|
+
debug: true,
|
73
|
+
conditionalData: {
|
74
|
+
displayed: {
|
75
|
+
"==": [{ "var": 'user[evaluation][{{entry_index}}][type]' }, 'choices']
|
76
|
+
}
|
76
77
|
}
|
77
|
-
|
78
|
+
end
|
78
79
|
end
|
79
|
-
end
|
80
80
|
end, accessory: ->(accessory) do
|
81
81
|
accessory.footer childViews: ->(footer) do
|
82
82
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
-
template.panels_vertical id: '
|
86
|
+
template.panels_vertical id: 'choices_panel_{{entry_index}}', childViews: ->(vertical) do
|
87
87
|
(1..5).each do |i|
|
88
88
|
vertical.fields_text \
|
89
|
+
id: "input_choice_{{entry_index}}_#{i}",
|
89
90
|
width: 'matchParent',
|
90
|
-
name: "
|
91
|
-
label: "Choice #{i}"
|
91
|
+
name: "choices_#{i}",
|
92
|
+
label: "Choice #{i}",
|
93
|
+
displayed: i <= 1,
|
94
|
+
onChange: ->(action) do
|
95
|
+
action.logics_set targetId: "input_choice_{{entry_index}}_#{i + 1}", conditionalData: {
|
96
|
+
displayed: { "isPresent": [{ "var": "user[evaluation][{{entry_index}}][choices_#{i}]" }] }
|
97
|
+
}
|
98
|
+
end
|
92
99
|
end
|
93
100
|
end
|
94
101
|
|
@@ -3,14 +3,28 @@ json.title 'Views'
|
|
3
3
|
page = json_ui_page json
|
4
4
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
5
|
|
6
|
-
page.
|
6
|
+
page.form padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
7
|
scroll.h2 text: 'Icon'
|
8
8
|
# scroll.icon spec: { name: 'home' }
|
9
9
|
scroll.icon name: 'home'
|
10
10
|
|
11
11
|
scroll.spacer height: 20
|
12
12
|
scroll.h2 text: 'Icon with color'
|
13
|
-
scroll.
|
13
|
+
scroll.fields_select \
|
14
|
+
name: 'input_icon',
|
15
|
+
value: 'verified',
|
16
|
+
options: ['pending', 'verified', 'cancel'].map { |icon_name| { text: icon_name, value: icon_name } }
|
17
|
+
scroll.button text: 'update', onClick: ->(action) do
|
18
|
+
action.logics_set \
|
19
|
+
targetId: 'icon1',
|
20
|
+
conditionalData: {
|
21
|
+
'material.name': { "var": 'input_icon' }
|
22
|
+
},
|
23
|
+
data: {
|
24
|
+
'tooltip.text': 'TEST123'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
scroll.icon id: 'icon1', name: 'home', color: '#9370DB'
|
14
28
|
scroll.icon name: 'home', color: '#9370DB80'
|
15
29
|
|
16
30
|
scroll.spacer height: 20
|
@@ -19,5 +33,19 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
19
33
|
|
20
34
|
scroll.spacer height: 20
|
21
35
|
scroll.h2 text: 'Icon with styleClasses'
|
22
|
-
scroll.icon name: 'home', styleClasses: ['small']
|
36
|
+
scroll.icon id: 'icon2', name: 'home', styleClasses: ['small']
|
37
|
+
|
38
|
+
scroll.button text: 'Hide icon', onClick: ->(action) do
|
39
|
+
action.logics_set targetId: 'icon2', data: {
|
40
|
+
displayed: false
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
scroll.spacer height: 20
|
45
|
+
scroll.h2 text: 'Icon with onLoad'
|
46
|
+
scroll.icon id: 'icon3', name: 'home', onLoad: ->(action) do
|
47
|
+
action.logics_set targetId: 'icon3', data: {
|
48
|
+
'material.name': 'info'
|
49
|
+
}
|
50
|
+
end
|
23
51
|
end
|