glib-web 3.6.1 → 3.8.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: 59361d799d0e2b863064eccae8545b2236c1fa3bbcbc9a72a406a6ba1e901276
4
- data.tar.gz: '08fa2c03dda23e2ed7981ecf706afd74169070475e61118a70b956545192daf7'
3
+ metadata.gz: cf2fd0a2fb456ec43544ac78429614c92a9a8d9200e0f9f142c7ff4cb39d8e4a
4
+ data.tar.gz: 2bb68116d48ae777d99aa60f4f5ac6354a7197c893efd5ea84e138d52077bf34
5
5
  SHA512:
6
- metadata.gz: d074f82f77150808e4fbfb8e847b531a569039f8213be67eb00db3aaef6c892e6a6607fc5430c73fae83168ce37d1f50f7be96ac946a48f443d02fe87604f721
7
- data.tar.gz: d9be01d9fea99852bacad975b3b7ab24f495c5b08c80da83c0814c1e8420fc3828f3f142eebdeca4de2d032008ed1a751786dbc039f13ab83ec662b821e9a2f4
6
+ metadata.gz: cb3239869961fcae2d0bf36193b0cdb58d48fa1224dc8cc19f93954cbe0579679392f8f59e9d5fd3055836f0895fe3cf294b857a5d7991e926a429f5393f2b5c
7
+ data.tar.gz: 0a9b08633f1ceb5213c8a719c816e6fef23e0ff7305ae2aafd0e07bb43aab32f591f639ee77856253cf0ed311fffdf2c19f1bf56cca0d8b65be395428ee4f1a5
@@ -42,6 +42,7 @@ module Glib
42
42
  singleton_array :styleClass, :styleClasses
43
43
  hash :showIf
44
44
  hash :valueIf
45
+ hash :loadIf
45
46
  hash :analytics
46
47
  # hash :tooltip
47
48
  array :extensions
@@ -15,5 +15,5 @@ page.form options.merge(childViews: ->(form) do
15
15
  form.fields_text name: "user[field#{i}]", width: 'matchParent', label: "Field#{i}"
16
16
  end
17
17
  form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
18
- form.fab icon: 'send', onClick: ->(action) { action.forms_submit }
18
+ form.fab icon: 'send', styleClasses: ['primary', 'icon'], onClick: ->(action) { action.forms_submit }
19
19
  end)
@@ -186,6 +186,80 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
186
186
  end
187
187
  end
188
188
 
189
+ form.spacer height: 20
190
+ form.h1 text: 'Show/hide without send data'
191
+ form.fields_check name: 'user[loadif1]', label: 'Show one field', checkValue: 'true', uncheckValue: 'false', value: 'true'
192
+ form.spacer height: 4
193
+ form.fields_text \
194
+ name: 'user[loadif_target1]', value: 'This field should not be submitted when it is hidden',
195
+ width: 'matchParent',
196
+ loadIf: {
197
+ "==": [
198
+ {
199
+ "var": 'user[loadif1]'
200
+ },
201
+ 'true'
202
+ ]
203
+ }
204
+
205
+ form.spacer height: 8
206
+ form.fields_check name: 'user[loadif2]', label: 'Show & hide many field', checkValue: 'true', uncheckValue: 'false', value: 'false'
207
+ form.spacer height: 4
208
+ form.panels_responsive \
209
+ width: 'matchParent',
210
+ loadIf: {
211
+ "==": [
212
+ {
213
+ "var": 'user[loadif2]'
214
+ },
215
+ 'true'
216
+ ]
217
+ },
218
+ childViews: ->(res) do
219
+ form.fields_text name: 'user[loadif_target2]', width: 'matchParent', value: 'Value 1'
220
+ form.spacer height: 4
221
+ form.fields_textarea name: 'user[loadif_target3]', width: 'matchParent', value: 'Value 2'
222
+ form.spacer height: 4
223
+ end
224
+
225
+ form.panels_responsive \
226
+ width: 'matchParent',
227
+ loadIf: {
228
+ "==": [
229
+ {
230
+ "var": 'user[loadif2]'
231
+ },
232
+ 'false'
233
+ ]
234
+ },
235
+ childViews: ->(res) do
236
+ form.fields_richText name: 'user[loadIf_target4]', width: 'matchParent', value: 'Value 3'
237
+ form.spacer height: 4
238
+ form.fields_radioGroup name: 'user[loadIf_target5]', width: 'matchParent', value: 'choice_1', childViews: ->(group) do
239
+ group.fields_radio label: 'Choice 1', value: 'choice_1'
240
+ group.fields_radio label: 'Choice 2', value: 'choice_2'
241
+ group.fields_radio label: 'Choice 3', value: 'choice_3'
242
+ end
243
+ end
244
+
245
+ form.spacer height: 8
246
+ form.fields_check name: 'user[loadif3]', label: 'Show target nested panels', checkValue: 'true', uncheckValue: 'false', value: 'false'
247
+
248
+ form.panels_responsive \
249
+ loadIf: { "==": [{ "var": 'user[loadif3]' }, 'true'] },
250
+ styleClass: 'border-2',
251
+ width: 'matchParent',
252
+ padding: { top: 8, right: 8, bottom: 8, left: 8 },
253
+ childViews: ->(res) do
254
+ res.panels_responsive \
255
+ styleClass: 'border-2',
256
+ width: 'matchParent',
257
+ padding: { top: 8, right: 8, bottom: 8, left: 8 },
258
+ childViews: ->(sres) do
259
+ sres.fields_text name: 'user[loadif_target6]', width: 'matchParent', value: 'Value 4'
260
+ end
261
+ end
262
+
189
263
  form.spacer height: 20
190
264
  form.fields_submit text: 'Submit'
191
265
 
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: 3.6.1
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''