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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70a139ad04c9474b9ed21f76b4de4635191a19f9
4
- data.tar.gz: c27f5af86e354a217f6f7703452beb8529a7d737
3
+ metadata.gz: 6f39277110861a205e86572fb7c4e3e25ae8a550
4
+ data.tar.gz: 1fe363ea9f6186f6275ae2058db85782b4790643
5
5
  SHA512:
6
- metadata.gz: 6166a3a64dcdbd590920add4aa4d301501cad52dce40f7ae13bb211c9fbd893a41030b68fdb80d1a83f6709feb29fb03463022d911c0ef29f06d4e2a4d122f77
7
- data.tar.gz: 9270f172fe0eb7a15fc51e3611073958061cfcfa2a5e7eec758ffff21cad6e0383da191b5cb21bd58749a5101e68862dc262886027cf592c36d19af557836bfe
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[:renderer_path])
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(renderer_path)
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, renderer_path)
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, renderer_path)
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
@@ -68,7 +68,6 @@ module Glib
68
68
 
69
69
  def body(options = {})
70
70
  json.body do
71
- # raise "OPT: #{options}"
72
71
  vertical_content(options)
73
72
  end
74
73
  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
- <%#= stylesheet_link_tag 'vue_renderer_extras', media: 'all' %>
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: 'Styled Button', styleClass: 'link', onClick: ->(action) do
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
 
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.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''