glib-web 4.11.4 → 4.12.0
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 +4 -4
- data/app/helpers/glib/json_ui/action_builder/popovers.rb +1 -0
- data/app/helpers/glib/json_ui/menu_builder.rb +1 -1
- data/app/helpers/glib/json_ui/view_builder/fields.rb +4 -3
- data/app/views/json_ui/garage/forms/bulk_edit_post2.json.jbuilder +1 -1
- data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +15 -1
- data/app/views/json_ui/garage/forms/dynamic_select.json.jbuilder +4 -2
- data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +17 -12
- data/app/views/json_ui/garage/forms/selects.json.jbuilder +1 -1
- data/app/views/json_ui/garage/forms/show_hide.json.jbuilder +2 -2
- data/app/views/json_ui/garage/tables/bulk_edit.json.jbuilder +4 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fea0c9ca22e2cd6a190a3be52be84ed1a79ec94bfec2c17ee766793adb3941d1
|
4
|
+
data.tar.gz: 3a19e361ff4609642e13f2c616af927d40f7094eb25c0aa9174609d19a3aa4a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2fc7867a17b4aa08b5a37068f50315c726725e47b82a6dd8b9feff0271a0dac1476c4c1b01588f44bb649ca86a17e2a26340c52143357ef978276dccc22d939
|
7
|
+
data.tar.gz: 20c3582468ce979b149fa170980f0aa2c4c575595d714427bb922548aa975a3a12d5f6d624b90c26afaa45f95abea3dd7586fb380ca9f744cc7409ea29c7a17c
|
@@ -8,7 +8,7 @@ module Glib
|
|
8
8
|
class MenuItem < JsonUiElement
|
9
9
|
include Builder::MouseEvents
|
10
10
|
|
11
|
-
hash :analytics, optional: [:featured, :disabled]
|
11
|
+
hash :analytics, optional: [:featured, :disabled, :group, :action]
|
12
12
|
hash :tooltip, required: [:text], optional: [:placement, :position]
|
13
13
|
end
|
14
14
|
|
@@ -7,6 +7,7 @@ class Glib::JsonUi::ViewBuilder
|
|
7
7
|
bool :readOnly
|
8
8
|
bool :disabled
|
9
9
|
bool :disableDirtyCheck
|
10
|
+
bool :clearable
|
10
11
|
action :onChange
|
11
12
|
action :onChangeAndLoad
|
12
13
|
string :paramNameForFormData
|
@@ -201,7 +202,7 @@ class Glib::JsonUi::ViewBuilder
|
|
201
202
|
|
202
203
|
panels_builder :accessory, :header, :footer
|
203
204
|
bool :clearable
|
204
|
-
bool :csvMode
|
205
|
+
# bool :csvMode
|
205
206
|
|
206
207
|
def options(value)
|
207
208
|
@_options = value
|
@@ -294,8 +295,8 @@ class Glib::JsonUi::ViewBuilder
|
|
294
295
|
action :onClick
|
295
296
|
string :offIcon
|
296
297
|
string :onIcon
|
297
|
-
hash :image, required: [:url, :template], optional: [:width, :height]
|
298
|
-
hash :icon, required: [:name, :template], optional: [:color, :size]
|
298
|
+
hash :image, required: [:url, :template], optional: [:width, :height, :subtitle]
|
299
|
+
hash :icon, required: [:name, :template], optional: [:color, :size, :subtitle]
|
299
300
|
|
300
301
|
views :childViews
|
301
302
|
end
|
@@ -22,7 +22,7 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
22
22
|
{ name: 'type', value: 'yes_no' },
|
23
23
|
]
|
24
24
|
]
|
25
|
-
form.fields_dynamicGroup width: 'matchParent', name: 'user[evaluation]', groupFieldProperties: properties, titlePrefix: 'Entry', content: ->(group) do
|
25
|
+
form.fields_dynamicGroup id: 'form_dynamic_group', width: 'matchParent', name: 'user[evaluation]', groupFieldProperties: properties, titlePrefix: 'Entry', content: ->(group) do
|
26
26
|
group.template padding: { left: 32 }, childViews: ->(template) do
|
27
27
|
template.spacer height: 10
|
28
28
|
template.fields_text width: 'matchParent', name: 'question', label: 'Question', placeholder: 'Question'
|
@@ -103,6 +103,20 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
+
form.panels_horizontal \
|
107
|
+
align: 'middle',
|
108
|
+
childViews: ->(horizontal) do
|
109
|
+
horizontal.icon \
|
110
|
+
name: 'add_circle',
|
111
|
+
styleClasses: ['success']
|
112
|
+
|
113
|
+
horizontal.spacer width: 10
|
114
|
+
horizontal.h4 text: 'Add item'
|
115
|
+
end,
|
116
|
+
onClick: ->(action) do
|
117
|
+
action.components_invoke targetId: 'form_dynamic_group', name: 'addGroup'
|
118
|
+
end
|
119
|
+
|
106
120
|
form.spacer height: 20
|
107
121
|
form.fields_submit text: 'Submit'
|
108
122
|
end
|
@@ -11,13 +11,15 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
11
11
|
|
12
12
|
form.fields_dynamicSelect name: 'user[primary_language]', width: 'matchParent', label: 'Primary Language',
|
13
13
|
selectedOptions: [ { value: 'id3', text: 'Item 3' } ],
|
14
|
-
url: json_ui_garage_url(path: 'forms/dynamic_select_data')
|
14
|
+
url: json_ui_garage_url(path: 'forms/dynamic_select_data'),
|
15
|
+
placeholder: 'Start typing'
|
15
16
|
|
16
17
|
form.spacer height: 14
|
17
18
|
form.fields_dynamicSelect name: 'user[preferred_languages][]', width: 'matchParent', label: 'Preferred Languages',
|
18
19
|
selectedOptions: [ { value: 'id3', text: 'Item 3' }, { value: 'id5', text: 'Item 5' } ],
|
19
20
|
url: json_ui_garage_url(path: 'forms/dynamic_select_data'),
|
20
|
-
multiple: true
|
21
|
+
multiple: true,
|
22
|
+
placeholder: 'Start typing'
|
21
23
|
|
22
24
|
form.spacer height: 14
|
23
25
|
form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
@@ -22,17 +22,22 @@ end
|
|
22
22
|
# end
|
23
23
|
# end
|
24
24
|
|
25
|
-
|
26
|
-
section
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
25
|
+
if (query_keyword = params[:q]).present?
|
26
|
+
section = json_ui_section json
|
27
|
+
section.rows builder: ->(row) do
|
28
|
+
count_per_page = 20
|
29
|
+
count_per_page.times do |i|
|
30
|
+
index = page * count_per_page + i
|
31
|
+
# title: "City #{index} (#{query_keyword})",
|
32
|
+
row.custom \
|
33
|
+
subtitle: "State #{index}",
|
34
|
+
subsubtitle: "Country #{index}",
|
35
|
+
extra: {
|
36
|
+
value: "id#{index}",
|
37
|
+
text: "City #{index} (#{query_keyword})"
|
38
|
+
}
|
39
|
+
end
|
37
40
|
end
|
41
|
+
else
|
42
|
+
json.rows []
|
38
43
|
end
|
@@ -142,7 +142,7 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
142
142
|
name: 'user[animal_or_plant]',
|
143
143
|
width: 'matchParent',
|
144
144
|
label: 'Animal or Plant',
|
145
|
-
options: [{ text: 'Animal', value: 'animal' }, { text: 'Plant', value: 'plant' }],
|
145
|
+
options: [{ icon: { name: 'pets' }, text: 'Animal', value: 'animal' }, { icon: { name: 'forest' }, text: 'Plant', value: 'plant' }],
|
146
146
|
value: 'animal',
|
147
147
|
onChangeAndLoad: ->(action) do
|
148
148
|
action.http_get url: json_ui_garage_url(path: 'forms/update_options')
|
@@ -129,7 +129,7 @@ page.form \
|
|
129
129
|
|
130
130
|
res.panels_column width: 'matchParent', lg: { cols: 4 }, childViews: ->(column) do
|
131
131
|
column.fields_radio\
|
132
|
-
width:
|
132
|
+
width: 'matchParent',
|
133
133
|
value: 'yes', label: 'Yes', icon: { template: 'featured', name: 'edit', size: 40, color: '#d1d1d1' },
|
134
134
|
onClick: ->(action) do
|
135
135
|
action.windows_openWeb url: 'http://www.google.com'
|
@@ -137,7 +137,7 @@ page.form \
|
|
137
137
|
end
|
138
138
|
res.panels_column width: 'matchParent', lg: { cols: 4 }, childViews: ->(column) do
|
139
139
|
column.fields_radio\
|
140
|
-
width:
|
140
|
+
width: 'matchParent',
|
141
141
|
value: 'no', label: 'No',
|
142
142
|
image: { template: 'featured', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 80, height: 80 },
|
143
143
|
onClick: ->(action) do
|
@@ -48,12 +48,12 @@ page.scroll childViews: ->(scroll) do
|
|
48
48
|
horizontal.label text: 'Total: '
|
49
49
|
horizontal.label id: 'loaded_count', text: '0'
|
50
50
|
|
51
|
-
horizontal.label text: " #{symbol_horizontal_separator} "
|
51
|
+
# horizontal.label text: " #{symbol_horizontal_separator} "
|
52
52
|
|
53
53
|
horizontal.label text: 'Selected: '
|
54
54
|
horizontal.label id: 'selected_count', text: '0'
|
55
55
|
|
56
|
-
horizontal.label text: " #{symbol_horizontal_separator} "
|
56
|
+
# horizontal.label text: " #{symbol_horizontal_separator} "
|
57
57
|
horizontal.chip \
|
58
58
|
id: 'succeeded_count',
|
59
59
|
styleClass: 'success',
|
@@ -64,11 +64,10 @@ page.scroll childViews: ->(scroll) do
|
|
64
64
|
scroll.panels_bulkEdit2 \
|
65
65
|
id: 'import_table',
|
66
66
|
width: 'matchParent',
|
67
|
-
backgroundColor: '#e2e2e2',
|
68
67
|
paramNameForRowId: 'row_id',
|
69
68
|
import: { submitUrl: json_ui_garage_url(path: 'forms/bulk_edit_post2'), paramName: 'user' },
|
70
69
|
viewHeaders: [
|
71
|
-
{ text: 'Month', id: 'month', importable: true },
|
70
|
+
{ text: 'Month', id: 'month', importable: true, tooltip: { text: 'Month' } },
|
72
71
|
{ text: 'Electricity usage', id: 'electricity_usage', importable: true },
|
73
72
|
{ text: 'Gas usage', id: 'gas_usage', importable: true },
|
74
73
|
{ text: 'Sources', id: 'sources', importable: true },
|
@@ -142,7 +141,7 @@ page.scroll childViews: ->(scroll) do
|
|
142
141
|
conditionalData: {
|
143
142
|
text: {
|
144
143
|
"printf": [
|
145
|
-
|
144
|
+
'Uploaded: {0}',
|
146
145
|
{ "count": [{ "var": 'data.succeededRows' }] }
|
147
146
|
]
|
148
147
|
},
|