glib-web 3.25.1 → 3.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/glib/home_controller.rb +4 -0
- data/app/helpers/glib/json_ui/action_builder/bottom_banners.rb +14 -0
- data/app/helpers/glib/json_ui/action_builder/global_states.rb +14 -0
- data/app/helpers/glib/json_ui/page_helper.rb +1 -0
- data/app/helpers/glib/json_ui/styling_helper.rb +0 -11
- data/app/helpers/glib/json_ui/view_builder/fields.rb +2 -0
- data/app/helpers/glib/json_ui/view_builder.rb +2 -1
- data/app/views/json_ui/garage/actions/_windows.json.jbuilder +4 -4
- data/app/views/json_ui/garage/multistep_form/step1.json.jbuilder +15 -0
- data/app/views/json_ui/garage/multistep_form/step2.json.jbuilder +13 -0
- data/app/views/json_ui/garage/views/charts.json.jbuilder +25 -7
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8ac2b87b2a72adbd5c302571faea43150d7058c0ff69a93c5a8f3331fc5ce44
|
4
|
+
data.tar.gz: cf37963271e6f7b2653a08b8433ede694de7e3c15c5ffcb8360d1809e7369fce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de93f215305deef0bc19c5b199d5935c2fec9b37dfee551d4a957fa175587ff2ef1efc9cc0e3bfb705410c1efdc6e66156a6e4d10f06b8148028d40e470ff288
|
7
|
+
data.tar.gz: 17a11bab19832cad840d1a95f89adc8617819993c60d2dfd198fa779b06e36005e8ea9b677efa9b7d194384558640fa7539c15502cdf9937ecc8a5d24fd38556
|
@@ -50,17 +50,6 @@ module Glib
|
|
50
50
|
|
51
51
|
###
|
52
52
|
|
53
|
-
### Chart
|
54
|
-
|
55
|
-
def glib_chart_tooltip_template(options)
|
56
|
-
%{
|
57
|
-
<div style="border: 1px solid gray; border-radius: 6px;">
|
58
|
-
<div style="border-radius: 6px 6px 0 0; background-color: gray; padding: 4px; color: white;">#{options[:title]}</div>
|
59
|
-
<div style="border-radius: 0 0 6px 6px; background-color: white; padding: 4px" color: black;>#{options[:content]}</div>
|
60
|
-
</div>
|
61
|
-
}
|
62
|
-
end
|
63
|
-
|
64
53
|
end
|
65
54
|
end
|
66
55
|
end
|
@@ -331,6 +331,8 @@ class Glib::JsonUi::ViewBuilder
|
|
331
331
|
string :uploadTitle
|
332
332
|
string :uploadFailedText # deprecated
|
333
333
|
action :onFinishUpload
|
334
|
+
string :strategy # can be "delegate" or "dropUpload"
|
335
|
+
string :url # http post end point if you don't want to use onFinishUpload
|
334
336
|
|
335
337
|
required :accepts, :directUploadUrl
|
336
338
|
|
@@ -9,16 +9,16 @@ section.rows builder: ->(template) do
|
|
9
9
|
subaction.dialogs_alert message: 'Previous window closed'
|
10
10
|
end
|
11
11
|
end
|
12
|
-
end
|
13
12
|
|
14
|
-
section.rows builder: ->(template) do
|
15
13
|
template.thumbnail title: 'windows/open', onClick: ->(action) do
|
16
14
|
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
17
15
|
end
|
18
|
-
end
|
19
16
|
|
20
|
-
section.rows builder: ->(template) do
|
21
17
|
template.thumbnail title: 'windows/openWeb', onClick: ->(action) do
|
22
18
|
action.windows_openWeb url: 'http://www.google.com'
|
23
19
|
end
|
20
|
+
|
21
|
+
template.thumbnail title: 'multistep form', onClick: ->(action) do
|
22
|
+
action.windows_open url: json_ui_garage_url(path: 'multistep_form/step1')
|
23
|
+
end
|
24
24
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
json.title 'Multistep form'
|
2
|
+
|
3
|
+
page = json_ui_page json
|
4
|
+
|
5
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: false
|
6
|
+
|
7
|
+
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
8
|
+
scroll.p text: 'Go to next page without pushing state to history'
|
9
|
+
scroll.spacer height: 4
|
10
|
+
scroll.markdown text: '`action.windows_reload url: url`'
|
11
|
+
scroll.spacer height: 8
|
12
|
+
scroll.button text: 'Next', onClick: ->(action) do
|
13
|
+
action.windows_reload url: json_ui_garage_url(path: 'multistep_form/step2')
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
json.title 'Multistep form'
|
2
|
+
|
3
|
+
page = json_ui_page json
|
4
|
+
|
5
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: false
|
6
|
+
|
7
|
+
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
8
|
+
scroll.p text: 'Clicking browser back button will bring you to index page. Clicking button bellow will bring you to step 1'
|
9
|
+
scroll.spacer height: 8
|
10
|
+
scroll.button text: 'Back', onClick: ->(action) do
|
11
|
+
action.windows_reload url: json_ui_garage_url(path: 'multistep_form/step1')
|
12
|
+
end
|
13
|
+
end
|
@@ -75,15 +75,33 @@ else
|
|
75
75
|
'Mar' => 70,
|
76
76
|
'Apr' => 62,
|
77
77
|
}
|
78
|
-
prev = points['Jan']
|
79
78
|
|
79
|
+
prev = ''
|
80
|
+
json.points do
|
81
|
+
points.each do |k, v|
|
82
|
+
prev = points['Jan']
|
83
|
+
content = v >= prev ? "▲ #{v - prev}" : "▼ #{prev - v}"
|
84
|
+
json.child! do
|
85
|
+
json.x k
|
86
|
+
json.y v
|
87
|
+
json.tooltip do
|
88
|
+
json.childViews do
|
89
|
+
scroll.panels_responsive \
|
90
|
+
padding: { top: 8, right: 8, left: 8, bottom: 8 },
|
91
|
+
backgroundColor: '#EDE4E3',
|
92
|
+
styleClasses: ['rounded-corner'],
|
93
|
+
childViews: ->(sview) do
|
94
|
+
sview.label text: "Delta #{k}", color: '#6C6A61'
|
95
|
+
sview.spacer height: 4
|
96
|
+
sview.label text: content, color: '#6C6A61'
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
prev = k
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
80
104
|
|
81
|
-
json.points points.map { |k, v|
|
82
|
-
delta = prev - v
|
83
|
-
tooltip = v < prev ? "<div>Delta</div><div>▼ #{delta}</div>" : "<div>Delta</div><div>▲ #{delta}</div>"
|
84
|
-
prev = v
|
85
|
-
{ x: k, y: v, tooltip: glib_chart_tooltip_template(title: "Summary #{k}", content: tooltip) }
|
86
|
-
}
|
87
105
|
end
|
88
106
|
]
|
89
107
|
|
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: 3.
|
4
|
+
version: 3.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -95,10 +95,12 @@ files:
|
|
95
95
|
- app/helpers/glib/forms_helper.rb
|
96
96
|
- app/helpers/glib/json_ui/abstract_builder.rb
|
97
97
|
- app/helpers/glib/json_ui/action_builder.rb
|
98
|
+
- app/helpers/glib/json_ui/action_builder/bottom_banners.rb
|
98
99
|
- app/helpers/glib/json_ui/action_builder/commands.rb
|
99
100
|
- app/helpers/glib/json_ui/action_builder/components.rb
|
100
101
|
- app/helpers/glib/json_ui/action_builder/dialogs.rb
|
101
102
|
- app/helpers/glib/json_ui/action_builder/fields.rb
|
103
|
+
- app/helpers/glib/json_ui/action_builder/global_states.rb
|
102
104
|
- app/helpers/glib/json_ui/action_builder/http.rb
|
103
105
|
- app/helpers/glib/json_ui/action_builder/iap.rb
|
104
106
|
- app/helpers/glib/json_ui/action_builder/panels.rb
|
@@ -221,6 +223,8 @@ files:
|
|
221
223
|
- app/views/json_ui/garage/lists/index.json.jbuilder
|
222
224
|
- app/views/json_ui/garage/lists/reordering.json.jbuilder
|
223
225
|
- app/views/json_ui/garage/lists/templating.json.jbuilder
|
226
|
+
- app/views/json_ui/garage/multistep_form/step1.json.jbuilder
|
227
|
+
- app/views/json_ui/garage/multistep_form/step2.json.jbuilder
|
224
228
|
- app/views/json_ui/garage/notifications/action_cable.json.jbuilder
|
225
229
|
- app/views/json_ui/garage/notifications/android_post.json.jbuilder
|
226
230
|
- app/views/json_ui/garage/notifications/index.json.jbuilder
|