glib-web 0.10.8 → 0.10.9

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
  SHA256:
3
- metadata.gz: 23de874348dde798e5ec0f017f769efd605c8747b15c99a75ba9ad2353d20673
4
- data.tar.gz: 88d00f3b59edf17ceaa71c8d5713159bae1015668f5a0f2e380fc76390d9b7ba
3
+ metadata.gz: fe8d532c23d4899cd370e1bab0d81e40e17d1657bcbf93d6b36daf6719ed1a74
4
+ data.tar.gz: 0f74dc19e224307673b38b5ea654e3061924eff3e6e62703a7c05890a11b1f95
5
5
  SHA512:
6
- metadata.gz: f10fd44428ad6c865020b86c8b48b8e724ef7782ecaad5c7abb341c2faad0a2bb421862dddc8e121f32cfbe122e7352d53e8d267721909b29564bced6c6730b9
7
- data.tar.gz: '09bc9d77703e5ffd6007163f8491eeec1d136c0656d045aff80cbf205c0483096dbf75b509c3850b1b4dda2bb1473eec43c473941f4d88a320b16d34422061d5'
6
+ metadata.gz: e1c78c76754a98115c0f4bd34285f8c7ab1f38d2bcdfd2b5bd9e0b2ca8879e54fba84a7b5a68aa9aaa3e78cec9e6fa774803ec6729d1d3036035cd656c023aa9
7
+ data.tar.gz: 10127bed4a1f5aa6bcc9424812a5e80bbd8cb5c7d5724ad68d9dfa09a53ebd39a7d03356d813ebf092931ec0434f2298ac84004840bac6ce0f2890445af2854c
@@ -1,7 +1,15 @@
1
1
  module Glib
2
2
  module DynamicImagesHelper
3
3
  # NOTE: The bucket should probably be set as a parameter for json_libs
4
- def glib_dynamic_image_url(blob_key, width: 100, height: 100, fit: 'clip', bucket: Rails.application.config.try(:aws_s3_bucket), signature_key: nil)
4
+ def glib_dynamic_image_url(blob_key,
5
+ width: 100,
6
+ height: 100,
7
+ fit: 'clip',
8
+ https: true,
9
+ host: 'imageserver-demo.herokuapp.com',
10
+ port: nil,
11
+ bucket: Rails.application.config.try(:aws_s3_bucket),
12
+ signature_key: nil)
5
13
  return unless blob_key.present?
6
14
 
7
15
  full_params_hash = {
@@ -24,8 +32,10 @@ module Glib
24
32
  request_params_hash = request_params_hash.merge(signature: signature)
25
33
  end
26
34
 
27
- uri = URI::HTTPS.build(
28
- host: 'imageserver-demo.herokuapp.com',
35
+ request_builder = https ? URI::HTTPS : URI::HTTP
36
+ uri = request_builder.build(
37
+ host: host,
38
+ port: port,
29
39
  path: "/image/#{bucket}/#{blob_key}",
30
40
  query: request_params_hash.to_param
31
41
  )
@@ -1,7 +1,9 @@
1
1
  module Glib
2
2
  module EnumHelper
3
3
  def glib_enum_options(clazz, enum_field, keys = nil)
4
- keys ||= clazz.send("#{enum_field}s").keys
4
+ # keys ||= clazz.send("#{enum_field}s").keys
5
+
6
+ keys ||= clazz.send(enum_field.to_s.pluralize).keys
5
7
  keys.map { |i| { text: clazz.glib_enum_humanize(enum_field, i), value: i } }
6
8
  end
7
9
 
@@ -200,6 +200,7 @@ class Glib::JsonUi::ViewBuilder
200
200
  # string :name
201
201
  # string :value
202
202
  views :childViews
203
+ bool :row
203
204
 
204
205
  # Override
205
206
  def value(value)
@@ -215,6 +216,9 @@ class Glib::JsonUi::ViewBuilder
215
216
  class Radio < View
216
217
  string :label
217
218
  string :value
219
+ action :onClick
220
+ string :offIcon
221
+ string :onIcon
218
222
  end
219
223
 
220
224
  class File < Text
@@ -48,8 +48,10 @@ json_ui_page json do |page|
48
48
 
49
49
  scroll.label text: "\n"
50
50
  scroll.h1 text: 'Click action'
51
- scroll.panels_vertical width: 100, height: 100, backgroundColor: '#b3bac2', onClick: ->(action) do
52
- action.dialogs_alert message: 'Perform action'
51
+ scroll.panels_vertical width: 100, height: 100, backgroundColor: '#b3bac2', align: 'center', onClick: ->(action) do
52
+ action.windows_open url: json_ui_garage_url(path: 'home/blank')
53
+ end, childViews: ->(panel) do
54
+ panel.label text: 'Click me'
53
55
  end
54
56
  end
55
57
  end
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.10.8
4
+ version: 0.10.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''