glib-web 0.5.88 → 0.5.89

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: 875516b462088bb42a4558c03d16cf5d0a20abe596495e24e22e74a3ce3ac0f9
4
- data.tar.gz: e376f6649567f474634e3ab0cd8efc47d4dbfbcbebd33ed04a8a8a9c8b8507e6
3
+ metadata.gz: 5fd1d1229a145eac39a14971f7e21e343f8d0296bf2ef6cd53753d489a14b307
4
+ data.tar.gz: '0338d35ba3548e841ad96023f3b6b3af2f7f1eb4e0025797701e604afe8def19'
5
5
  SHA512:
6
- metadata.gz: ca7ba234f9c80cd32a56683dd2427c471697b959b9ba4d8db0fc5da7c486f3485de3db2c7651f7c7ed54a841a0d6e9c8e2409c6668b849cdfec78a39212f36cc
7
- data.tar.gz: 10a059a5a0775f5bb5971eba9907849e8816ad9f952f31e221c2aa6b29bef95f9e0a3d46850fffede1c768e8d38d3499da30937bad492cc783a581c69b625ab2
6
+ metadata.gz: 0b77b94e74eb173a54c8312dfe0979f366bc0bee2452b893eae25fe08d5a312375871e3b420813653a5edd8d92a69bdc299a57fbfe2c246fb9fea125613948b9
7
+ data.tar.gz: 1cfca30d4eb4eb41d90c95ddc80be4e986a90efb5e8b0cf2bbe1b803e790ca909c51299e90afbf321cc8a0f3941f7fad9b4f8f984f90a79485be27c4eaaefba3
@@ -119,6 +119,8 @@ class Glib::JsonUi::ViewBuilder
119
119
  action :onScrollToTop
120
120
  action :onScrollToBottom
121
121
 
122
+ int :floatCols
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,28 @@
1
+
2
+ page_index = params[:page].to_i
3
+ next_page = {
4
+ url: json_ui_garage_url(path: 'lists/autoload_as_needed_float_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, floatCols: params[:floatCols] || 2, firstSection: ->(section) do
25
+ render 'json_ui/garage/lists/autoload_section', page: page, page_index: page_index
26
+ end
27
+
28
+ 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 Float Columns', onClick: ->(action) do
33
+ action.windows_open url: json_ui_garage_url(path: 'lists/autoload_as_needed_float_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.88
4
+ version: 0.5.89
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_float_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