@@ -136,7 +136,7 @@ module.exports = {
136
136
type : "input" ,
137
137
inputType : "range" ,
138
138
label : "Range" ,
139
- model : "range " ,
139
+ model : "age " ,
140
140
styleClasses : "half-width"
141
141
} ,
142
142
{
@@ -149,7 +149,7 @@ module.exports = {
149
149
{
150
150
type : "input" ,
151
151
inputType : "checkbox" ,
152
- label : "Checkbox" ,
152
+ label : "Checkbox (show useless) " ,
153
153
model : "checkbox" ,
154
154
styleClasses : "half-width"
155
155
} ,
@@ -159,48 +159,55 @@ module.exports = {
159
159
label : "Search USELESS" ,
160
160
model : "search" ,
161
161
placeholder : "Entrez un mot-clef" ,
162
- styleClasses : "half-width"
162
+ styleClasses : "half-width" ,
163
+ visible ( model ) { return model . checkbox }
163
164
} ,
164
165
{
165
166
type : "input" ,
166
167
inputType : "radio" ,
167
168
label : "radio USELESS" ,
168
169
model : "radio" ,
169
- styleClasses : "half-width"
170
+ styleClasses : "half-width" ,
171
+ visible ( model ) { return model . checkbox }
170
172
} ,
171
173
{
172
174
type : "input" ,
173
175
inputType : "file" ,
174
176
label : "File USELESS" ,
175
177
model : "file" ,
178
+ visible ( model ) { return model . checkbox }
176
179
} ,
177
180
{
178
181
type : "input" ,
179
182
inputType : "image" ,
180
183
label : "Image USELESS" ,
181
184
model : "image" ,
182
- styleClasses : "half-width"
185
+ styleClasses : "half-width" ,
186
+ visible ( model ) { return model . checkbox }
183
187
} ,
184
188
{
185
189
type : "input" ,
186
190
inputType : "button" ,
187
191
label : "Button USELESS" ,
188
192
model : "button" ,
189
- styleClasses : "half-width"
193
+ styleClasses : "half-width" ,
194
+ visible ( model ) { return model . checkbox }
190
195
} ,
191
196
{
192
197
type : "input" ,
193
198
inputType : "reset" ,
194
199
label : "Reset USELESS" ,
195
200
model : "reset" ,
196
- styleClasses : "half-width"
201
+ styleClasses : "half-width" ,
202
+ visible ( model ) { return model . checkbox }
197
203
} ,
198
204
{
199
205
type : "input" ,
200
206
inputType : "submit" ,
201
207
label : "Submit USELESS" ,
202
208
model : "submit" ,
203
- styleClasses : "half-width"
209
+ styleClasses : "half-width" ,
210
+ visible ( model ) { return model . checkbox }
204
211
} ,
205
212
206
213
/**************/
@@ -354,23 +361,6 @@ module.exports = {
354
361
model : "" ,
355
362
styleClasses : "alert alert-info"
356
363
} ,
357
- {
358
- type : "selectEx" ,
359
- label : "Country (selectEx field)" ,
360
- model : "address.country" ,
361
- multi : true ,
362
- required : true ,
363
- values : [ "United Kingdom" , "France" , "Germany" ] ,
364
- //default: "United Kingdom",
365
- multiSelect : false ,
366
- selectOptions : {
367
- // https://silviomoreto.github.io/bootstrap-select/options/
368
- liveSearch : true ,
369
- size : 10
370
- } ,
371
- styleClasses : [ "half-width" , "first" ] ,
372
- validator : validators . required
373
- } ,
374
364
{
375
365
type : "spectrum" ,
376
366
label : "Color (spectrum field)" ,
@@ -386,22 +376,26 @@ module.exports = {
386
376
label : "Mobile (masked field)" ,
387
377
model : "mobile" ,
388
378
mask : "(99) 999-9999" ,
389
- styleClasses : "half-width" ,
379
+ styleClasses : [ "half-width" , "first" ] ,
390
380
validator : validators . required
391
- } ,
381
+ } ,
392
382
{
393
- type : "rangeSlider " ,
394
- label : "Income " ,
395
- model : "income " ,
383
+ type : "selectEx " ,
384
+ label : "Country (selectEx field) " ,
385
+ model : "address.country " ,
396
386
multi : true ,
397
- min : 0 ,
398
- max : 100000 ,
399
- rangeSliderOptions : {
400
- type : "double" ,
401
- prefix : "$" ,
402
- step : 1000
403
- }
404
- } ,
387
+ required : true ,
388
+ values : [ "United Kingdom" , "France" , "Germany" ] ,
389
+ //default: "United Kingdom",
390
+ multiSelect : false ,
391
+ selectOptions : {
392
+ // https://silviomoreto.github.io/bootstrap-select/options/
393
+ liveSearch : true ,
394
+ size : 10
395
+ } ,
396
+ styleClasses : "half-width" ,
397
+ validator : validators . required
398
+ } ,
405
399
{
406
400
type : "selectEx" ,
407
401
label : "Skills (selectEx field)" ,
@@ -435,14 +429,28 @@ module.exports = {
435
429
label : "Rank (rangeSlider field)" ,
436
430
model : "rank" ,
437
431
multi : true ,
438
- min : 1 ,
432
+ min : 0 ,
439
433
max : 10 ,
440
434
required : true ,
441
- sliderOptions : {
435
+ rangeSliderOptions : {
442
436
grid : true
443
437
} ,
444
- // validator: validators.integer
438
+ validator : validators . integer
445
439
} ,
440
+ // {
441
+ // type: "rangeSlider",
442
+ // label: "Income",
443
+ // model: "income",
444
+ // multi: true,
445
+ // min: 0,
446
+ // max: 100000,
447
+ // rangeSliderOptions: {
448
+ // type: "double",
449
+ // prefix: "$",
450
+ // step: 1000,
451
+ // force_edges: true
452
+ // }
453
+ // },
446
454
{
447
455
type : "dateTimePicker" ,
448
456
label : "DOB (dateTimePicker field)" ,
@@ -519,8 +527,8 @@ module.exports = {
519
527
max : 10 ,
520
528
required : true ,
521
529
disabled : false ,
522
- sliderOptions : {
523
- // connect: "lower", // "lower", "upper", true, false
530
+ noUiSliderOptions : {
531
+ connect : "lower" , // "lower", "upper", true, false
524
532
// margin: 2 //number
525
533
// limit: 2 //number
526
534
step :1 ,
@@ -538,8 +546,38 @@ module.exports = {
538
546
density : 10 ,
539
547
stepped : true
540
548
}
541
- } ,
542
- // validator: validators.integer
549
+ }
550
+ } ,
551
+ {
552
+ type : "noUiSlider" ,
553
+ label : "Rank (noUiSlider field)" ,
554
+ model : "income" ,
555
+ multi : true ,
556
+ min : 0 ,
557
+ max : 100000 ,
558
+ required : true ,
559
+ disabled : false ,
560
+ noUiSliderOptions : {
561
+ double :true ,
562
+ connect : true , // "lower", "upper", true, false
563
+ // margin: 2 //number
564
+ // limit: 2 //number
565
+ step : 1000 ,
566
+ // orientation:"vertical", //"vertical", "horizontal"
567
+ // direction: "ltr", //"ltr", "rtl"
568
+ tooltips : true , // false, true, formatter, array[formatter or false]
569
+ animate : false ,
570
+ range :{
571
+ 'min' : [ 0 ] ,
572
+ 'max' : [ 100000 ]
573
+ } ,
574
+ pips : {
575
+ mode : 'count' ,
576
+ values : 6 ,
577
+ density : 10 ,
578
+ stepped : true
579
+ }
580
+ }
543
581
} ,
544
582
{
545
583
type : "cleave" ,
0 commit comments