glib-web 3.18.0 → 3.19.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67f1a12f58e636eebfea51213e913bf4a5dcd1f131f6d1fbbb8794391ac9493a
|
4
|
+
data.tar.gz: 8facd85fed8676d112978f51b1d7712374f91ba4f99bef116516f69354485ff2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0b873948a68e24fd6fc0c2e9d2aaafa11c4f0102bfa33fc9b433703998bf502cda9e0a201bd2112d7f58834ea649846c9b3351e756e58288781c9211741fa9e
|
7
|
+
data.tar.gz: 4ea2b19bfbb4e3ae62998ff1fc7db9021c1f5019b93a0b9a4f59ce39d3375b5b6655b48a2e2288881d7802489da27bba0f02ee32ee8bd106ae49a88b1ec8500a
|
@@ -301,7 +301,7 @@ class Glib::JsonUi::ViewBuilder
|
|
301
301
|
array :files
|
302
302
|
string :directUploadUrl
|
303
303
|
string :uploadTitle
|
304
|
-
string :uploadFailedText
|
304
|
+
string :uploadFailedText # deprecated
|
305
305
|
|
306
306
|
required :accepts, :directUploadUrl
|
307
307
|
|
@@ -319,12 +319,27 @@ class Glib::JsonUi::ViewBuilder
|
|
319
319
|
@files = values
|
320
320
|
end
|
321
321
|
|
322
|
+
def responseMessages(values)
|
323
|
+
@responseMessages = values
|
324
|
+
end
|
325
|
+
|
322
326
|
def created
|
323
327
|
super
|
324
328
|
|
325
329
|
@placeholder ||= I18n.t('common.multi_upload.placeholder', default: nil)
|
326
330
|
@hint ||= I18n.t('common.multi_upload.hint', default: nil)
|
327
331
|
|
332
|
+
['200', '403', '401', 'else'].each do |status|
|
333
|
+
key = "common.multi_upload.responseMessages.#{status}"
|
334
|
+
@responseMessages[status] = I18n.t(key) if I18n.exists?(key)
|
335
|
+
end
|
336
|
+
json.responseMessages (@responseMessages || {}).reverse_merge({
|
337
|
+
'200' => 'File uploaded',
|
338
|
+
'403' => 'Forbidden',
|
339
|
+
'401' => 'Session expired',
|
340
|
+
'else' => 'Upload failed'
|
341
|
+
})
|
342
|
+
|
328
343
|
json.placeholder @placeholder if @placeholder
|
329
344
|
json.hint @hint if @hint
|
330
345
|
|
@@ -39,6 +39,7 @@ page.form options.merge(childViews: ->(form) do
|
|
39
39
|
form.spacer height: 16
|
40
40
|
form.fields_multiUpload \
|
41
41
|
name: 'user[multi][]',
|
42
|
+
width: 360,
|
42
43
|
accepts: { fileType: 'image', maxFileSize: 5000 },
|
43
44
|
directUploadUrl: rails_direct_uploads_url,
|
44
45
|
uploadTitle: 'Files uploaded:',
|
@@ -3,8 +3,13 @@ json.title 'Forms'
|
|
3
3
|
page = json_ui_page json
|
4
4
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
5
|
|
6
|
+
if Object.const_defined?('User')
|
7
|
+
record = User.first
|
8
|
+
end
|
9
|
+
|
6
10
|
page.form \
|
7
11
|
url: json_ui_garage_url(path: 'forms/generic_post'),
|
12
|
+
model: record,
|
8
13
|
method: 'post',
|
9
14
|
padding: glib_json_padding_body,
|
10
15
|
childViews: ->(form) do
|
@@ -65,6 +70,14 @@ page.form \
|
|
65
70
|
max: '2021-03-01',
|
66
71
|
value: '2021-11'
|
67
72
|
|
73
|
+
if record.present?
|
74
|
+
form.fields_datetime \
|
75
|
+
prop: :created_at,
|
76
|
+
label: 'User created at',
|
77
|
+
placeholder: 'User created at',
|
78
|
+
width: 'matchParent'
|
79
|
+
end
|
80
|
+
|
68
81
|
form.spacer height: 20
|
69
82
|
form.h2 text: 'Country'
|
70
83
|
form.spacer height: 6
|
@@ -37,7 +37,7 @@ else
|
|
37
37
|
'Thu, 15 Nov 2018' => 1,
|
38
38
|
'Fri, 16 Nov 2018' => 5,
|
39
39
|
}
|
40
|
-
json.points points.map { |k, v| { x: k, y: v } }
|
40
|
+
json.points points.map { |k, v| { x: k, y: v, label: v > 5 ? 'Greater than five' : v } }
|
41
41
|
end,
|
42
42
|
-> do
|
43
43
|
json.title 'Line 2'
|
@@ -51,7 +51,7 @@ else
|
|
51
51
|
'Thu, 15 Nov 2018' => 5,
|
52
52
|
'Fri, 16 Nov 2018' => 1,
|
53
53
|
}
|
54
|
-
json.points points.map { |k, v| { x: k, y: v } }
|
54
|
+
json.points points.map { |k, v| { x: k, y: v, label: v > 5 ? 'Greater than five' : v } }
|
55
55
|
end
|
56
56
|
],
|
57
57
|
plugins: default_plugins,
|
@@ -132,7 +132,7 @@ else
|
|
132
132
|
legend: { display: false },
|
133
133
|
colors: ['#fc5a8d', '#F5E216'],
|
134
134
|
plugins: plugins,
|
135
|
-
dataPoints: [{ title: 'Strawberry', value: 25 }, { title: 'Banana', value: 75 }], legend: { display: false }
|
135
|
+
dataPoints: [{ title: 'Strawberry', value: 25, label: '❤ Strawberry' }, { title: 'Banana', value: 75, label: '❤ Banana' }], legend: { display: false }
|
136
136
|
|
137
137
|
scroll.h2 text: 'Donut chart'
|
138
138
|
scroll.charts_pie \
|