glib-web 0.5.84 → 0.5.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 875516b462088bb42a4558c03d16cf5d0a20abe596495e24e22e74a3ce3ac0f9
|
4
|
+
data.tar.gz: e376f6649567f474634e3ab0cd8efc47d4dbfbcbebd33ed04a8a8a9c8b8507e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca7ba234f9c80cd32a56683dd2427c471697b959b9ba4d8db0fc5da7c486f3485de3db2c7651f7c7ed54a841a0d6e9c8e2409c6668b849cdfec78a39212f36cc
|
7
|
+
data.tar.gz: 10a059a5a0775f5bb5971eba9907849e8816ad9f952f31e221c2aa6b29bef95f9e0a3d46850fffede1c768e8d38d3499da30937bad492cc783a581c69b625ab2
|
@@ -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)
|
@@ -5,8 +5,8 @@ json_ui_page json do |page|
|
|
5
5
|
|
6
6
|
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
7
|
scroll.panels_column lg: { cols: 8 }, childViews: ->(column) do
|
8
|
-
column.h2 text: 'Tab Bar'
|
9
|
-
column.tabBar
|
8
|
+
column.h2 text: 'Tab Bar with Badge'
|
9
|
+
column.tabBar buttons: ->(menu) do
|
10
10
|
{
|
11
11
|
'FIRST' => 'home',
|
12
12
|
'SECOND' => 'schedule',
|
@@ -19,13 +19,21 @@ json_ui_page json do |page|
|
|
19
19
|
badgeColor: [nil, '#272551', '#008000'][index],
|
20
20
|
disabled: params[:tab].to_i == index,
|
21
21
|
onClick: ->(action) do
|
22
|
-
action.windows_reload
|
22
|
+
action.windows_reload \
|
23
|
+
url: json_ui_garage_url(
|
24
|
+
path: 'pages/tab_bar',
|
25
|
+
tab: index,
|
26
|
+
tab_2: params[:tab_2],
|
27
|
+
tab_3: params[:tab_3]
|
28
|
+
)
|
23
29
|
end
|
24
30
|
end
|
25
31
|
end
|
26
32
|
column.spacer height: 10
|
33
|
+
|
27
34
|
column.label text: "Tab index #{params[:tab].to_i} selected"
|
28
35
|
column.spacer height: 10
|
36
|
+
|
29
37
|
10.times do |i|
|
30
38
|
column.label text: "Line #{i + 1}"
|
31
39
|
end
|
@@ -33,32 +41,50 @@ json_ui_page json do |page|
|
|
33
41
|
end
|
34
42
|
|
35
43
|
scroll.panels_column lg: { cols: 8 }, childViews: ->(column) do
|
36
|
-
column.h2 text:
|
44
|
+
column.h2 text: "Tab Bar with 'full-width-divider'"
|
37
45
|
column.tabBar styleClass: 'full-width-divider', buttons: ->(menu) do
|
38
46
|
5.times do |index|
|
39
47
|
menu.button \
|
40
48
|
text: "Tab #{index}",
|
41
|
-
disabled: params[:
|
49
|
+
disabled: params[:tab_2].to_i == index,
|
42
50
|
onClick: ->(action) do
|
43
|
-
action.windows_reload
|
51
|
+
action.windows_reload \
|
52
|
+
url: json_ui_garage_url(
|
53
|
+
path: 'pages/tab_bar',
|
54
|
+
tab: params[:tab],
|
55
|
+
tab_2: index,
|
56
|
+
tab_3: params[:tab_3]
|
57
|
+
)
|
44
58
|
end
|
45
59
|
end
|
46
60
|
end
|
61
|
+
column.spacer height: 10
|
62
|
+
|
63
|
+
column.label text: "Tab-2 index #{params[:tab_2].to_i} selected"
|
47
64
|
column.spacer height: 40
|
48
65
|
end
|
49
66
|
|
50
67
|
scroll.panels_column lg: { cols: 8 }, childViews: ->(column) do
|
51
|
-
column.h2 text:
|
52
|
-
column.tabBar styleClass: 'grow', buttons: ->(menu) do
|
68
|
+
column.h2 text: "Tab Bar 'with no-grow'"
|
69
|
+
column.tabBar styleClass: 'no-grow', buttons: ->(menu) do
|
53
70
|
5.times do |index|
|
54
71
|
menu.button \
|
55
72
|
text: "Tab #{index}",
|
56
|
-
disabled: params[:
|
73
|
+
disabled: params[:tab_3].to_i == index,
|
57
74
|
onClick: ->(action) do
|
58
|
-
action.windows_reload
|
75
|
+
action.windows_reload \
|
76
|
+
url: json_ui_garage_url(
|
77
|
+
path: 'pages/tab_bar',
|
78
|
+
tab: params[:tab],
|
79
|
+
tab_2: params[:tab_2],
|
80
|
+
tab_3: index
|
81
|
+
)
|
59
82
|
end
|
60
83
|
end
|
61
84
|
end
|
85
|
+
column.spacer height: 10
|
86
|
+
|
87
|
+
column.label text: "Tab-3 index #{params[:tab_3].to_i} selected"
|
62
88
|
column.spacer height: 40
|
63
89
|
end
|
64
90
|
end
|
@@ -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
|
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
|
|