glib-web 4.44.4 → 5.0.1
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/format_helper.rb +1 -1
- data/app/helpers/glib/json_ui/abstract_builder.rb +1 -1
- data/app/helpers/glib/json_ui/action_builder/browsers.rb +1 -3
- data/app/helpers/glib/json_ui/view_builder/fields.rb +0 -53
- data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +0 -65
- data/app/views/json_ui/garage/test_page/_header.json.jbuilder +9 -2
- data/app/views/json_ui/garage/test_page/auth.json.jbuilder +37 -0
- data/app/views/json_ui/garage/test_page/browsers.json.jbuilder +1 -0
- data/app/views/json_ui/garage/test_page/custom.json.jbuilder +58 -50
- data/app/views/json_ui/garage/test_page/dialog.json.jbuilder +123 -26
- data/app/views/json_ui/garage/test_page/dirty_state.json.jbuilder +0 -5
- data/app/views/json_ui/garage/test_page/fields_creditCard.json.jbuilder +118 -0
- data/app/views/json_ui/garage/test_page/fields_date_time.json.jbuilder +213 -0
- data/app/views/json_ui/garage/test_page/fields_location.json.jbuilder +151 -0
- data/app/views/json_ui/garage/test_page/fields_otp.json.jbuilder +168 -0
- data/app/views/json_ui/garage/test_page/fields_phone.json.jbuilder +176 -0
- data/app/views/json_ui/garage/test_page/fields_rating.json.jbuilder +191 -0
- data/app/views/json_ui/garage/test_page/fields_richText.json.jbuilder +213 -0
- data/app/views/json_ui/garage/test_page/fields_stripeExternalAccount.json.jbuilder +146 -0
- data/app/views/json_ui/garage/test_page/fields_stripeToken.json.jbuilder +118 -0
- data/app/views/json_ui/garage/test_page/fields_upload.json.jbuilder +15 -1
- data/app/views/json_ui/garage/test_page/popovers.json.jbuilder +91 -16
- data/app/views/json_ui/garage/test_page/window.json.jbuilder +23 -14
- data/app/views/json_ui/garage/test_page/windows.json.jbuilder +74 -16
- data/lib/glib/rubocop/cops/multiline_method_call_style.rb +0 -8
- data/lib/tasks/db.rake +0 -1
- metadata +29 -13
- data/app/views/json_ui/garage/test_page/multiupload.json.jbuilder +0 -65
- data/lib/glib/doc_generator.rb +0 -386
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
json.title 'Test Page (Fields Stripe External Account)'
|
|
2
|
+
|
|
3
|
+
page = json_ui_page json
|
|
4
|
+
|
|
5
|
+
page.body(
|
|
6
|
+
childViews: ->(body) do
|
|
7
|
+
render 'json_ui/garage/test_page/header', view: body
|
|
8
|
+
|
|
9
|
+
body.panels_responsive(
|
|
10
|
+
padding: glib_json_padding_body,
|
|
11
|
+
childViews: ->(res) do
|
|
12
|
+
res.h2 text: 'Fields Stripe External Account'
|
|
13
|
+
res.spacer height: 8
|
|
14
|
+
res.label text: 'Collect bank account details for Stripe Connect payouts.'
|
|
15
|
+
res.spacer height: 12
|
|
16
|
+
|
|
17
|
+
res.panels_form(
|
|
18
|
+
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
19
|
+
method: 'post',
|
|
20
|
+
childViews: ->(form) do
|
|
21
|
+
form.h2 text: 'Overview'
|
|
22
|
+
form.spacer height: 8
|
|
23
|
+
form.label text: 'Use fields_stripeExternalAccount to connect payout destinations securely.'
|
|
24
|
+
form.spacer height: 12
|
|
25
|
+
form.hr width: 'matchParent'
|
|
26
|
+
form.spacer height: 12
|
|
27
|
+
|
|
28
|
+
form.h2 text: 'Basic example'
|
|
29
|
+
form.spacer height: 8
|
|
30
|
+
form.fields_stripeExternalAccount(
|
|
31
|
+
id: 'stripe_external_basic',
|
|
32
|
+
name: 'user[stripe_external_account]',
|
|
33
|
+
width: 'matchParent',
|
|
34
|
+
label: 'Bank account',
|
|
35
|
+
publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx',
|
|
36
|
+
accountHolderName: 'John Doe',
|
|
37
|
+
accountHolderType: 'individual',
|
|
38
|
+
country: 'AU',
|
|
39
|
+
currency: 'AUD',
|
|
40
|
+
onChange: ->(action) do
|
|
41
|
+
action.logics_set targetId: 'stripe_external_status', data: { text: 'Status: account updated' }
|
|
42
|
+
end
|
|
43
|
+
)
|
|
44
|
+
# form.spacer height: 8
|
|
45
|
+
# form.label id: 'stripe_external_status', text: 'Status: idle'
|
|
46
|
+
|
|
47
|
+
# form.spacer height: 12
|
|
48
|
+
# form.hr width: 'matchParent'
|
|
49
|
+
# form.spacer height: 12
|
|
50
|
+
|
|
51
|
+
# form.h2 text: 'Variants/props'
|
|
52
|
+
# form.spacer height: 8
|
|
53
|
+
# form.label text: 'Switch between individual and company settings.'
|
|
54
|
+
# form.spacer height: 8
|
|
55
|
+
# form.panels_flow(
|
|
56
|
+
# innerPadding: { bottom: 0 },
|
|
57
|
+
# width: 'matchParent',
|
|
58
|
+
# childViews: ->(flow) do
|
|
59
|
+
# flow.button(
|
|
60
|
+
# text: 'Individual (AU/AUD)',
|
|
61
|
+
# onClick: ->(action) do
|
|
62
|
+
# action.components_set(
|
|
63
|
+
# targetId: 'stripe_external_basic',
|
|
64
|
+
# data: {
|
|
65
|
+
# accountHolderName: 'John Doe',
|
|
66
|
+
# accountHolderType: 'individual',
|
|
67
|
+
# country: 'AU',
|
|
68
|
+
# currency: 'AUD'
|
|
69
|
+
# }
|
|
70
|
+
# )
|
|
71
|
+
# end
|
|
72
|
+
# )
|
|
73
|
+
# flow.spacer width: 8
|
|
74
|
+
# flow.button(
|
|
75
|
+
# text: 'Company (US/USD)',
|
|
76
|
+
# onClick: ->(action) do
|
|
77
|
+
# action.components_set(
|
|
78
|
+
# targetId: 'stripe_external_basic',
|
|
79
|
+
# data: {
|
|
80
|
+
# accountHolderName: 'Acme Corp',
|
|
81
|
+
# accountHolderType: 'company',
|
|
82
|
+
# country: 'US',
|
|
83
|
+
# currency: 'USD'
|
|
84
|
+
# }
|
|
85
|
+
# )
|
|
86
|
+
# end
|
|
87
|
+
# )
|
|
88
|
+
# flow.spacer width: 8
|
|
89
|
+
# flow.button(
|
|
90
|
+
# text: 'Company (GB/GBP)',
|
|
91
|
+
# onClick: ->(action) do
|
|
92
|
+
# action.components_set(
|
|
93
|
+
# targetId: 'stripe_external_basic',
|
|
94
|
+
# data: {
|
|
95
|
+
# accountHolderName: 'London Ltd',
|
|
96
|
+
# accountHolderType: 'company',
|
|
97
|
+
# country: 'GB',
|
|
98
|
+
# currency: 'GBP'
|
|
99
|
+
# }
|
|
100
|
+
# )
|
|
101
|
+
# end
|
|
102
|
+
# )
|
|
103
|
+
# end
|
|
104
|
+
# )
|
|
105
|
+
|
|
106
|
+
# form.spacer height: 12
|
|
107
|
+
# form.hr width: 'matchParent'
|
|
108
|
+
# form.spacer height: 12
|
|
109
|
+
|
|
110
|
+
# form.h2 text: 'Edge/advanced'
|
|
111
|
+
# form.spacer height: 8
|
|
112
|
+
# form.panels_flow(
|
|
113
|
+
# innerPadding: { bottom: 0 },
|
|
114
|
+
# width: 'matchParent',
|
|
115
|
+
# childViews: ->(flow) do
|
|
116
|
+
# flow.button(
|
|
117
|
+
# text: 'Disable field',
|
|
118
|
+
# onClick: ->(action) do
|
|
119
|
+
# action.components_set targetId: 'stripe_external_basic', data: { disabled: true }
|
|
120
|
+
# end
|
|
121
|
+
# )
|
|
122
|
+
# flow.spacer width: 8
|
|
123
|
+
# flow.button(
|
|
124
|
+
# text: 'Enable field',
|
|
125
|
+
# onClick: ->(action) do
|
|
126
|
+
# action.components_set targetId: 'stripe_external_basic', data: { disabled: nil }
|
|
127
|
+
# end
|
|
128
|
+
# )
|
|
129
|
+
# flow.spacer width: 8
|
|
130
|
+
# flow.button(
|
|
131
|
+
# text: 'Reset label',
|
|
132
|
+
# onClick: ->(action) do
|
|
133
|
+
# action.components_set targetId: 'stripe_external_basic', data: { label: 'Bank account' }
|
|
134
|
+
# end
|
|
135
|
+
# )
|
|
136
|
+
# end
|
|
137
|
+
# )
|
|
138
|
+
|
|
139
|
+
form.spacer height: 12
|
|
140
|
+
form.fields_submit text: 'Submit'
|
|
141
|
+
end
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
)
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
json.title 'Test Page (Fields Stripe Token)'
|
|
2
|
+
|
|
3
|
+
page = json_ui_page json
|
|
4
|
+
|
|
5
|
+
page.body(
|
|
6
|
+
childViews: ->(body) do
|
|
7
|
+
render 'json_ui/garage/test_page/header', view: body
|
|
8
|
+
|
|
9
|
+
body.panels_responsive(
|
|
10
|
+
padding: glib_json_padding_body,
|
|
11
|
+
childViews: ->(res) do
|
|
12
|
+
res.h2 text: 'Fields Stripe Token'
|
|
13
|
+
res.spacer height: 8
|
|
14
|
+
res.label text: 'Secure card tokenization with Stripe publishable keys.'
|
|
15
|
+
res.spacer height: 12
|
|
16
|
+
|
|
17
|
+
res.panels_form(
|
|
18
|
+
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
19
|
+
method: 'post',
|
|
20
|
+
childViews: ->(form) do
|
|
21
|
+
form.h2 text: 'Overview'
|
|
22
|
+
form.spacer height: 8
|
|
23
|
+
form.label text: 'Use fields_stripeToken to collect card details without exposing raw data to your server.'
|
|
24
|
+
form.spacer height: 12
|
|
25
|
+
form.hr width: 'matchParent'
|
|
26
|
+
form.spacer height: 12
|
|
27
|
+
|
|
28
|
+
form.h2 text: 'Basic example'
|
|
29
|
+
form.spacer height: 8
|
|
30
|
+
form.fields_stripeToken(
|
|
31
|
+
id: 'stripe_token_basic',
|
|
32
|
+
name: 'user[stripe_token]',
|
|
33
|
+
width: 'matchParent',
|
|
34
|
+
label: 'Card details',
|
|
35
|
+
publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx',
|
|
36
|
+
onChange: ->(action) do
|
|
37
|
+
action.logics_set targetId: 'stripe_token_status', data: { text: 'Status: token updated' }
|
|
38
|
+
end
|
|
39
|
+
)
|
|
40
|
+
form.spacer height: 8
|
|
41
|
+
form.label id: 'stripe_token_status', text: 'Status: idle'
|
|
42
|
+
|
|
43
|
+
form.spacer height: 12
|
|
44
|
+
form.hr width: 'matchParent'
|
|
45
|
+
form.spacer height: 12
|
|
46
|
+
|
|
47
|
+
form.h2 text: 'Variants/props'
|
|
48
|
+
form.spacer height: 8
|
|
49
|
+
form.label text: 'Swap visual styles and labels for the same component instance.'
|
|
50
|
+
form.spacer height: 8
|
|
51
|
+
form.panels_flow(
|
|
52
|
+
innerPadding: { bottom: 0 },
|
|
53
|
+
width: 'matchParent',
|
|
54
|
+
childViews: ->(flow) do
|
|
55
|
+
flow.button(
|
|
56
|
+
text: 'Default style',
|
|
57
|
+
onClick: ->(action) do
|
|
58
|
+
action.components_set targetId: 'stripe_token_basic', data: { styleClass: nil, label: 'Card details', hint: nil }
|
|
59
|
+
end
|
|
60
|
+
)
|
|
61
|
+
flow.spacer width: 8
|
|
62
|
+
flow.button(
|
|
63
|
+
text: 'Outlined',
|
|
64
|
+
onClick: ->(action) do
|
|
65
|
+
action.components_set targetId: 'stripe_token_basic', data: { styleClass: 'outlined', label: 'Card details', hint: nil }
|
|
66
|
+
end
|
|
67
|
+
)
|
|
68
|
+
flow.spacer width: 8
|
|
69
|
+
flow.button(
|
|
70
|
+
text: 'Individual',
|
|
71
|
+
onClick: ->(action) do
|
|
72
|
+
action.components_set targetId: 'stripe_token_basic', data: { styleClass: 'individual', label: 'Card details', hint: 'Personal card' }
|
|
73
|
+
end
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
# form.spacer height: 12
|
|
79
|
+
# form.hr width: 'matchParent'
|
|
80
|
+
# form.spacer height: 12
|
|
81
|
+
|
|
82
|
+
# form.h2 text: 'Edge/advanced'
|
|
83
|
+
# form.spacer height: 8
|
|
84
|
+
# form.panels_flow(
|
|
85
|
+
# innerPadding: { bottom: 0 },
|
|
86
|
+
# width: 'matchParent',
|
|
87
|
+
# childViews: ->(flow) do
|
|
88
|
+
# flow.button(
|
|
89
|
+
# text: 'Disable field',
|
|
90
|
+
# onClick: ->(action) do
|
|
91
|
+
# action.components_set targetId: 'stripe_token_basic', data: { disabled: true }
|
|
92
|
+
# end
|
|
93
|
+
# )
|
|
94
|
+
# flow.spacer width: 8
|
|
95
|
+
# flow.button(
|
|
96
|
+
# text: 'Enable field',
|
|
97
|
+
# onClick: ->(action) do
|
|
98
|
+
# action.components_set targetId: 'stripe_token_basic', data: { disabled: nil }
|
|
99
|
+
# end
|
|
100
|
+
# )
|
|
101
|
+
# flow.spacer width: 8
|
|
102
|
+
# flow.button(
|
|
103
|
+
# text: 'Clear hint',
|
|
104
|
+
# onClick: ->(action) do
|
|
105
|
+
# action.components_set targetId: 'stripe_token_basic', data: { hint: nil }
|
|
106
|
+
# end
|
|
107
|
+
# )
|
|
108
|
+
# end
|
|
109
|
+
# )
|
|
110
|
+
|
|
111
|
+
form.spacer height: 12
|
|
112
|
+
form.fields_submit text: 'Submit'
|
|
113
|
+
end
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
)
|
|
117
|
+
end
|
|
118
|
+
)
|
|
@@ -25,7 +25,7 @@ page.body(
|
|
|
25
25
|
value: image&.signed_id
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
base_props[:onFinishUpload] = ->(action) do
|
|
28
|
+
base_props[:onFinishUpload] = ->(action) do # rubocop:disable Glib/MultilineMethodCallStyle
|
|
29
29
|
action.snackbars_alert message: 'Get the signed ids!'
|
|
30
30
|
end
|
|
31
31
|
|
|
@@ -105,6 +105,20 @@ page.body(
|
|
|
105
105
|
)
|
|
106
106
|
)
|
|
107
107
|
|
|
108
|
+
form.spacer height: 12
|
|
109
|
+
form.label text: 'Multi progress view'
|
|
110
|
+
form.spacer height: 4
|
|
111
|
+
form.fields_upload(
|
|
112
|
+
base_props.merge(
|
|
113
|
+
name: 'user[file_input_multiprogress][]',
|
|
114
|
+
id: 'fields_upload_multiprogress',
|
|
115
|
+
label: 'Upload files',
|
|
116
|
+
width: 320,
|
|
117
|
+
multiProgressView: { files: [] },
|
|
118
|
+
multiple: true
|
|
119
|
+
)
|
|
120
|
+
)
|
|
121
|
+
|
|
108
122
|
form.spacer height: 12
|
|
109
123
|
form.label text: 'Multiple selection input'
|
|
110
124
|
form.spacer height: 4
|
|
@@ -19,6 +19,59 @@ page.body(
|
|
|
19
19
|
res.spacer height: 12
|
|
20
20
|
res.hr width: 'matchParent'
|
|
21
21
|
res.spacer height: 12
|
|
22
|
+
res.h2 text: 'Inside dialog'
|
|
23
|
+
res.spacer height: 8
|
|
24
|
+
res.button(
|
|
25
|
+
text: 'open dialog with popover',
|
|
26
|
+
onClick: ->(action) do
|
|
27
|
+
action.dialogs_show(
|
|
28
|
+
content: ->(dialog) do
|
|
29
|
+
dialog.body(
|
|
30
|
+
padding: glib_json_padding_body,
|
|
31
|
+
childViews: ->(dbody) do
|
|
32
|
+
dbody.label id: 'dialog_popover_target', text: 'Dialog anchor'
|
|
33
|
+
dbody.spacer height: 8
|
|
34
|
+
dbody.button(
|
|
35
|
+
text: 'show popover',
|
|
36
|
+
onClick: ->(daction) do
|
|
37
|
+
daction.popovers_show(
|
|
38
|
+
key: 'popover_in_dialog',
|
|
39
|
+
placement: 'top-start',
|
|
40
|
+
targetId: 'dialog_popover_target',
|
|
41
|
+
content: ->(pdialog) do
|
|
42
|
+
pdialog.body(
|
|
43
|
+
padding: glib_json_padding_body,
|
|
44
|
+
childViews: ->(pbody) do
|
|
45
|
+
pbody.label text: 'Popover inside dialog'
|
|
46
|
+
pbody.spacer height: 8
|
|
47
|
+
pbody.button(
|
|
48
|
+
text: 'close popover',
|
|
49
|
+
onClick: ->(paction) do
|
|
50
|
+
paction.popovers_close key: 'popover_in_dialog'
|
|
51
|
+
end
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
)
|
|
59
|
+
dbody.spacer height: 8
|
|
60
|
+
dbody.button(
|
|
61
|
+
text: 'close dialog',
|
|
62
|
+
onClick: ->(daction) do
|
|
63
|
+
daction.dialogs_close
|
|
64
|
+
end
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
)
|
|
72
|
+
res.spacer height: 16
|
|
73
|
+
res.hr width: 'matchParent'
|
|
74
|
+
res.spacer height: 16
|
|
22
75
|
|
|
23
76
|
res.h2 text: 'Basic example'
|
|
24
77
|
res.spacer height: 8
|
|
@@ -27,23 +80,40 @@ page.body(
|
|
|
27
80
|
res.button(
|
|
28
81
|
text: 'popovers/show menu',
|
|
29
82
|
onClick: ->(action) do
|
|
30
|
-
action.popovers_show
|
|
83
|
+
action.popovers_show(
|
|
31
84
|
key: 'popover_menu',
|
|
32
85
|
placement: 'bottom-start',
|
|
33
86
|
targetId: 'popover_target',
|
|
34
87
|
content: ->(dialog) do
|
|
35
|
-
dialog.body
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
88
|
+
dialog.body(
|
|
89
|
+
styleClass: 'popover-menu',
|
|
90
|
+
padding: glib_json_padding_body,
|
|
91
|
+
childViews: ->(menu) do
|
|
92
|
+
menu.label(
|
|
93
|
+
text: 'Item 1',
|
|
94
|
+
styleClass: 'popover-menu-item',
|
|
95
|
+
onClick: ->(subaction) do
|
|
96
|
+
subaction.popovers_close key: 'popover_menu'
|
|
97
|
+
end
|
|
98
|
+
)
|
|
99
|
+
menu.label(
|
|
100
|
+
text: 'Item 2',
|
|
101
|
+
styleClass: 'popover-menu-item',
|
|
102
|
+
onClick: ->(subaction) do
|
|
103
|
+
subaction.popovers_close key: 'popover_menu'
|
|
104
|
+
end
|
|
105
|
+
)
|
|
106
|
+
menu.label(
|
|
107
|
+
text: 'Item 3',
|
|
108
|
+
styleClass: 'popover-menu-item',
|
|
109
|
+
onClick: ->(subaction) do
|
|
110
|
+
subaction.popovers_close key: 'popover_menu'
|
|
111
|
+
end
|
|
112
|
+
)
|
|
44
113
|
end
|
|
45
|
-
|
|
114
|
+
)
|
|
46
115
|
end
|
|
116
|
+
)
|
|
47
117
|
end
|
|
48
118
|
)
|
|
49
119
|
|
|
@@ -63,10 +133,11 @@ page.body(
|
|
|
63
133
|
res.button(
|
|
64
134
|
text: 'popovers/open (updateExisting)',
|
|
65
135
|
onClick: ->(action) do
|
|
66
|
-
action.popovers_open
|
|
136
|
+
action.popovers_open(
|
|
67
137
|
url: json_ui_garage_url(path: 'views/popovers_open', key: 'server_popover'),
|
|
68
138
|
key: 'server_popover',
|
|
69
139
|
updateExisting: true
|
|
140
|
+
)
|
|
70
141
|
end
|
|
71
142
|
)
|
|
72
143
|
|
|
@@ -99,15 +170,19 @@ page.body(
|
|
|
99
170
|
res.button(
|
|
100
171
|
text: 'popovers/show (top-end)',
|
|
101
172
|
onClick: ->(action) do
|
|
102
|
-
action.popovers_show
|
|
173
|
+
action.popovers_show(
|
|
103
174
|
key: 'popover_note',
|
|
104
175
|
placement: 'top-end',
|
|
105
176
|
targetId: 'popover_target',
|
|
106
177
|
content: ->(dialog) do
|
|
107
|
-
dialog.body
|
|
108
|
-
|
|
109
|
-
|
|
178
|
+
dialog.body(
|
|
179
|
+
padding: glib_json_padding_body,
|
|
180
|
+
childViews: ->(menu) do
|
|
181
|
+
menu.label text: 'Pinned note'
|
|
182
|
+
end
|
|
183
|
+
)
|
|
110
184
|
end
|
|
185
|
+
)
|
|
111
186
|
end
|
|
112
187
|
)
|
|
113
188
|
end
|
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
2
|
json.title 'Test Page (Form)'
|
|
4
3
|
|
|
5
4
|
page = json_ui_page json
|
|
6
5
|
|
|
7
|
-
page.body
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
page.body(
|
|
7
|
+
childViews: ->(body) do
|
|
8
|
+
render 'json_ui/garage/test_page/header', view: body
|
|
9
|
+
body.panels_responsive(
|
|
10
|
+
padding: glib_json_padding_body,
|
|
11
|
+
childViews: ->(res) do
|
|
12
|
+
res.h2 text: 'Window'
|
|
13
|
+
res.spacer height: 8
|
|
14
|
+
res.button(
|
|
15
|
+
text: 'windows/open updateExisting: true',
|
|
16
|
+
onClick: ->(action) do
|
|
17
|
+
action.windows_open updateExisting: true, url: json_ui_garage_url(path: 'test_page/fields_upload')
|
|
18
|
+
end
|
|
19
|
+
)
|
|
20
|
+
res.button(
|
|
21
|
+
text: 'windows/close',
|
|
22
|
+
onClick: ->(action) do
|
|
23
|
+
action.windows_close
|
|
24
|
+
end
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
)
|
|
19
28
|
end
|
|
20
|
-
|
|
29
|
+
)
|
|
@@ -42,12 +42,19 @@ page.body(
|
|
|
42
42
|
flow.button(
|
|
43
43
|
text: 'windows/open (updateExisting: true)',
|
|
44
44
|
onClick: ->(action) do
|
|
45
|
-
action.windows_open
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
action.windows_open(
|
|
46
|
+
updateExisting: true,
|
|
47
|
+
url: json_ui_garage_url(path: 'home/blank', sleep: true),
|
|
48
|
+
loaderViews: ->(view) do
|
|
49
|
+
view.panels_responsive(
|
|
50
|
+
padding: { all: 16 },
|
|
51
|
+
childViews: ->(subres) do
|
|
52
|
+
subres.skeleton template: 'textArea'
|
|
53
|
+
subres.skeleton template: 'commentList'
|
|
54
|
+
end
|
|
55
|
+
)
|
|
49
56
|
end
|
|
50
|
-
|
|
57
|
+
)
|
|
51
58
|
end
|
|
52
59
|
)
|
|
53
60
|
flow.spacer width: 8
|
|
@@ -80,9 +87,11 @@ page.body(
|
|
|
80
87
|
flow.button(
|
|
81
88
|
text: 'windows/close',
|
|
82
89
|
onClick: ->(action) do
|
|
83
|
-
action.windows_close
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
action.windows_close(
|
|
91
|
+
onClose: ->(subaction) do
|
|
92
|
+
subaction.dialogs_alert message: 'Previous window closed'
|
|
93
|
+
end
|
|
94
|
+
)
|
|
86
95
|
end
|
|
87
96
|
)
|
|
88
97
|
flow.spacer width: 8
|
|
@@ -96,11 +105,54 @@ page.body(
|
|
|
96
105
|
flow.button(
|
|
97
106
|
text: 'windows/closeAllWithOpen',
|
|
98
107
|
onClick: ->(action) do
|
|
99
|
-
action.windows_closeAllWithOpen
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
action.windows_closeAllWithOpen(
|
|
109
|
+
url: json_ui_garage_url(path: 'home/index', sleep: true),
|
|
110
|
+
loaderViews: ->(view) do
|
|
111
|
+
view.panels_responsive(
|
|
112
|
+
padding: { all: 16 },
|
|
113
|
+
childViews: ->(subres) do
|
|
114
|
+
subres.skeleton template: 'textArea'
|
|
115
|
+
subres.skeleton template: 'commentList'
|
|
116
|
+
end
|
|
117
|
+
)
|
|
103
118
|
end
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
res.spacer height: 12
|
|
126
|
+
res.panels_flow(
|
|
127
|
+
innerPadding: { bottom: 0 },
|
|
128
|
+
width: 'matchParent',
|
|
129
|
+
childViews: ->(flow) do
|
|
130
|
+
flow.button(
|
|
131
|
+
text: 'windows/reload',
|
|
132
|
+
onClick: ->(action) do
|
|
133
|
+
action.windows_reload
|
|
134
|
+
end
|
|
135
|
+
)
|
|
136
|
+
flow.spacer width: 8
|
|
137
|
+
flow.button(
|
|
138
|
+
text: 'windows/print',
|
|
139
|
+
onClick: ->(action) do
|
|
140
|
+
action.windows_print
|
|
141
|
+
end
|
|
142
|
+
)
|
|
143
|
+
flow.spacer width: 8
|
|
144
|
+
flow.button(
|
|
145
|
+
text: 'windows/closeWithReload',
|
|
146
|
+
onClick: ->(action) do
|
|
147
|
+
action.windows_closeWithReload fallbackUrl: json_ui_garage_url(path: 'home/index')
|
|
148
|
+
end
|
|
149
|
+
)
|
|
150
|
+
flow.spacer width: 8
|
|
151
|
+
flow.button(
|
|
152
|
+
text: 'windows/closeAll',
|
|
153
|
+
onClick: ->(action) do
|
|
154
|
+
action.windows_closeAll onClose: ->(subaction) do
|
|
155
|
+
subaction.windows_open url: json_ui_garage_url(path: 'home/index')
|
|
104
156
|
end
|
|
105
157
|
end
|
|
106
158
|
)
|
|
@@ -116,11 +168,17 @@ page.body(
|
|
|
116
168
|
res.button(
|
|
117
169
|
text: 'windows/open (with loader)',
|
|
118
170
|
onClick: ->(action) do
|
|
119
|
-
action.windows_open
|
|
120
|
-
|
|
121
|
-
|
|
171
|
+
action.windows_open(
|
|
172
|
+
url: json_ui_garage_url(path: 'home/blank', sleep: true),
|
|
173
|
+
loaderViews: ->(view) do
|
|
174
|
+
view.panels_responsive(
|
|
175
|
+
padding: { all: 16 },
|
|
176
|
+
childViews: ->(subres) do
|
|
177
|
+
subres.skeleton template: 'bigProgressCircle'
|
|
178
|
+
end
|
|
179
|
+
)
|
|
122
180
|
end
|
|
123
|
-
|
|
181
|
+
)
|
|
124
182
|
end
|
|
125
183
|
)
|
|
126
184
|
end
|
|
@@ -38,7 +38,6 @@ module RuboCop
|
|
|
38
38
|
return if proper_parentheses_style?(node)
|
|
39
39
|
return if proper_backslash_style?(node) && allow_backslash?
|
|
40
40
|
return if inside_correctable_parent?(node)
|
|
41
|
-
return if assignment_method?(node)
|
|
42
41
|
|
|
43
42
|
add_offense(node) do |corrector|
|
|
44
43
|
autocorrect(corrector, node)
|
|
@@ -53,13 +52,6 @@ module RuboCop
|
|
|
53
52
|
node.multiline? && node.arguments.any?
|
|
54
53
|
end
|
|
55
54
|
|
|
56
|
-
def assignment_method?(node)
|
|
57
|
-
# Skip setter methods (e.g., response.body=, foo.bar=)
|
|
58
|
-
# These are written as assignments (response.body = ...) and shouldn't
|
|
59
|
-
# be converted to method call style (response.body(...))
|
|
60
|
-
node.method_name.to_s.end_with?('=')
|
|
61
|
-
end
|
|
62
|
-
|
|
63
55
|
def allow_backslash?
|
|
64
56
|
# Allow backslash style without warnings when configured
|
|
65
57
|
# Set to true to allow both styles (but auto-correct will still convert to parentheses)
|