glib-web 0.10.8 → 0.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe8d532c23d4899cd370e1bab0d81e40e17d1657bcbf93d6b36daf6719ed1a74
|
4
|
+
data.tar.gz: 0f74dc19e224307673b38b5ea654e3061924eff3e6e62703a7c05890a11b1f95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
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
|
-
|
28
|
-
|
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.
|
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
|