glib-web 0.4.29 → 0.4.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/glib/json/traversal.rb +3 -0
- data/app/helpers/glib/json_ui/view_builder/banners.rb +1 -2
- data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +2 -2
- data/app/views/json_ui/garage/panels/flow.json.jbuilder +49 -0
- data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +3 -3
- data/app/views/json_ui/garage/panels/index.json.jbuilder +3 -0
- data/app/views/json_ui/garage/panels/split.json.jbuilder +1 -1
- data/app/views/json_ui/garage/views/banners.json.jbuilder +17 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2750a8520ebd3ccd30d105d4e0130b7c10ed980
|
4
|
+
data.tar.gz: b6ec55316c97ff855fc8026848eceb05cbe91004
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3b3d01289786edccbab16230ac711238767f09ded6f9523b0936f1e71f4100ce65c5115a13ed2261d718bc8a642299614de4badbaef8c987fbec9d95de0e726
|
7
|
+
data.tar.gz: 9ae23e25a7a6adfd68b117ad221a3d7bceea8d13f78cecae36a5457f7e5f4876640a0faa5b4612236cb9ba9593edceecfccb86d834105d69fb98b8e5ef6c3a87
|
@@ -64,6 +64,9 @@ module Glib::Json::Traversal
|
|
64
64
|
# Generic view children
|
65
65
|
traverse_multiple view['childViews'], block
|
66
66
|
|
67
|
+
# Generic menu buttons
|
68
|
+
traverse_multiple view['buttons'], block
|
69
|
+
|
67
70
|
# Split panel
|
68
71
|
traverse_vertical_content view['left'], block
|
69
72
|
traverse_vertical_content view['center'], block
|
@@ -7,10 +7,10 @@ section.rows builder: ->(template) do
|
|
7
7
|
template.thumbnail title: 'sheets/select', onClick: ->(action) do
|
8
8
|
action.sheets_select message: 'Select one', buttons: ->(menu) do
|
9
9
|
menu.button text: 'Option1', onClick: ->(subaction) do
|
10
|
-
|
10
|
+
subaction.dialogs_alert message: 'Option 1'
|
11
11
|
end
|
12
12
|
menu.button text: 'Option2', onClick: ->(subaction) do
|
13
|
-
|
13
|
+
subaction.dialogs_alert message: 'Option 2'
|
14
14
|
end
|
15
15
|
menu.button text: 'Cancel'
|
16
16
|
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
json.title 'Panels'
|
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.h1 text: 'Basic'
|
8
|
+
scroll.panels_flow width: 300, backgroundColor: '#b3bac2', childViews: ->(panel) do
|
9
|
+
panel.button text: '1'
|
10
|
+
panel.button text: '2'
|
11
|
+
panel.button text: '3'
|
12
|
+
panel.button text: '4'
|
13
|
+
panel.button text: '5'
|
14
|
+
panel.button text: '6'
|
15
|
+
panel.button text: '7'
|
16
|
+
end
|
17
|
+
|
18
|
+
scroll.label text: "\n"
|
19
|
+
scroll.h1 text: 'Spacers'
|
20
|
+
scroll.panels_flow width: 300, backgroundColor: '#b3bac2', childViews: ->(panel) do
|
21
|
+
panel.button text: '1'
|
22
|
+
panel.spacer width: 30
|
23
|
+
panel.button text: '2'
|
24
|
+
panel.spacer width: 30
|
25
|
+
panel.button text: '3'
|
26
|
+
panel.spacer width: 30
|
27
|
+
panel.button text: '4'
|
28
|
+
panel.spacer width: 30
|
29
|
+
panel.button text: '5'
|
30
|
+
end
|
31
|
+
|
32
|
+
# scroll.label text: "\n"
|
33
|
+
# scroll.h1 text: 'Alignments'
|
34
|
+
# scroll.panels_horizontal align: 'top', childViews: ->(panel) do
|
35
|
+
# panel.button height: 50, text: 'Button'
|
36
|
+
# panel.spacer width: 10
|
37
|
+
# panel.label text: 'top'
|
38
|
+
# end
|
39
|
+
# scroll.panels_horizontal align: 'middle', childViews: ->(panel) do
|
40
|
+
# panel.button height: 50, text: 'Button'
|
41
|
+
# panel.spacer width: 10
|
42
|
+
# panel.label text: 'middle'
|
43
|
+
# end
|
44
|
+
# scroll.panels_horizontal align: 'bottom', childViews: ->(panel) do
|
45
|
+
# panel.button height: 50, text: 'Button'
|
46
|
+
# panel.spacer width: 10
|
47
|
+
# panel.label text: 'bottom'
|
48
|
+
# end
|
49
|
+
end
|
@@ -73,17 +73,17 @@ json_ui_page json do |page|
|
|
73
73
|
scroll.label text: "\n"
|
74
74
|
scroll.h1 text: 'Alignments'
|
75
75
|
scroll.panels_horizontal align: 'top', childViews: ->(panel) do
|
76
|
-
panel.button text: 'Button'
|
76
|
+
panel.button height: 50, text: 'Button'
|
77
77
|
panel.spacer width: 10
|
78
78
|
panel.label text: 'top'
|
79
79
|
end
|
80
80
|
scroll.panels_horizontal align: 'middle', childViews: ->(panel) do
|
81
|
-
panel.button text: 'Button'
|
81
|
+
panel.button height: 50, text: 'Button'
|
82
82
|
panel.spacer width: 10
|
83
83
|
panel.label text: 'middle'
|
84
84
|
end
|
85
85
|
scroll.panels_horizontal align: 'bottom', childViews: ->(panel) do
|
86
|
-
panel.button text: 'Button'
|
86
|
+
panel.button height: 50, text: 'Button'
|
87
87
|
panel.spacer width: 10
|
88
88
|
panel.label text: 'bottom'
|
89
89
|
end
|
@@ -18,6 +18,9 @@ json_ui_page json do |page|
|
|
18
18
|
template.thumbnail title: 'Horizontal', subtitle: 'Arrange child components horizontally', onClick: ->(action) do
|
19
19
|
action.windows_open url: json_ui_garage_url(path: 'panels/horizontal')
|
20
20
|
end
|
21
|
+
template.thumbnail title: 'Flow', subtitle: 'Arrange components in a left-to-right flow, much like lines of text in a paragraph', onClick: ->(action) do
|
22
|
+
action.windows_open url: json_ui_garage_url(path: 'panels/flow')
|
23
|
+
end
|
21
24
|
template.thumbnail title: 'Carousel', subtitle: 'Arrange child components horizontally in a carousel', onClick: ->(action) do
|
22
25
|
action.windows_open url: json_ui_garage_url(path: 'panels/carousel')
|
23
26
|
end
|
@@ -104,7 +104,7 @@ json_ui_page json do |page|
|
|
104
104
|
left.button text: 'L'
|
105
105
|
end
|
106
106
|
content.center childViews: ->(center) do
|
107
|
-
center.
|
107
|
+
center.panels_flow width: 'matchParent', backgroundColor: '#b3bac2', childViews: ->(h) do
|
108
108
|
(1..20).each do |index|
|
109
109
|
h.button text: index
|
110
110
|
end
|
@@ -6,15 +6,30 @@ json_ui_page json do |page|
|
|
6
6
|
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
7
|
|
8
8
|
scroll.spacer height: 20
|
9
|
-
scroll.h2 text: '
|
9
|
+
scroll.h2 text: 'Basic'
|
10
10
|
scroll.spacer height: 6
|
11
11
|
scroll.banners_alert width: 'matchParent', icon: 'info', message: 'This is an alert banner'
|
12
12
|
|
13
13
|
scroll.spacer height: 20
|
14
|
-
scroll.h2 text: '
|
14
|
+
scroll.h2 text: 'With color styling'
|
15
15
|
scroll.spacer height: 6
|
16
16
|
scroll.banners_alert width: 'matchParent', icon: 'info', message: 'This is an alert banner', styleClass: 'success'
|
17
17
|
|
18
|
+
scroll.spacer height: 20
|
19
|
+
scroll.h2 text: 'With select options'
|
20
|
+
scroll.spacer height: 6
|
21
|
+
scroll.banners_select width: 'matchParent', icon: 'info', message: 'This is a select banner', buttons: ->(menu) do
|
22
|
+
menu.button text: 'Option1', onClick: ->(action) do
|
23
|
+
action.dialogs_alert message: 'Option 1'
|
24
|
+
end
|
25
|
+
menu.button text: 'Option2', onClick: ->(action) do
|
26
|
+
action.dialogs_alert message: 'Option 2'
|
27
|
+
end
|
28
|
+
menu.button text: 'Option3', onClick: ->(action) do
|
29
|
+
action.dialogs_alert message: 'Option 3'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
18
33
|
scroll.spacer height: 20
|
19
34
|
scroll.h2 text: 'Alert banner with frameless styling (Experimental)'
|
20
35
|
scroll.spacer height: 6
|
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.4.
|
4
|
+
version: 0.4.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -147,6 +147,7 @@ files:
|
|
147
147
|
- app/views/json_ui/garage/panels/card.json.jbuilder
|
148
148
|
- app/views/json_ui/garage/panels/carousel.json.jbuilder
|
149
149
|
- app/views/json_ui/garage/panels/custom.json.jbuilder
|
150
|
+
- app/views/json_ui/garage/panels/flow.json.jbuilder
|
150
151
|
- app/views/json_ui/garage/panels/horizontal.json.jbuilder
|
151
152
|
- app/views/json_ui/garage/panels/index.json.jbuilder
|
152
153
|
- app/views/json_ui/garage/panels/responsive.json.jbuilder
|