glib-web 4.10.5 → 4.10.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/glib/json_ui/action_builder/components.rb +5 -0
- data/app/helpers/glib/json_ui/view_builder/panels.rb +2 -0
- data/app/views/json_ui/garage/forms/bulk_edit_post2.json.jbuilder +5 -12
- data/app/views/json_ui/garage/forms/conditional_value.json.jbuilder +2 -2
- data/app/views/json_ui/garage/forms/dirty_prompt.json.jbuilder +7 -2
- data/app/views/json_ui/garage/tables/bulk_edit.json.jbuilder +12 -18
- data/app/views/json_ui/garage/test_page/form.json.jbuilder +9 -8
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0711a808828a6946ba4ec082755d8180a8437241b09c775ec674e4c1cb64388b
|
4
|
+
data.tar.gz: 40b1bda454b973e258b2bf2dd5621515e0f4ef00ce32013f212ccd6603af3c45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2a75a8f46b4acda54a0fdc37feb8fee6fadac5b342ff016412b16565d0cf9c4e7e77d26e4b4640f5a83df105f24f3bda48c4bca644ec80c7c411fc341ac9321
|
7
|
+
data.tar.gz: 9554b47291f05a584dca44b56bc174986a820567e50e48a14007693818d48b7730101fcf2642c179b620e9bfba01f7a5a5a584b93cf7953a5fe663af1218970e
|
@@ -1,15 +1,8 @@
|
|
1
1
|
sleep 0.1
|
2
|
-
|
2
|
+
row_id = params[:user]['rowId']
|
3
|
+
# status = [:saved, :failed][rand(0..1)]
|
4
|
+
status = :saved
|
5
|
+
|
3
6
|
json_ui_response json do |action|
|
4
|
-
action.
|
5
|
-
targetId: status_cell,
|
6
|
-
data: {
|
7
|
-
styleClasses: ['success'],
|
8
|
-
material: {
|
9
|
-
name: 'verified'
|
10
|
-
},
|
11
|
-
tooltip: {
|
12
|
-
text: 'Saved'
|
13
|
-
}
|
14
|
-
}
|
7
|
+
action.components_method targetId: 'bulkEdit', name: 'updateRow', parameter: { rowId: row_id, status: status }
|
15
8
|
end
|
@@ -13,7 +13,7 @@ page.form \
|
|
13
13
|
form.label text: 'End date will be adjusted automatically when start date changes'
|
14
14
|
form.spacer height: 6
|
15
15
|
form.fields_date name: 'user[date_start]', width: 'matchParent', label: 'Start Date', min: '2010-01-01', max: '2012-01-01', value: '2010-02-01', onChangeAndLoad: ->(action) do
|
16
|
-
action.logics_set targetId: 'date1', conditionalData: { value: { "
|
16
|
+
action.logics_set targetId: 'date1', conditionalData: { value: { "sum_date": [{ "var": 'user[date_start]' }, { value: 24 * 3600, format: 'date' }] } }
|
17
17
|
end
|
18
18
|
form.fields_date id: 'date1', name: 'user[date_end]', width: 'matchParent', label: 'End Date', min: '2010-01-01', max: '2012-01-01'
|
19
19
|
|
@@ -22,7 +22,7 @@ page.form \
|
|
22
22
|
form.label text: 'End date/time will be adjusted automatically when start date/time changes'
|
23
23
|
form.spacer height: 6
|
24
24
|
form.fields_datetime name: 'user[datetime_start]', width: 'matchParent', label: 'Start Date', min: '2010-01-01', max: '2012-01-01', value: '2010-02-01T01:00', onChangeAndLoad: ->(action) do
|
25
|
-
action.logics_set targetId: 'date2', conditionalData: { value: { "
|
25
|
+
action.logics_set targetId: 'date2', conditionalData: { value: { "sum_date": [{ "var": 'user[datetime_start]' }, { value: 3600, format: 'datetime-local' }] } }
|
26
26
|
end
|
27
27
|
form.fields_datetime id: 'date2', name: 'user[datetime_end]', width: 'matchParent', label: 'End Date', min: '2010-01-01', max: '2012-01-01'
|
28
28
|
|
@@ -46,9 +46,14 @@ page.form \
|
|
46
46
|
group.fields_radio value: 'F', label: 'Female'
|
47
47
|
end
|
48
48
|
|
49
|
-
form.h3 text: '
|
49
|
+
form.h3 text: 'Check group'
|
50
50
|
form.spacer height: 14
|
51
|
-
form.
|
51
|
+
form.fields_check name: 'user[check][]', checkValue: 'choice1', label: 'choice1', value: 'choice2'
|
52
|
+
form.fields_check name: 'user[check][]', checkValue: 'choice2', label: 'choice2'
|
53
|
+
form.fields_check name: 'user[check][]', checkValue: 'choice2', label: 'choice3', value: 'choice2'
|
54
|
+
|
55
|
+
form.h3 text: 'Rich text'
|
56
|
+
form.fields_richText name: 'user[richtext]', value: 'Lorem ipsum dumet...'
|
52
57
|
|
53
58
|
form.spacer height: 24
|
54
59
|
form.panels_split width: 'matchParent', content: ->(split) do
|
@@ -32,9 +32,6 @@ page.scroll childViews: ->(scroll) do
|
|
32
32
|
# end
|
33
33
|
|
34
34
|
options = [{ text: 'yes', value: 'yes' }, { text: 'no', value: 'no' }]
|
35
|
-
# scroll.button id: 'btn-action', text: 'verify', onClick: ->(action) do
|
36
|
-
# action.windows_reload url: json_ui_garage_current_url(icon: 'verified')
|
37
|
-
# end
|
38
35
|
scroll.button displayed: false, id: 'submit_top', text: 'submit', onClick: ->(action) do
|
39
36
|
action.forms_submit targetId: 'bulkEdit'
|
40
37
|
end
|
@@ -74,22 +71,19 @@ page.scroll childViews: ->(scroll) do
|
|
74
71
|
multiple.components_set targetId: 'submit_top', data: { displayed: true }
|
75
72
|
multiple.components_set targetId: 'submit_bottom', data: { displayed: true }
|
76
73
|
end
|
74
|
+
end,
|
75
|
+
onSubmitStart: ->(action) do
|
76
|
+
action.runMultiple childActions: ->(multiple) do
|
77
|
+
multiple.components_set targetId: 'submit_top', data: { disabled: true }
|
78
|
+
multiple.components_set targetId: 'submit_bottom', data: { disabled: true }
|
79
|
+
end
|
80
|
+
end,
|
81
|
+
onSubmitEnd: ->(action) do
|
82
|
+
action.runMultiple childActions: ->(multiple) do
|
83
|
+
multiple.components_set targetId: 'submit_top', data: { disabled: false }
|
84
|
+
multiple.components_set targetId: 'submit_bottom', data: { disabled: false }
|
85
|
+
end
|
77
86
|
end
|
78
|
-
# onRowSelected: ->(action) do
|
79
|
-
# action.snackbars_alert
|
80
|
-
# end
|
81
|
-
# dataRows: [
|
82
|
-
# { rowId: 1, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 1 }, { value: 30 }, { value: 33 }, { value: 'yes' }] },
|
83
|
-
# { rowId: 2, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 2 }, { value: 34 }, { value: 35 }, { value: 'no' }] },
|
84
|
-
# { rowId: 3, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 1 }, { value: 30 }, { value: 33 }, { value: 'yes' }] },
|
85
|
-
# { rowId: 4, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 2 }, { value: 34 }, { value: 35 }, { value: 'no' }] },
|
86
|
-
# { rowId: 5, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 1 }, { value: 30 }, { value: 33 }, { value: 'yes' }] },
|
87
|
-
# { rowId: 6, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 2 }, { value: 34 }, { value: 35 }, { value: 'no' }] },
|
88
|
-
# { rowId: 7, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 1 }, { value: 30 }, { value: 33 }, { value: 'yes' }] },
|
89
|
-
# { rowId: 8, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 2 }, { value: 34 }, { value: 35 }, { value: 'no' }] },
|
90
|
-
# { rowId: 9, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 1 }, { value: 30 }, { value: 33 }, { value: 'yes' }] },
|
91
|
-
# { rowId: 10, columns: [{ material: { name: params[:icon] || 'preview' }, value: 'preview' }, { value: 2 }, { value: 34 }, { value: 35 }, { value: 'no' }] }
|
92
|
-
# ]
|
93
87
|
end
|
94
88
|
scroll.button displayed: false, id: 'submit_bottom', text: 'submit', onClick: ->(action) do
|
95
89
|
action.forms_submit targetId: 'bulkEdit'
|
@@ -17,15 +17,16 @@ page.body childViews: ->(body) do
|
|
17
17
|
action.runMultiple childActions: ->(saction) do
|
18
18
|
saction.components_set targetId: 'textarea', data: { value: 'The quick brown fox jumps over the lazy dog' }
|
19
19
|
new_options = [{ text: 'Option99', value: 'option99' }]
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
|
21
|
+
saction.components_set targetId: 'select', data: { options: new_options, value: 'option99' }
|
22
|
+
|
23
|
+
saction.components_set targetId: 'chip_group', data: { options: new_options, value: 0 }
|
23
24
|
end
|
24
25
|
end
|
25
26
|
hori.spacer width: 4
|
26
|
-
|
27
|
-
|
28
|
-
|
27
|
+
hori.button text: 'logics/set', onClick: ->(action) do
|
28
|
+
action.logics_set targetId: 'date', conditionalData: { value: { "sum_date": [{ "var": ['user[date]'] }, { value: 60 * 60 * 24 * 3, format: 'date' }] } }
|
29
|
+
end
|
29
30
|
hori.spacer width: 4
|
30
31
|
hori.button text: 'components/replace', onClick: ->(action) do
|
31
32
|
action.runMultiple childActions: ->(saction) do
|
@@ -73,8 +74,8 @@ page.body childViews: ->(body) do
|
|
73
74
|
validation = { required: { message: 'Required' } }
|
74
75
|
options = ['option1', 'option2', 'option3', 'option4'].map { |option| { 'text'=> option.humanize, 'value' => option } }
|
75
76
|
|
76
|
-
|
77
|
-
|
77
|
+
form.fields_date width: 'matchParent', name: 'user[date]', id: 'date', value: Date.new(2024, 7, 24), validation: validation
|
78
|
+
form.hr width: 'matchParent'
|
78
79
|
form.fields_select clearable: true, multiple: true, width: 'matchParent', name: 'user[select][]', id: 'select', options: options, value: ['option1', 'option2'], validation: validation
|
79
80
|
form.hr width: 'matchParent'
|
80
81
|
form.panels_flow innerPadding: { bottom: 0 }, width: 'matchParent', id: 'select1', childViews: ->(flow) do
|
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: 4.10.
|
4
|
+
version: 4.10.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.11'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description:
|
84
98
|
email: ''
|
85
99
|
executables: []
|