glib-web 0.5.87 → 0.5.91

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31d7bad2518593f28fb55bc6fff0d81b93a52e2f68a4dcff21b01638cbdcee49
4
- data.tar.gz: b1945a0e7f6f1af69b3118acdf00be9ca8f1801c1857a9c44689c41795ea7b10
3
+ metadata.gz: f2abd6daae884c2664769e21a0da207e5c12a40e01abe546596793c70008212d
4
+ data.tar.gz: e593365938ae2139a4a6cab7dfa3316859291004aa52f8c9a6933e8da11a6f85
5
5
  SHA512:
6
- metadata.gz: 6189facdc474b71946746b9ffc597063dc8b55e947954d7a5f879c57875b8c05162009b621bb09b955dd2b4b97ba5e778d524b0348672f0e2d1749428d049d67
7
- data.tar.gz: ff05eb83983d116b75e8f4eef5a775314201ca8aaeff0aa5aeca61b8ddf5cca28361732a7b75a763bddd2796b2d8062972a529a5371b7fc08c362d64fc4a97ae
6
+ metadata.gz: 32bbb20fd74272bdbbaf9117116891cdd424ebf4e6cf7fe550d44480a2030d410f0b25b5710c5e59ff177ba2e99ae61c9e65c8acd9db26c67183feaa52192676
7
+ data.tar.gz: dd2ac365fd5860485ffdcd189126aa3dd38b6db62a7c88d2ba57c92c03fc916e32a6e829697e4a60a611debabd4be3d2421c1af9b7b76542c043df80300e2df8
@@ -119,6 +119,8 @@ class Glib::JsonUi::ViewBuilder
119
119
  action :onScrollToTop
120
120
  action :onScrollToBottom
121
121
 
122
+ int :responsiveCols
123
+
122
124
  def firstSection(block)
123
125
  json.sections [1] do
124
126
  block.call page.list_section_builder
@@ -4,40 +4,58 @@ page = json_ui_page json
4
4
  render "#{@path_prefix}/nav_menu", json: json, page: page
5
5
 
6
6
  page.scroll childViews: ->(scroll) do
7
+ scroll.panels_form \
8
+ url: json_ui_garage_url(path: 'forms/generic_post'),
9
+ method: 'post',
10
+ padding: glib_json_padding_body,
11
+ childViews: ->(form) do
12
+ form.spacer height: 20
13
+ form.h2 text: 'Check Group'
14
+ form.fields_checkGroup \
15
+ name: 'user[skills][]',
16
+ uncheckValue: 1,
17
+ childViews: ->(group) do
18
+ group.fields_check checkValue: 2, label: 'Game Development'
19
+ group.fields_check checkValue: 3, label: 'Web Development'
20
+ group.fields_check checkValue: 4, label: 'Mobile Development'
21
+ end
7
22
 
8
- scroll.panels_form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', padding: glib_json_padding_body, childViews: ->(form) do
9
- form.spacer height: 20
10
- form.h2 text: 'Check Group'
11
- form.fields_checkGroup name: 'user[skills][]', uncheckValue: 1, childViews: ->(group) do
12
- form.fields_check value: 2, label: 'Game Development'
13
- form.fields_check value: 3, label: 'Web Development'
14
- form.fields_check value: 4, label: 'Mobile Development'
15
- end
23
+ form.spacer height: 20
24
+ form.h2 text: 'Rating'
25
+ form.spacer height: 6
26
+ form.fields_radioGroup \
27
+ name: 'user[rating1][]',
28
+ iconOfSelected: 'star',
29
+ iconOfBeforeSelected: 'star',
30
+ iconOfAfterSelected: 'star_border',
31
+ childViews: ->(panel) do
32
+ panel.panels_horizontal childViews: ->(horizontal) do
33
+ horizontal.fields_radio value: 1
34
+ horizontal.fields_radio value: 2
35
+ horizontal.fields_radio value: 3
36
+ horizontal.fields_radio value: 4
37
+ horizontal.fields_radio value: 5
38
+ end
39
+ end
16
40
 
