glib-web 0.4.17 → 0.4.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/glib/json/libs.rb +7 -5
- data/app/helpers/glib/json_ui/view_builder.rb +4 -1
- data/app/views/json_ui/garage/_nav_menu.json.jbuilder +4 -0
- data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +5 -2
- data/app/views/json_ui/garage/views/markdowns.json.jbuilder +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c4c7bc6647854b613fa074f065ecfcb6b33dd50
|
4
|
+
data.tar.gz: 8e74f10469c511bac536d56a3756eeac09a2db30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41cb1081d27f1f961ac3c84b486443d51b6bce60661e9a56a2a3b7b9768188eb4a1dc4fe467efd6f1ed18d6d9310378aaaec3a7c56e8c7089f04572fac440b32
|
7
|
+
data.tar.gz: 0635cdab21ed355d2f106ba8af3bd215e85403a6d70dc03c2b18040200e11d2b846d5f69537691874d0236177386183a3115d7bb3ba7e962461875aee5992fc1
|
@@ -39,6 +39,12 @@ module Glib::Json::Libs
|
|
39
39
|
def json_ui_render(template, args = {})
|
40
40
|
JSON.parse(render_to_string(template, locals: args))
|
41
41
|
end
|
42
|
+
|
43
|
+
def json_libs_force_json_ui
|
44
|
+
if params[:_render] != 'v1'
|
45
|
+
redirect_to url_for(params.to_unsafe_h.merge(_render: 'v1'))
|
46
|
+
end
|
47
|
+
end
|
42
48
|
|
43
49
|
|
44
50
|
|
@@ -75,11 +81,7 @@ module Glib::Json::Libs
|
|
75
81
|
end
|
76
82
|
|
77
83
|
def json_libs_force_json_ui
|
78
|
-
before_action
|
79
|
-
if params[:_render] != 'v1'
|
80
|
-
redirect_to url_for(params.to_unsafe_h.merge(_render: 'v1'))
|
81
|
-
end
|
82
|
-
end
|
84
|
+
before_action :json_libs_force_json_ui
|
83
85
|
end
|
84
86
|
|
85
87
|
def json_libs_rescue_csrf
|
@@ -53,6 +53,10 @@ if local_assigns[:top_nav] || json_ui_app_is_web?
|
|
53
53
|
action.windows_open url: json_ui_garage_url
|
54
54
|
end
|
55
55
|
|
56
|
+
menu.button icon: 'refresh', text: 'Reload', onClick: ->(action) do
|
57
|
+
action.windows_reload
|
58
|
+
end
|
59
|
+
|
56
60
|
menu.button icon: { name: 'zoom_in', badge: '!' }, text: 'Diagnostics', onClick: ->(action) do
|
57
61
|
action.dialogs_alert message: %{
|
58
62
|
Bundle ID: #{json_ui_app_bundle_id || '<unknown>'}
|
@@ -15,9 +15,12 @@ json_ui_page json do |page|
|
|
15
15
|
form.fields_file name: 'user[photo][]', width: 'matchParent', label: 'Photo', accepts: rules1, directUploadUrl: rails_direct_uploads_url,
|
16
16
|
value: 'eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBFQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--193dc0d939b9558fc4973fafbba91d989cbb04d4',
|
17
17
|
fileUrl: 'https://imageserver-demo.herokuapp.com/image/itinerarybuilder-demo/o6CKzNt67PWnkPdUEnWMt7pr?h=100&w=100',
|
18
|
-
fileTitle: '1 month ago'
|
18
|
+
fileTitle: '1 month ago',
|
19
|
+
placeholderView: { type: 'image', width: 100, height: 100 }
|
20
|
+
|
19
21
|
form.fields_file name: 'user[photo][]', width: 'matchParent', label: 'Photo', accepts: rules2, directUploadUrl: rails_direct_uploads_url,
|
20
|
-
|
22
|
+
placeholderView: { type: 'avatar', width: 100, height: 100 }
|
23
|
+
|
21
24
|
form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
22
25
|
end)
|
23
26
|
end
|
@@ -2,12 +2,12 @@ json.title 'Views'
|
|
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
|
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
7
|
scroll.spacer height: 20
|
8
8
|
scroll.h2 text: 'Paragraph'
|
9
9
|
scroll.spacer height: 6
|
10
|
-
scroll.
|
10
|
+
scroll.markdown text:
|
11
11
|
'# h1 Heading' + "\n" +
|
12
12
|
'## h2 Heading' + "\n" +
|
13
13
|
'### h3 Heading' + "\n" +
|