glib-web 0.2.9 → 0.2.10

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
  SHA1:
3
- metadata.gz: 898406e8819d8a7646063d4f020ca4dce7cddb8a
4
- data.tar.gz: 89e45bd8a7f0df8d8cbb6694744e3d45b5cd833b
3
+ metadata.gz: c3adb040610928c28643f3b77533d8801492d903
4
+ data.tar.gz: 480c9264c9cf49e6ef035a298a910e512ee29a52
5
5
  SHA512:
6
- metadata.gz: '000839b48dfc387e3caaf2e249bfece5b05080f5e4a6b94b7b8daf8184d6b9d72cfaf34a3c1065796ba63397c4f1cfae3e6cdc34eb0908fd84b7b434bf339cab'
7
- data.tar.gz: 54321ff743ddfff4bc41f8d50ec1fd9fc7b29e462169c815c3360a76dd35c2e0849b4a254afd16b499826e1d6d9e721ca01a39d2aee94819112cf59b8760a45f
6
+ metadata.gz: 0b0a885853c31a7f21d06abccca26f08d219f56fa70dd276746f3c21cc741a5803f28ca3ee69dfeb837a8e64772d8c008cf4c75990f721a96f39fc2a786ad979
7
+ data.tar.gz: '095bbad9b01f7af4798bd1f813d5b5843af1c58ccd947956ca80982c228de9831e972f503e188c387cfced23459734b732531441529305b3b770218cfcc8d1a2'
@@ -3,10 +3,6 @@ json.title 'Actions'
3
3
  json_ui_page json do |page|
4
4
  render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: true
5
5
 
