glib-web 4.35.2 → 4.35.3
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: 139b8bb1e77c9778bb396d3ed8da72c74051d9cae9cacbae23dd713357ad9586
|
4
|
+
data.tar.gz: 200ab9fae64c136049b7eb288898216ede1c261dba047e1f386166daa0ab0309
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5761de4b8433b8aec45ac23f3890cc66f1052426d133e37e40d25e3bb10109ef6ac13ee607554b3db7d7b0695086f7823e86f7cb432ea377317b83d35d26375
|
7
|
+
data.tar.gz: d308d941d36c01460174449bc7375cbae1c767dd9797b56f4c008e86985605b890bb292c678d69a93e8a34e63e914921984d0fddde80d6eaa270cb6ae5275ae4
|
@@ -73,17 +73,27 @@ page.body childViews: ->(body) do
|
|
73
73
|
|
74
74
|
validation = { required: { message: 'Required' } }
|
75
75
|
options = ['option1', 'option2', 'option3', 'option4'].map { |option| { 'text'=> option.humanize, 'value' => option } }
|
76
|
+
options_with_icon = options.map.with_index do |option, index|
|
77
|
+
obj = option.dup
|
78
|
+
obj['icon'] = { name: "filter_#{index + 1}" }
|
79
|
+
obj
|
80
|
+
end
|
81
|
+
options_with_image = options.map.with_index do |option, index|
|
82
|
+
obj = option.dup
|
83
|
+
obj['imageUrl'] = 'https://flagsapi.com/ID/flat/24.png'
|
84
|
+
obj
|
85
|
+
end
|
76
86
|
|
77
87
|
form.fields_date width: 'matchParent', name: 'user[date]', id: 'date', value: Date.new(2024, 7, 24), validation: validation
|
78
88
|
form.hr width: 'matchParent'
|
79
89
|
form.fields_select clearable: true, multiple: true, width: 'matchParent', name: 'user[select][]', id: 'select', options: options, value: ['option1', 'option2'], validation: validation
|
80
90
|
form.hr width: 'matchParent'
|
81
91
|
form.panels_flow innerPadding: { bottom: 0 }, width: 'matchParent', id: 'select1', childViews: ->(flow) do
|
82
|
-
form.fields_select clearable: true, width: 'matchParent', name: 'user[select1]', options:
|
92
|
+
form.fields_select clearable: true, width: 'matchParent', name: 'user[select1]', options: options_with_icon, value: 'option1'
|
83
93
|
form.hr width: 'matchParent'
|
84
94
|
end
|
85
95
|
form.panels_horizontal id: 'select2', width: 'matchParent', childViews: ->(hori) do
|
86
|
-
form.fields_select clearable: true, width: 'matchParent', name: 'user[select2]', options:
|
96
|
+
form.fields_select clearable: true, width: 'matchParent', name: 'user[select2]', options: options_with_image, value: 'option2'
|
87
97
|
form.hr width: 'matchParent'
|
88
98
|
end
|
89
99
|
form.panels_split id: 'select3', width: 'matchParent', content: ->(split) do
|