17
- form.spacer height: 20
18
- form.h2 text: 'Rating'
19
- form.spacer height: 6
20
- form.fields_radioGroup name: 'user[rating1][]', iconOfSelected: 'star', iconOfBeforeSelected: 'star', iconOfAfterSelected: 'star_border', childViews: ->(panel) do
21
- panel.panels_horizontal childViews: ->(panel) do
22
- panel.fields_radio value: 1
23
- panel.fields_radio value: 2
24
- panel.fields_radio value: 3
25
- panel.fields_radio value: 4
26
- panel.fields_radio value: 5
27
- end
28
- end
29
- form.fields_radioGroup name: 'user[rating2][]', iconOfSelected: 'star', iconOfBeforeSelected: 'star', iconOfAfterSelected: 'star_border', value: 1, childViews: ->(panel) do
30
- panel.panels_horizontal childViews: ->(panel) do
31
- panel.fields_radio value: 1
32
- panel.fields_radio value: 2
33
- panel.fields_radio value: 3
34
- panel.fields_radio value: 4
35
- panel.fields_radio value: 5
36
- end
37
- end
41
+ form.fields_radioGroup \
42
+ name: 'user[rating2][]',
43
+ iconOfSelected: 'star',
44
+ iconOfBeforeSelected: 'star',
45
+ iconOfAfterSelected: 'star_border',
46
+ value: 1,
47
+ childViews: ->(panel) do
48
+ panel.panels_horizontal childViews: ->(horizontal) do
49
+ horizontal.fields_radio value: 1
50
+ horizontal.fields_radio value: 2
51
+ horizontal.fields_radio value: 3
52
+ horizontal.fields_radio value: 4
53
+ horizontal.fields_radio value: 5
54
+ end
55
+ end
38
56
 
39
- form.spacer height: 20
40
- form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
41
- end
57
+ form.spacer height: 20
58
+ form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
59
+ end
42
60
 
43
61
  end
@@ -0,0 +1,27 @@
1
+
2
+ page_index = params[:page].to_i
3
+ next_page = {
4
+ url: json_ui_garage_url(path: 'lists/autoload_as_needed_responsive_columns', page: page_index + 1, section_only: 'v1'),
5
+ autoload: 'asNeeded'
6
+ }
7
+
8
+ page = json_ui_page json
9
+
10
+ if params[:section_only].present?
11
+ sleep 1
12
+
13
+ json.nextPage next_page if page_index < 3
14
+ json.sections do
15
+ json.child! do
16
+ render 'json_ui/garage/lists/autoload_section', page: page, page_index: page_index
17
+ end
18
+ end
19
+ else
20
+ json.title 'Lists'
21
+
22
+ render "#{@path_prefix}/nav_menu", json: json, page: page
23
+
24
+ page.list nextPage: next_page, responsiveCols: params[:responsiveCols] || 2, firstSection: ->(section) do
25
+ render 'json_ui/garage/lists/autoload_section', page: page, page_index: page_index
26
+ end
27
+ end
@@ -29,6 +29,9 @@ json_ui_page json do |page|
29
29
  template.thumbnail title: 'Autoload All', onClick: ->(action) do
30
30
  action.windows_open url: json_ui_garage_url(path: 'lists/autoload_all')
31
31
  end
32
+ template.thumbnail title: 'Autoload as Needed with Responsive Columns', onClick: ->(action) do
33
+ action.windows_open url: json_ui_garage_url(path: 'lists/autoload_as_needed_responsive_columns')
34
+ end
32
35
  template.thumbnail title: 'Reordering', onClick: ->(action) do
33
36
  action.windows_open url: json_ui_garage_url(path: 'lists/reordering')
34
37
  end
@@ -2,7 +2,7 @@ json.title 'Tables'
2
2
 
3
3
  json_ui_page json do |page|
4
4
  render "#{@path_prefix}/nav_menu", json: json, page: page
5
-
5
+
6
6
  column_indexes = (1..20)
7
7
  page.table firstSection: ->(section) do
8
8
  section.header cellViews: ->(header) do
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.87
4
+ version: 0.5.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -170,6 +170,7 @@ files:
170
170
  - app/views/json_ui/garage/lists/_autoload_section.json.jbuilder
171
171
  - app/views/json_ui/garage/lists/autoload_all.json.jbuilder
172
172
  - app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder
173
+ - app/views/json_ui/garage/lists/autoload_as_needed_responsive_columns.json.jbuilder
173
174
  - app/views/json_ui/garage/lists/chat_ui.json.jbuilder
174
175
  - app/views/json_ui/garage/lists/edit_actions.json.jbuilder
175
176
  - app/views/json_ui/garage/lists/fab.json.jbuilder