glib-web 0.5.85 → 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: dbc3d54d9b3330ceaf201ca6a3b1fe2a2c773eec342568356e7fa92962c3e3c3
4
- data.tar.gz: 31c246e1afd7ee0a31eae925b3ddf227a7299c05b2b7972f85972768025527c4
3
+ metadata.gz: 5fd1d1229a145eac39a14971f7e21e343f8d0296bf2ef6cd53753d489a14b307
4
+ data.tar.gz: '0338d35ba3548e841ad96023f3b6b3af2f7f1eb4e0025797701e604afe8def19'
5
5
  SHA512:
6
- metadata.gz: 065e4399ffd15e49e072b4c30c71b823d977397f6435ca112a8ad0e5aabf43c2c544e3806d9e93dd572cc7c9a3d2cafa79ec0f5f6d60fb02a075637e36635bf1
7
- data.tar.gz: c55ace7298dd9294d003e5b55b778f8b384a6caf5a5cb69f6a0496e2ac59771e1f4a362777d4d4c48a3b0d9269920be2e8d6cd908a0b3244dce16a4f5ce4ba69
6
+ metadata.gz: 0b77b94e74eb173a54c8312dfe0979f366bc0bee2452b893eae25fe08d5a312375871e3b420813653a5edd8d92a69bdc299a57fbfe2c246fb9fea125613948b9
7
+ data.tar.gz: 1cfca30d4eb4eb41d90c95ddc80be4e986a90efb5e8b0cf2bbe1b803e790ca909c51299e90afbf321cc8a0f3941f7fad9b4f8f984f90a79485be27c4eaaefba3
@@ -1,6 +1,20 @@
1
1
  class Glib::JsonUi::ViewBuilder
2
2
  module Charts
3
+ module ReleaseDateIndicator
4
+ def lineVertical(blocks)
5
+ json.lineVertical do
6
+ blocks.each do |block|
7
+ json.child! do
8
+ block.call
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
14
+
3
15
  class Line < View
16
+ include ReleaseDateIndicator
17
+
4
18
  hash :nextPage
5
19
 
6
20
  def dataSeries(blocks)
@@ -16,6 +30,8 @@ class Glib::JsonUi::ViewBuilder
16
30
  end
17
31
 
18
32
  class Column < View
33
+ include ReleaseDateIndicator
34
+
19
35
  bool :stacked
20
36
 
21
37
  def dataGroups(blocks)
@@ -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
@@ -11,9 +11,19 @@ else
11
11
  json_ui_page json do |page|
12
12
  render "#{@path_prefix}/nav_menu", json: json, page: page
13
13
 
14
- page.scroll padding: {top: 20, left: 20, right: 20, bottom: 20}, childViews: ->(scroll) do
14
+ page.scroll padding: { top: 20, left: 20, right: 20, bottom: 20 }, childViews: ->(scroll) do
15
15
  scroll.h1 text: 'Line chart'
16
- scroll.charts_line dataSeries: [
16
+ scroll.charts_line lineVertical: [
17
+ -> do
18
+ json.text 'A feature released'
19
+ json.x Date.new(2018, 11, 15)
20
+ end,
21
+ -> do
22
+ json.text 'A feature released'
23
+ json.x Date.new(2018, 11, 13)
24
+ end
25
+ ],
26
+ dataSeries: [
17
27
  -> do
18
28
  json.title 'Line 1'
19
29
 
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.85
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