6
- # page.header padding: { top: 12, bottom: 12, left: 16, right: 16 }, childViews: ->(header) do
7
- # header.label text: "Timestamp: #{DateTime.current.to_i}"
8
- # end
9
-
10
6
  page.list sections: [
11
7
  ->(section) do
12
8
  section.header padding: { top: 12, bottom: 12, left: 16, right: 16 }, childViews: ->(header) do
@@ -51,6 +47,18 @@ json_ui_page json do |page|
51
47
  end
52
48
  end
53
49
  end
50
+
51
+ section.rows builder: ->(template) do
52
+ template.thumbnail title: 'windows/open', onClick: ->(action) do
53
+ action.windows_open url: json_ui_garage_url(path: 'home/blank')
54
+ end
55
+ end
56
+
57
+ section.rows builder: ->(template) do
58
+ template.thumbnail title: 'windows/openWeb', onClick: ->(action) do
59
+ action.windows_openWeb url: 'http://www.google.com'
60
+ end
61
+ end
54
62
  end, ->(section) do
55
63
  section.header padding: { top: 12, bottom: 12, left: 16, right: 16 }, childViews: ->(header) do
56
64
  header.h3 text: 'Reload'
@@ -0,0 +1,9 @@
1
+ json.title 'Menu'
2
+
3
+ json_ui_page json do |page|
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: true
5
+
6
+ page.scroll padding: json_padding_body, childViews: ->(scroll) do
7
+ scroll.label text: 'Blank page'
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ json.title 'Lists'
2
+
3
+ json_ui_page json do |page|
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.header childViews: ->(header) do
7
+ header.fab icon: 'add', onClick: ->(action) { action.dialogs_alert message: 'Perform action' }
8
+ end
9
+
10
+ page.list firstSection: ->(section) do
11
+ render 'json_ui/garage/lists/infinite_scroll_section', json: json, page: 0
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ json.title 'Lists'
2
+
3
+ json_ui_page json do |page|
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ # page.body height: 'matchParent', padding: json_padding_body, childViews: ->(body) do
7
+ page.body childViews: ->(body) do
8
+ body.fab icon: 'add', onClick: ->(action) { action.dialogs_alert message: 'Perform action' }
9
+
10
+ body.panels_list width: 'matchParent', firstSection: ->(section) do
11
+ render 'json_ui/garage/lists/infinite_scroll_section', json: json, page: 0
12
+ end
13
+ end
14
+ end
@@ -14,6 +14,12 @@ json_ui_page json do |page|
14
14
  template.thumbnail title: 'Infinite Scroll', onClick: ->(action) do
15
15
  action.windows_open url: json_ui_garage_url(path: 'lists/infinite_scroll')
16
16
  end
17
+ template.thumbnail title: 'FAB (Floating Action Button) 1', onClick: ->(action) do
18
+ action.windows_open url: json_ui_garage_url(path: 'lists/fab1')
19
+ end
20
+ template.thumbnail title: 'FAB (Floating Action Button) 2', onClick: ->(action) do
21
+ action.windows_open url: json_ui_garage_url(path: 'lists/fab2')
22
+ end
17
23
  end
18
24
 
19
25
  end
@@ -10,7 +10,7 @@ json_ui_page json do |page|
10
10
 
11
11
  section.rows builder: ->(template) do
12
12
  template.thumbnail title: 'Click me', onClick: ->(action) do
13
- action.windows_openWeb url: 'https://www.google.com'
13
+ action.windows_open url: json_ui_garage_url(path: 'home/blank')
14
14
  end
15
15
  template.thumbnail title: 'Item with subtitle', subtitle: 'Item subtitle'
16
16
  template.thumbnail title: 'Item with thumbnail image', subtitle: 'Item subtitle', imageUrl: json_image_standard_url
@@ -3,19 +3,15 @@ json.title 'Pages'
3
3
  json_ui_page json do |page|
4
4
  render "#{@path_prefix}/nav_menu", json: json, page: page
5
5
 
6
- page.header padding: {top: 12, left: 20, right: 20, bottom: 12}, backgroundColor: '#b3bac2', childViews: ->(header) do
6
+ page.header padding: json_padding_body, backgroundColor: '#b3bac2', childViews: ->(header) do
7
7
  header.h1 text: 'Header'
8
8
  end
9
9
 
10
- page.body height: 'matchParent', padding: {top: 15, left: 20, right: 20, bottom: 15}, childViews: ->(body) do
10
+ page.body height: 'matchParent', padding: json_padding_body, childViews: ->(body) do
11
11
  body.button width: 'matchParent', height: 'matchParent', text: 'Full Width/Height'
12
-
13
- # body.panels_scroll width: 'matchParent', height: 'matchParent', padding: {top: 20, left: 20, right: 20, bottom: 20}, childViews: ->(scroll) do
14
- # scroll.button width: 'matchParent', height: 'matchParent', text: 'Full Width/Height'
15
- # end
16
12
  end
17
13
 
18
- page.footer height: 80, padding: {top: 12, left: 20, right: 20, bottom: 12}, backgroundColor: '#b3bac2', childViews: ->(footer) do
14
+ page.footer height: 80, padding: json_padding_body, backgroundColor: '#b3bac2', childViews: ->(footer) do
19
15
  footer.h1 text: 'Footer'
20
16
  end
21
17
  end
@@ -3,15 +3,15 @@ json.title 'Pages'
3
3
  json_ui_page json do |page|
4
4
  render "#{@path_prefix}/nav_menu", json: json, page: page
5
5
 
6
- page.header padding: {top: 12, left: 20, right: 20, bottom: 12}, backgroundColor: '#b3bac2', childViews: ->(header) do
6
+ page.header padding: json_padding_body, backgroundColor: '#b3bac2', childViews: ->(header) do
7
7
  header.h1 text: 'Header'
8
8
  end
9
9
 
10
- page.footer padding: {top: 12, left: 20, right: 20, bottom: 12}, backgroundColor: '#b3bac2', childViews: ->(footer) do
10
+ page.footer padding: json_padding_body, backgroundColor: '#b3bac2', childViews: ->(footer) do
11
11
  footer.h1 text: 'Footer'
12
12
  end
13
13
 
14
- page.scroll padding: {top: 20, left: 20, right: 20, bottom: 20}, childViews: ->(scroll) do
14
+ page.scroll padding: json_padding_body, childViews: ->(scroll) do
15
15
  (1..100).each do |index|
16
16
  scroll.label text: 'Content'
17
17
  end
@@ -8,14 +8,13 @@ json_ui_page json do |page|
8
8
 
9
9
  ['FIRST', 'SECOND', 'THIRD'].each_with_index do |text, index|
10
10
  menu.button text: text, disabled: params[:tab].to_i == index, onClick: ->(action) do
11
- # action.windows_open url: json_ui_garage_url(path: 'pages/tab_bar', tab: index)
12
11
  action.windows_reload url: json_ui_garage_url(path: 'pages/tab_bar', tab: index)
13
12
  end
14
13
  end
15
14
  end
16
15
  end
17
16
 
18
- page.scroll padding: {top: 12, left: 20, right: 20, bottom: 12}, childViews: ->(scroll) do
17
+ page.scroll padding: json_padding_body, childViews: ->(scroll) do
19
18
  scroll.label text: "Tab index #{params[:tab].to_i} selected"
20
19
 
21
20
  scroll.spacer height: 10
@@ -60,5 +60,15 @@ json_ui_page json do |page|
60
60
  panel.button text: '3'
61
61
  end
62
62
 
63
+ scroll.label text: "\n"
64
+ scroll.h1 text: 'Horizontal panel with spacers'
65
+ scroll.panels_horizontal width: 'matchParent', childViews: ->(panel) do
66
+ panel.button text: '1'
67
+ panel.spacer width: 10
68
+ panel.button text: '2'
69
+ panel.spacer width: 50
70
+ panel.button text: '3'
71
+ end
72
+
63
73
  end
64
74
  end
@@ -17,7 +17,7 @@ json_ui_page json do |page|
17
17
  cell.label text: "Data #{item}"
18
18
  cell.label text: "Data #{item}"
19
19
  end, onClick: ->(action) do
20
- action.windows_openWeb url: 'https://www.google.com'
20
+ action.windows_open url: json_ui_garage_url(path: 'home/blank')
21
21
  end
22
22
  end
23
23
  end
@@ -36,5 +36,15 @@ json_ui_page json do |page|
36
36
  panel.button text: 'Right'
37
37
  end
38
38
 
39
+ scroll.label text: "\n"
40
+ scroll.h1 text: 'Vertical panel with spacers'
41
+ scroll.panels_vertical width: 'matchParent', childViews: ->(panel) do
42
+ panel.button text: '1'
43
+ panel.spacer height: 10
44
+ panel.button text: '2'
45
+ panel.spacer height: 50
46
+ panel.button text: '3'
47
+ end
48
+
39
49
  end
40
50
  end
@@ -8,14 +8,14 @@ json_ui_page json do |page|
8
8
  scroll.h2 text: 'Standard button'
9
9
  scroll.spacer height: 6
10
10
  scroll.button text: 'Button', onClick: ->(action) do
11
- action.windows_openWeb url: 'https://www.google.com/'
11
+ action.windows_open url: json_ui_garage_url(path: 'home/blank')
12
12
  end
13
13
 
14
14
  scroll.spacer height: 20
15
15
  scroll.h2 text: 'Button with link style'
16
16
  scroll.spacer height: 6
17
17
  scroll.button text: 'Link', styleClass: 'link', onClick: ->(action) do
18
- action.windows_openWeb url: 'https://www.google.com/'
18
+ action.windows_open url: json_ui_garage_url(path: 'home/blank')
19
19
  end
20
20
 
21
21
  scroll.spacer height: 20
@@ -23,7 +23,7 @@ json_ui_page json do |page|
23
23
  # TODO: Make sure "open in new tab" works
24
24
  scroll.spacer height: 10
25
25
  scroll.avatar url: json_image_avatar_url, styleClass: 'link', onClick: ->(action) do
26
- action.windows_openWeb url: 'https://www.google.com/'
26
+ action.windows_open url: json_ui_garage_url(path: 'home/blank')
27
27
  end
28
28
 
29
29
  scroll.spacer height: 20
@@ -31,7 +31,7 @@ json_ui_page json do |page|
31
31
  # TODO: Make sure "open in new tab" works
32
32
  scroll.spacer height: 10
33
33
  scroll.image width: 100, url: json_image_standard_url, styleClass: 'link', onClick: ->(action) do
34
- action.windows_openWeb url: 'https://www.google.com/'
34
+ action.windows_open url: json_ui_garage_url(path: 'home/blank')
35
35
  end
36
36
 
37
37
 
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.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -66,9 +66,12 @@ files:
66
66
  - app/views/json_ui/garage/forms/submission_indicator.json.jbuilder
67
67
  - app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder
68
68
  - app/views/json_ui/garage/forms/text_validation.json.jbuilder
69
+ - app/views/json_ui/garage/home/blank.json.jbuilder
69
70
  - app/views/json_ui/garage/home/index.json.jbuilder
70
71
  - app/views/json_ui/garage/lists/_infinite_scroll_section.json.jbuilder
71
72
  - app/views/json_ui/garage/lists/edit_actions.json.jbuilder
73
+ - app/views/json_ui/garage/lists/fab1.json.jbuilder
74
+ - app/views/json_ui/garage/lists/fab2.json.jbuilder
72
75
  - app/views/json_ui/garage/lists/index.json.jbuilder
73
76
  - app/views/json_ui/garage/lists/infinite_scroll.json.jbuilder
74
77
  - app/views/json_ui/garage/lists/templating.json.jbuilder