glib-web 0.5.70 → 0.5.71
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/glib/json_ui/view_builder.rb +8 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +2 -1
- data/app/helpers/glib/json_ui/view_builder/panels.rb +4 -0
- data/app/views/json_ui/garage/forms/pickers.json.jbuilder +8 -6
- data/app/views/json_ui/garage/forms/selects.json.jbuilder +2 -1
- data/app/views/json_ui/garage/lists/index.json.jbuilder +6 -0
- data/app/views/json_ui/garage/panels/index.json.jbuilder +3 -1
- data/app/views/json_ui/garage/panels/web.json.jbuilder +15 -0
- data/app/views/json_ui/garage/views/controls.json.jbuilder +37 -0
- data/app/views/json_ui/garage/views/index.json.jbuilder +3 -0
- data/app/views/json_ui/garage/views/misc.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/texts.json.jbuilder +0 -9
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63c05f4665c6948216e6fd40af4b8fcc4cfddccec4ab4bda3b8edfd65b3219ce
|
4
|
+
data.tar.gz: b2efc86bb633920c6430482c743139af1c44efeaef12252237a4be0d75556794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc286a18d408ed083904a16cd4c41d85237802f52fd6bbf83be58419687787816327fedac8d471212dbc39d94a65d86d118a045f14de84fbe2ea5677514d3320
|
7
|
+
data.tar.gz: 49c84b472a6c1a2a4d5d87e8a9143b9f873f558de7ee25756ba1ea85e7ea579cda30eaa42b24b3bb7a7867d09e2aee836cdc9e84fef904888b383c7a83d339b2
|
@@ -128,7 +128,7 @@ class Glib::JsonUi::ViewBuilder
|
|
128
128
|
@value = value if value != Glib::Value::DEFAULT
|
129
129
|
end
|
130
130
|
|
131
|
-
# Where possible, use value instead of this
|
131
|
+
# TODO: Remove (deprecated). Where possible, use value instead of this
|
132
132
|
bool :checked
|
133
133
|
end
|
134
134
|
|
@@ -152,6 +152,7 @@ class Glib::JsonUi::ViewBuilder
|
|
152
152
|
hash :append
|
153
153
|
end
|
154
154
|
|
155
|
+
# TODO: Remove (deprecated)
|
155
156
|
class Autocomplete < AbstractField
|
156
157
|
array :options
|
157
158
|
# bool :readOnly
|
@@ -30,12 +30,14 @@ page.form \
|
|
30
30
|
name: 'user[employer]',
|
31
31
|
checkValue: 1,
|
32
32
|
label: 'I am an employer (no default value)'
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
|
34
|
+
# Use `switch` component instead.
|
35
|
+
# form.fields_check \
|
36
|
+
# name: 'user[enabled]',
|
37
|
+
# styleClass: 'switch',
|
38
|
+
# checkValue: true,
|
39
|
+
# label: 'Enable',
|
40
|
+
# value: 'true'
|
39
41
|
|
40
42
|
form.spacer height: 20
|
41
43
|
form.h2 text: 'Date/Time'
|
@@ -71,8 +71,9 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
71
71
|
form.fields_select name: 'user[nil_default]', width: 'matchParent', label: 'Nil Default', options: languages.map { |k, v| { value: k, text: v } }
|
72
72
|
form.fields_select name: 'user[mixed_default][]', width: 'matchParent', label: 'Mixed Default', options: languages.map { |k, v| { value: k, text: v } }, value: ['', 'specified', nil], multiple: true
|
73
73
|
|
74
|
+
# TODO: Remove
|
74
75
|
form.spacer height: 20
|
75
|
-
form.h2 text: 'Autocomplete (select with manual entry)'
|
76
|
+
form.h2 text: 'Autocomplete (select with manual entry) -- DEPRECATED: Confusing UX, promote bad backend design'
|
76
77
|
form.spacer height: 6
|
77
78
|
skills = ['Singing', 'Dancing', 'Fighting']
|
78
79
|
form.fields_autocomplete name: 'user[skill]', width: 'matchParent', label: 'Skill', options: skills, value: 'Singing'
|
@@ -4,6 +4,12 @@ json_ui_page json do |page|
|
|
4
4
|
render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: true
|
5
5
|
|
6
6
|
page.list firstSection: ->(section) do
|
7
|
+
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
8
|
+
header.label text: 'The List panel is useful for displaying a large number of items that are uniform, which is especially important in mobile apps because the rows can be reused for efficiency.'
|
9
|
+
header.spacer height: 6
|
10
|
+
header.label text: 'So, following the mobile-first paradigm, do not ever display large numbers of items using other components.'
|
11
|
+
end
|
12
|
+
|
7
13
|
section.rows builder: ->(template) do
|
8
14
|
template.thumbnail icon: 'list', title: 'Templating', onClick: ->(action) do
|
9
15
|
action.windows_open url: json_ui_garage_url(path: 'lists/templating')
|
@@ -82,7 +82,6 @@ json_ui_page json do |page|
|
|
82
82
|
template.thumbnail title: 'Column', subtitle: 'Adds control over layout inside a responsive panel', onClick: ->(action) do
|
83
83
|
action.windows_open url: json_ui_garage_url(path: 'panels/responsive')
|
84
84
|
end
|
85
|
-
|
86
85
|
end
|
87
86
|
end, ->(section) do
|
88
87
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
@@ -93,6 +92,9 @@ json_ui_page json do |page|
|
|
93
92
|
template.thumbnail title: 'Custom', onClick: ->(action) do
|
94
93
|
action.windows_open url: json_ui_garage_url(path: 'panels/custom')
|
95
94
|
end
|
95
|
+
template.thumbnail title: 'Web', onClick: ->(action) do
|
96
|
+
action.windows_open url: json_ui_garage_url(path: 'panels/web')
|
97
|
+
end
|
96
98
|
|
97
99
|
end
|
98
100
|
end, ->(section) do
|
@@ -0,0 +1,15 @@
|
|
1
|
+
json.title 'Panels'
|
2
|
+
|
3
|
+
page = json_ui_page json
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
+
|
6
|
+
page.header padding: glib_json_padding_body, backgroundColor: '#b3bac2', childViews: ->(header) do
|
7
|
+
header.h1 text: 'Web View'
|
8
|
+
end
|
9
|
+
|
10
|
+
page.body height: 'matchParent', padding: glib_json_padding_body, childViews: ->(body) do
|
11
|
+
body.panels_web \
|
12
|
+
width: 'matchParent',
|
13
|
+
height: 'matchParent',
|
14
|
+
url: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf'
|
15
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
json.title 'Views'
|
2
|
+
|
3
|
+
page = json_ui_page json
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
+
|
6
|
+
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
|
+
scroll.h2 text: 'Button'
|
8
|
+
scroll.spacer height: 6
|
9
|
+
scroll.button text: 'Click me', onClick: ->(action) do
|
10
|
+
action.dialogs_alert message: 'Perform action'
|
11
|
+
end
|
12
|
+
|
13
|
+
scroll.spacer height: 20
|
14
|
+
scroll.h2 text: 'Chip'
|
15
|
+
scroll.spacer height: 6
|
16
|
+
scroll.chip styleClass: 'success', text: 'pending'
|
17
|
+
scroll.spacer height: 6
|
18
|
+
scroll.chip text: 'Skills', onClick: ->(action) do
|
19
|
+
action.dialogs_alert message: 'Perform action'
|
20
|
+
end
|
21
|
+
|
22
|
+
scroll.spacer height: 20
|
23
|
+
scroll.h2 text: 'Switch'
|
24
|
+
scroll.spacer height: 6
|
25
|
+
scroll.switch \
|
26
|
+
text: 'Email notification',
|
27
|
+
onEnabled: ->(action) do
|
28
|
+
action.dialogs_alert message: 'Enabled'
|
29
|
+
end
|
30
|
+
scroll.switch \
|
31
|
+
enabled: true,
|
32
|
+
text: 'Push notification',
|
33
|
+
onDisabled: ->(action) do
|
34
|
+
action.dialogs_alert message: 'Disabled'
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -13,6 +13,9 @@ json_ui_page json do |page|
|
|
13
13
|
template.thumbnail title: 'Texts', onClick: ->(action) do
|
14
14
|
action.windows_open url: json_ui_garage_url(path: 'views/texts')
|
15
15
|
end
|
16
|
+
template.thumbnail title: 'Controls', onClick: ->(action) do
|
17
|
+
action.windows_open url: json_ui_garage_url(path: 'views/controls')
|
18
|
+
end
|
16
19
|
template.thumbnail title: 'Images', onClick: ->(action) do
|
17
20
|
action.windows_open url: json_ui_garage_url(path: 'views/images')
|
18
21
|
end
|
File without changes
|
@@ -32,13 +32,4 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
32
32
|
' comes from a line in section 1.10.32.' + "\n\n" +
|
33
33
|
'The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum"'\
|
34
34
|
' by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.'
|
35
|
-
|
36
|
-
scroll.spacer height: 20
|
37
|
-
scroll.h2 text: 'Chip'
|
38
|
-
scroll.spacer height: 6
|
39
|
-
scroll.chip styleClass: 'success', text: 'pending'
|
40
|
-
scroll.spacer height: 6
|
41
|
-
scroll.chip text: 'Skills', onClick: ->(action) do
|
42
|
-
action.dialogs_alert message: 'Perform action'
|
43
|
-
end
|
44
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glib-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.71
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -198,6 +198,7 @@ files:
|
|
198
198
|
- app/views/json_ui/garage/panels/responsive.json.jbuilder
|
199
199
|
- app/views/json_ui/garage/panels/split.json.jbuilder
|
200
200
|
- app/views/json_ui/garage/panels/vertical.json.jbuilder
|
201
|
+
- app/views/json_ui/garage/panels/web.json.jbuilder
|
201
202
|
- app/views/json_ui/garage/services/dynamic_text.json.jbuilder
|
202
203
|
- app/views/json_ui/garage/services/image.json.jbuilder
|
203
204
|
- app/views/json_ui/garage/services/index.json.jbuilder
|
@@ -212,6 +213,7 @@ files:
|
|
212
213
|
- app/views/json_ui/garage/views/banners.json.jbuilder
|
213
214
|
- app/views/json_ui/garage/views/calendar_data.json.jbuilder
|
214
215
|
- app/views/json_ui/garage/views/charts.json.jbuilder
|
216
|
+
- app/views/json_ui/garage/views/controls.json.jbuilder
|
215
217
|
- app/views/json_ui/garage/views/icon_names.json.jbuilder
|
216
218
|
- app/views/json_ui/garage/views/icons.json.jbuilder
|
217
219
|
- app/views/json_ui/garage/views/images.json.jbuilder
|