glib-web 0.1.0 → 0.1.1
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/page_helper.rb +26 -14
- data/app/views/json_ui/garage/_nav_menu.json.jbuilder +112 -70
- data/app/views/json_ui/garage/actions/index.json.jbuilder +10 -11
- data/app/views/json_ui/garage/forms/basic.json.jbuilder +4 -55
- data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +2 -2
- data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +2 -31
- data/app/views/json_ui/garage/forms/index.json.jbuilder +7 -7
- data/app/views/json_ui/garage/forms/submit_indicator.json.jbuilder +2 -26
- data/app/views/json_ui/garage/home/index.json.jbuilder +9 -9
- data/app/views/json_ui/garage/lists/index.json.jbuilder +5 -27
- data/app/views/json_ui/garage/lists/infinite_scroll.json.jbuilder +17 -10
- data/app/views/json_ui/garage/lists/templating.json.jbuilder +7 -49
- data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +46 -38
- data/app/views/json_ui/garage/pages/index.json.jbuilder +6 -39
- data/app/views/json_ui/garage/pages/layout.json.jbuilder +2 -34
- data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +2 -31
- data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +2 -2
- data/app/views/json_ui/garage/panels/carousel.json.jbuilder +2 -2
- data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +2 -123
- data/app/views/json_ui/garage/panels/index.json.jbuilder +7 -38
- data/app/views/json_ui/garage/panels/split.json.jbuilder +16 -16
- data/app/views/json_ui/garage/panels/vertical.json.jbuilder +2 -93
- data/app/views/json_ui/garage/views/basic.json.jbuilder +2 -20
- data/app/views/json_ui/garage/views/carousels.json.jbuilder +2 -96
- data/app/views/json_ui/garage/views/images.json.jbuilder +2 -55
- data/app/views/json_ui/garage/views/index.json.jbuilder +6 -37
- data/lib/glib/json_crawler/action_crawlers/windows_open.rb +1 -1
- metadata +1 -2
- data/app/helpers/glib/json_ui/json_ui_helper.rb +0 -94
@@ -1,37 +1,8 @@
|
|
1
1
|
json.title 'Pages'
|
2
2
|
|
3
|
-
render "#{@path_prefix}/nav_menu", json: json
|
4
|
-
|
5
|
-
# json.rightNavButtons do
|
6
|
-
# json.child! do
|
7
|
-
# json.icon do
|
8
|
-
# json.materialName 'search'
|
9
|
-
# end
|
10
|
-
# json.onClick do
|
11
|
-
# json.action 'dialogs/alert-v1'
|
12
|
-
# json.message 'Perform some action'
|
13
|
-
# end
|
14
|
-
# end
|
15
|
-
|
16
|
-
# json.child! do
|
17
|
-
# json.icon do
|
18
|
-
# json.materialName 'map'
|
19
|
-
# end
|
20
|
-
# json.onClick do
|
21
|
-
# json.action 'dialogs/alert-v1'
|
22
|
-
# json.message 'Perform some action'
|
23
|
-
# end
|
24
|
-
# end
|
25
|
-
# end
|
26
|
-
|
27
|
-
# json_body_with_scroll json do
|
28
|
-
# json.child! do
|
29
|
-
# json.view 'label-v1'
|
30
|
-
# json.text 'See the right menu buttons on the nav bar'
|
31
|
-
# end
|
32
|
-
# end
|
33
|
-
|
34
3
|
json_ui_page json do |page|
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
+
|
35
6
|
page.rightNavButtons do |menu|
|
36
7
|
menu.button icon: 'search', onClick: ->(action) do
|
37
8
|
action.dialogs_alert message: 'Perform some action'
|
@@ -1,11 +1,11 @@
|
|
1
1
|
json.title 'Panels'
|
2
2
|
|
3
|
-
render "#{@path_prefix}/nav_menu", json: json
|
4
|
-
|
5
3
|
image_url1 = 'http://ichef.bbci.co.uk/news/976/cpsprodpb/18106/production/_97266589_gettyimages-474547165.jpg'
|
6
4
|
image_url2 = 'https://s.abcnews.com/images/International/Guam03-gty-jrl-170809_16x9_992.jpg'
|
7
5
|
|
8
6
|
json_ui_page json do |page|
|
7
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
8
|
+
|
9
9
|
page.scroll childViews: ->(scroll) do
|
10
10
|
scroll.h1 text: 'Carousel panel'
|
11
11
|
scroll.panels_carousel width: 'matchParent', childViews: ->(carousel) do
|
@@ -1,8 +1,8 @@
|
|
1
1
|
json.title 'Panels'
|
2
2
|
|
3
|
-
render "#{@path_prefix}/nav_menu", json: json
|
4
|
-
|
5
3
|
json_ui_page json do |page|
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
+
|
6
6
|
page.scroll childViews: ->(scroll) do
|
7
7
|
scroll.h1 text: 'Horizontal panel'
|
8
8
|
scroll.panels_horizontal backgroundColor: '#b3bac2', childViews: ->(panel) do
|
@@ -62,124 +62,3 @@ json_ui_page json do |page|
|
|
62
62
|
|
63
63
|
end
|
64
64
|
end
|
65
|
-
|
66
|
-
|
67
|
-
# json.child! do
|
68
|
-
# json.view 'label-v1'
|
69
|
-
# json.text "\n"
|
70
|
-
# end
|
71
|
-
# json.child! do
|
72
|
-
# json.view 'h1-v1'
|
73
|
-
# json.text 'Horizontal panel (containing vertical panel)'
|
74
|
-
# end
|
75
|
-
# json.child! do
|
76
|
-
# json.view 'panels/horizontal-v1'
|
77
|
-
# json.subviews do
|
78
|
-
# json.child! do
|
79
|
-
# json.view 'button-v1'
|
80
|
-
# json.text '1'
|
81
|
-
# end
|
82
|
-
|
83
|
-
# json.child! do
|
84
|
-
# json.view 'panels/vertical-v1'
|
85
|
-
# json.subviews do
|
86
|
-
# json.child! do
|
87
|
-
# json.view 'button-v1'
|
88
|
-
# json.text 'A'
|
89
|
-
# end
|
90
|
-
|
91
|
-
# json.child! do
|
92
|
-
# json.view 'button-v1'
|
93
|
-
# json.text 'B'
|
94
|
-
# end
|
95
|
-
# end
|
96
|
-
# end
|
97
|
-
|
98
|
-
# json.child! do
|
99
|
-
# json.view 'button-v1'
|
100
|
-
# json.text '3'
|
101
|
-
# end
|
102
|
-
# end
|
103
|
-
# end
|
104
|
-
|
105
|
-
# json.child! do
|
106
|
-
# json.view 'label-v1'
|
107
|
-
# json.text "\n"
|
108
|
-
# end
|
109
|
-
# json.child! do
|
110
|
-
# json.view 'h1-v1'
|
111
|
-
# json.text 'Horizontal panel with equal filling (containing vertical panel)'
|
112
|
-
# end
|
113
|
-
# json.child! do
|
114
|
-
# json.view 'panels/horizontal-v1'
|
115
|
-
# json.width 'matchParent'
|
116
|
-
# json.distribution 'fillEqually'
|
117
|
-
# json.subviews do
|
118
|
-
# json.child! do
|
119
|
-
# json.view 'button-v1'
|
120
|
-
# json.text '1'
|
121
|
-
# end
|
122
|
-
|
123
|
-
# json.child! do
|
124
|
-
# json.view 'panels/vertical-v1'
|
125
|
-
# json.subviews do
|
126
|
-
# json.child! do
|
127
|
-
# json.view 'button-v1'
|
128
|
-
# json.text 'A'
|
129
|
-
# end
|
130
|
-
|
131
|
-
# json.child! do
|
132
|
-
# json.view 'button-v1'
|
133
|
-
# json.text 'B'
|
134
|
-
# end
|
135
|
-
# end
|
136
|
-
# end
|
137
|
-
|
138
|
-
# json.child! do
|
139
|
-
# json.view 'button-v1'
|
140
|
-
# json.text '3'
|
141
|
-
# end
|
142
|
-
# end
|
143
|
-
# end
|
144
|
-
|
145
|
-
# json.child! do
|
146
|
-
# json.view 'label-v1'
|
147
|
-
# json.text "\n"
|
148
|
-
# end
|
149
|
-
# json.child! do
|
150
|
-
# json.view 'h1-v1'
|
151
|
-
# json.text 'Horizontal panel with equal spacing (containing vertical panel)'
|
152
|
-
# end
|
153
|
-
# json.child! do
|
154
|
-
# json.view 'panels/horizontal-v1'
|
155
|
-
# json.width 'matchParent'
|
156
|
-
# json.distribution 'spaceEqually'
|
157
|
-
# json.subviews do
|
158
|
-
# json.child! do
|
159
|
-
# json.view 'button-v1'
|
160
|
-
# json.text '1'
|
161
|
-
# end
|
162
|
-
|
163
|
-
# json.child! do
|
164
|
-
# json.view 'panels/vertical-v1'
|
165
|
-
# json.subviews do
|
166
|
-
# json.child! do
|
167
|
-
# json.view 'button-v1'
|
168
|
-
# json.text 'A'
|
169
|
-
# end
|
170
|
-
|
171
|
-
# json.child! do
|
172
|
-
# json.view 'button-v1'
|
173
|
-
# json.text 'B'
|
174
|
-
# end
|
175
|
-
# end
|
176
|
-
# end
|
177
|
-
|
178
|
-
# json.child! do
|
179
|
-
# json.view 'button-v1'
|
180
|
-
# json.text '3'
|
181
|
-
# end
|
182
|
-
# end
|
183
|
-
# end
|
184
|
-
|
185
|
-
# end
|
@@ -1,54 +1,23 @@
|
|
1
1
|
json.title 'Panels'
|
2
2
|
|
3
|
-
render "#{@path_prefix}/nav_menu", json: json
|
4
|
-
|
5
3
|
json_ui_page json do |page|
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
+
|
6
6
|
page.list firstSection: ->(section) do
|
7
|
-
section.rows do
|
8
|
-
|
7
|
+
section.rows builder: ->(template) do
|
8
|
+
template.thumbnail title: 'Vertical', onClick: ->(action) do
|
9
9
|
action.windows_open url: json_ui_garage_url(path: 'panels/vertical')
|
10
10
|
end
|
11
|
-
|
11
|
+
template.thumbnail title: 'Horizontal', onClick: ->(action) do
|
12
12
|
action.windows_open url: json_ui_garage_url(path: 'panels/horizontal')
|
13
13
|
end
|
14
|
-
|
14
|
+
template.thumbnail title: 'Split', onClick: ->(action) do
|
15
15
|
action.windows_open url: json_ui_garage_url(path: 'panels/split')
|
16
16
|
end
|
17
|
-
|
17
|
+
template.thumbnail title: 'Carousel', onClick: ->(action) do
|
18
18
|
action.windows_open url: json_ui_garage_url(path: 'panels/carousel')
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
end
|
23
23
|
end
|
24
|
-
|
25
|
-
# json_body_with_list json do
|
26
|
-
# json.rows do
|
27
|
-
# json.child! do
|
28
|
-
# json.template 'thumbnail-v1'
|
29
|
-
# json.title 'Vertical'
|
30
|
-
# json.onClick do
|
31
|
-
# json.action 'windows/open-v1'
|
32
|
-
# json.url json_ui_garage_url(path: 'panels/vertical')
|
33
|
-
# end
|
34
|
-
# end
|
35
|
-
|
36
|
-
# json.child! do
|
37
|
-
# json.template 'thumbnail-v1'
|
38
|
-
# json.title 'Horizontal'
|
39
|
-
# json.onClick do
|
40
|
-
# json.action 'windows/open-v1'
|
41
|
-
# json.url json_ui_garage_url(path: 'panels/horizontal')
|
42
|
-
# end
|
43
|
-
# end
|
44
|
-
|
45
|
-
# json.child! do
|
46
|
-
# json.template 'thumbnail-v1'
|
47
|
-
# json.title 'Split'
|
48
|
-
# json.onClick do
|
49
|
-
# json.action 'windows/open-v1'
|
50
|
-
# json.url json_ui_garage_url(path: 'panels/split')
|
51
|
-
# end
|
52
|
-
# end
|
53
|
-
# end
|
54
|
-
# end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
json.title 'Panels'
|
2
2
|
|
3
|
-
render "#{@path_prefix}/nav_menu", json: json
|
4
|
-
|
5
3
|
json_ui_page json do |page|
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
+
|
6
6
|
page.scroll childViews: ->(scroll) do
|
7
7
|
scroll.h1 text: '2 columns'
|
8
|
-
scroll.panels_split leftViews: ->(panel) do
|
8
|
+
scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
|
9
9
|
panel.button text: '1'
|
10
10
|
end, rightViews: ->(panel) do
|
11
11
|
panel.button text: '2'
|
@@ -13,33 +13,33 @@ json_ui_page json do |page|
|
|
13
13
|
|
14
14
|
scroll.label text: "\n"
|
15
15
|
scroll.h1 text: '3 columns'
|
16
|
-
scroll.panels_split leftViews: ->(panel) do
|
16
|
+
scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
|
17
17
|
panel.button text: '1'
|
18
18
|
end, centerViews: ->(panel) do
|
19
|
-
panel.button text: '2'
|
19
|
+
panel.button width: 'matchParent', text: '2'
|
20
20
|
end, rightViews: ->(panel) do
|
21
21
|
panel.button text: '3'
|
22
22
|
end
|
23
23
|
|
24
24
|
scroll.label text: "\n"
|
25
25
|
scroll.h1 text: 'Expandable left'
|
26
|
-
scroll.panels_split centerViews: ->(panel) do
|
27
|
-
panel.button text: '1'
|
26
|
+
scroll.panels_split width: 'matchParent', centerViews: ->(panel) do
|
27
|
+
panel.button width: 'matchParent', text: '1'
|
28
28
|
end, rightViews: ->(panel) do
|
29
29
|
panel.button text: '2'
|
30
30
|
end
|
31
31
|
|
32
32
|
scroll.label text: "\n"
|
33
33
|
scroll.h1 text: 'Expandable right'
|
34
|
-
scroll.panels_split leftViews: ->(panel) do
|
34
|
+
scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
|
35
35
|
panel.button text: '1'
|
36
36
|
end, centerViews: ->(panel) do
|
37
|
-
panel.button text: '2'
|
37
|
+
panel.button width: 'matchParent', text: '2'
|
38
38
|
end
|
39
39
|
|
40
40
|
scroll.label text: "\n"
|
41
41
|
scroll.h1 text: 'Short center text'
|
42
|
-
scroll.panels_split leftViews: ->(panel) do
|
42
|
+
scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
|
43
43
|
panel.button text: '1'
|
44
44
|
end, centerViews: ->(panel) do
|
45
45
|
panel.label text: 'short'
|
@@ -49,7 +49,7 @@ json_ui_page json do |page|
|
|
49
49
|
|
50
50
|
scroll.label text: "\n"
|
51
51
|
scroll.h1 text: 'Long center text'
|
52
|
-
scroll.panels_split leftViews: ->(panel) do
|
52
|
+
scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
|
53
53
|
panel.button text: '1'
|
54
54
|
end, centerViews: ->(panel) do
|
55
55
|
panel.label text: 'a very very very very very very very very very very very very very very very very very very very very very very very very very very very very long text'
|
@@ -59,7 +59,7 @@ json_ui_page json do |page|
|
|
59
59
|
|
60
60
|
scroll.label text: "\n"
|
61
61
|
scroll.h1 text: 'Few center items'
|
62
|
-
scroll.panels_split leftViews: ->(panel) do
|
62
|
+
scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
|
63
63
|
panel.button text: 'L'
|
64
64
|
end, centerViews: ->(panel) do
|
65
65
|
panel.panels_horizontal childViews: ->(h) do
|
@@ -73,7 +73,7 @@ json_ui_page json do |page|
|
|
73
73
|
|
74
74
|
scroll.label text: "\n"
|
75
75
|
scroll.h1 text: 'Many center items'
|
76
|
-
scroll.panels_split leftViews: ->(panel) do
|
76
|
+
scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
|
77
77
|
panel.button text: 'L'
|
78
78
|
end, centerViews: ->(panel) do
|
79
79
|
panel.panels_horizontal childViews: ->(h) do
|
@@ -87,7 +87,7 @@ json_ui_page json do |page|
|
|
87
87
|
|
88
88
|
scroll.label text: "\n"
|
89
89
|
scroll.h1 text: 'Center filled equally'
|
90
|
-
scroll.panels_split leftViews: ->(panel) do
|
90
|
+
scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
|
91
91
|
panel.button text: 'L'
|
92
92
|
end, centerViews: ->(panel) do
|
93
93
|
panel.panels_horizontal backgroundColor: '#b3bac2', distribution: 'fillEqually', childViews: ->(h) do
|
@@ -101,7 +101,7 @@ json_ui_page json do |page|
|
|
101
101
|
|
102
102
|
scroll.label text: "\n"
|
103
103
|
scroll.h1 text: 'Center spaced equally'
|
104
|
-
scroll.panels_split leftViews: ->(panel) do
|
104
|
+
scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
|
105
105
|
panel.button text: 'L'
|
106
106
|
end, centerViews: ->(panel) do
|
107
107
|
panel.panels_horizontal backgroundColor: '#b3bac2', distribution: 'spaceEqually', childViews: ->(h) do
|
@@ -115,7 +115,7 @@ json_ui_page json do |page|
|
|
115
115
|
|
116
116
|
scroll.label text: "\n"
|
117
117
|
scroll.h1 text: 'Combo 1'
|
118
|
-
scroll.panels_split leftViews: ->(panel) do
|
118
|
+
scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
|
119
119
|
panel.label text: 'a very very very very very very very very very very very very very very very very very very very very very very very very very very very very long text'
|
120
120
|
end, rightViews: ->(panel) do
|
121
121
|
panel.panels_horizontal backgroundColor: '#b3bac2', distribution: 'spaceEqually', childViews: ->(h) do
|
@@ -1,8 +1,8 @@
|
|
1
1
|
json.title 'Panels'
|
2
2
|
|
3
|
-
render "#{@path_prefix}/nav_menu", json: json
|
4
|
-
|
5
3
|
json_ui_page json do |page|
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
+
|
6
6
|
page.scroll childViews: ->(scroll) do
|
7
7
|
scroll.h1 text: 'Vertical Panel'
|
8
8
|
scroll.panels_vertical backgroundColor: '#b3bac2', childViews: ->(panel) do
|
@@ -29,94 +29,3 @@ json_ui_page json do |page|
|
|
29
29
|
|
30
30
|
end
|
31
31
|
end
|
32
|
-
|
33
|
-
# json_body_with_scroll json do
|
34
|
-
# json.child! do
|
35
|
-
# json.view 'h1-v1'
|
36
|
-
# json.text 'Vertical Panel'
|
37
|
-
# end
|
38
|
-
# json.child! do
|
39
|
-
# json.view 'panels/vertical-v1'
|
40
|
-
# json.backgroundColor '#b3bac2'
|
41
|
-
# json.subviews do
|
42
|
-
# json.child! do
|
43
|
-
# json.view 'button-v1'
|
44
|
-
# json.text 'Button1'
|
45
|
-
# end
|
46
|
-
|
47
|
-
# json.child! do
|
48
|
-
# json.view 'button-v1'
|
49
|
-
# json.width 200
|
50
|
-
# json.text 'Button2'
|
51
|
-
# end
|
52
|
-
|
53
|
-
# json.child! do
|
54
|
-
# json.view 'button-v1'
|
55
|
-
# json.width 300
|
56
|
-
# json.text 'Button3'
|
57
|
-
# end
|
58
|
-
# end
|
59
|
-
# end
|
60
|
-
|
61
|
-
# json.child! do
|
62
|
-
# json.view 'label-v1'
|
63
|
-
# json.text "\n"
|
64
|
-
# end
|
65
|
-
# json.child! do
|
66
|
-
# json.view 'h1-v1'
|
67
|
-
# json.text 'Vertical Panel with equal filling'
|
68
|
-
# end
|
69
|
-
# json.child! do
|
70
|
-
# json.view 'panels/vertical-v1'
|
71
|
-
# json.backgroundColor '#b3bac2'
|
72
|
-
# json.distribution 'fillEqually'
|
73
|
-
# json.height 300
|
74
|
-
# json.subviews do
|
75
|
-
# json.child! do
|
76
|
-
# json.view 'button-v1'
|
77
|
-
# json.text 'Button1'
|
78
|
-
# end
|
79
|
-
|
80
|
-
# json.child! do
|
81
|
-
# json.view 'button-v1'
|
82
|
-
# json.text 'Button2'
|
83
|
-
# end
|
84
|
-
|
85
|
-
# json.child! do
|
86
|
-
# json.view 'button-v1'
|
87
|
-
# json.text 'Button3'
|
88
|
-
# end
|
89
|
-
# end
|
90
|
-
# end
|
91
|
-
|
92
|
-
# json.child! do
|
93
|
-
# json.view 'label-v1'
|
94
|
-
# json.text "\n"
|
95
|
-
# end
|
96
|
-
# json.child! do
|
97
|
-
# json.view 'h1-v1'
|
98
|
-
# json.text 'Vertical Panel with equal spacing'
|
99
|
-
# end
|
100
|
-
# json.child! do
|
101
|
-
# json.view 'panels/vertical-v1'
|
102
|
-
# json.backgroundColor '#b3bac2'
|
103
|
-
# json.distribution 'spaceEqually'
|
104
|
-
# json.height 300
|
105
|
-
# json.subviews do
|
106
|
-
# json.child! do
|
107
|
-
# json.view 'button-v1'
|
108
|
-
# json.text 'Button1'
|
109
|
-
# end
|
110
|
-
|
111
|
-
# json.child! do
|
112
|
-
# json.view 'button-v1'
|
113
|
-
# json.text 'Button2'
|
114
|
-
# end
|
115
|
-
|
116
|
-
# json.child! do
|
117
|
-
# json.view 'button-v1'
|
118
|
-
# json.text 'Button3'
|
119
|
-
# end
|
120
|
-
# end
|
121
|
-
# end
|
122
|
-
# end
|