glib-web 0.2.12 → 0.2.13
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/application/json/libs.rb +1 -1
- data/app/controllers/concerns/application/json/ui.rb +5 -8
- data/app/helpers/glib/json_ui/page_helper.rb +0 -1
- data/app/views/app/views/json_ui/vue/renderer.html.erb +3 -1
- data/app/views/json_ui/garage/_nav_menu.json.jbuilder +1 -1
- data/app/views/json_ui/garage/views/links.json.jbuilder +8 -1
- 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: 6f39277110861a205e86572fb7c4e3e25ae8a550
|
4
|
+
data.tar.gz: 1fe363ea9f6186f6275ae2058db85782b4790643
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d623b172742bb574f9ccd45644d315a73dff76c627766f744a9342bfee59c691cf2c0a37785105cf3444a61a6abe9982744372b87a06493d4d7c275e4592cc1
|
7
|
+
data.tar.gz: 4fa48b1fdbe0d3f971197fdd4cd56c67f38fa5791c4922f5a004ba7e033fd77de4b867181b360fc417e7963f8554a68f92f5b115caf04cdb2666b47d7d3a97f6
|
@@ -49,7 +49,7 @@ module Concerns::Application::Json::Libs
|
|
49
49
|
|
50
50
|
# Note that after_action gets executed in reverse
|
51
51
|
after_action do
|
52
|
-
__json_ui_commit(options
|
52
|
+
__json_ui_commit(options)
|
53
53
|
end
|
54
54
|
after_action :__json_transformation_commit
|
55
55
|
after_action :__json_validate_perform
|
@@ -39,16 +39,12 @@ module Concerns::Application::Json::Ui
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
def __json_ui_commit(
|
42
|
+
def __json_ui_commit(options)
|
43
43
|
if @__json_ui_rendering
|
44
44
|
if (hash = json_transformation_start).is_a?(Hash)
|
45
45
|
case params[:_render]
|
46
46
|
when 'v1'
|
47
|
-
__json_ui_vue(hash,
|
48
|
-
when 'mdc'
|
49
|
-
__json_ui_mdc(hash)
|
50
|
-
when 'vue'
|
51
|
-
__json_ui_vue(hash)
|
47
|
+
__json_ui_vue(hash, options)
|
52
48
|
end
|
53
49
|
end
|
54
50
|
end
|
@@ -56,8 +52,9 @@ module Concerns::Application::Json::Ui
|
|
56
52
|
|
57
53
|
private
|
58
54
|
|
59
|
-
def __json_ui_vue(hash,
|
55
|
+
def __json_ui_vue(hash, options)
|
56
|
+
renderer_path = options[:renderer_path]
|
60
57
|
@__json_ui_orig_page = response.body
|
61
|
-
response.body = render_to_string(file: renderer_path, layout: false, content_type: 'text/html', locals: { page: hash })
|
58
|
+
response.body = render_to_string(file: renderer_path, layout: false, content_type: 'text/html', locals: { page: hash, options: options })
|
62
59
|
end
|
63
60
|
end
|
@@ -12,7 +12,9 @@
|
|
12
12
|
<%#= javascript_include_tag 'vue_renderer_extras', defer: true %>
|
13
13
|
|
14
14
|
<%= stylesheet_pack_tag 'vue_renderer' %>
|
15
|
-
|
15
|
+
<% if (custom_css_path = options[:custom_css_path]) %>
|
16
|
+
<%= stylesheet_link_tag custom_css_path, media: 'all' %>
|
17
|
+
<% end %>
|
16
18
|
|
17
19
|
<link href="https://fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
|
18
20
|
</head>
|
@@ -3,7 +3,7 @@ if local_assigns[:top_nav] || json_ui_app_is_web?
|
|
3
3
|
|
4
4
|
page.leftDrawer content: ->(drawer) do
|
5
5
|
drawer.header childViews: ->(header) do
|
6
|
-
header.button text: 'App', onClick: ->(action) do
|
6
|
+
header.button text: 'App', styleClasses: ['link', 'logo'], onClick: ->(action) do
|
7
7
|
action.windows_open url: root_url
|
8
8
|
end
|
9
9
|
end
|
@@ -21,7 +21,14 @@ json_ui_page json do |page|
|
|
21
21
|
scroll.spacer height: 20
|
22
22
|
scroll.h2 text: 'Button with link style'
|
23
23
|
scroll.spacer height: 6
|
24
|
-
scroll.button text: '
|
24
|
+
scroll.button text: 'Link Button', styleClass: 'link', onClick: ->(action) do
|
25
|
+
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
26
|
+
end
|
27
|
+
|
28
|
+
scroll.spacer height: 20
|
29
|
+
scroll.h2 text: 'Button with icon style'
|
30
|
+
scroll.spacer height: 6
|
31
|
+
scroll.button icon: 'info', styleClass: 'icon', onClick: ->(action) do
|
25
32
|
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
26
33
|
end
|
27
34
|
|