Skip to content

Commit 3facc08

Browse files
author
Lionel Bijaoui
committed
Add a is-checked class to element where the input is checked to ease customisation. Add checklist back into the schema of dev
1 parent a878aac commit 3facc08

File tree

3 files changed

+57
-3
lines changed

3 files changed

+57
-3
lines changed

dev/full/schema.js

+54
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,60 @@ module.exports = {
194194
model: "",
195195
styleClasses: "alert alert-info"
196196
}, {
197+
type: "checklist",
198+
label: "CHECKLIST combobox",
199+
model: "checklistcombobox",
200+
listBox: false,
201+
values: [{
202+
name: "HTML5",
203+
value: "HTML5-123"
204+
}, {
205+
name: "Javascript",
206+
value: "Javascript-123"
207+
}, {
208+
name: "CSS3",
209+
value: "CSS3-123"
210+
}, {
211+
name: "CoffeeScript",
212+
value: "CoffeeScript-123"
213+
}, {
214+
name: "AngularJS",
215+
value: "AngularJS-123"
216+
}, {
217+
name: "ReactJS",
218+
value: "ReactJS-123"
219+
}, {
220+
name: "VueJS",
221+
value: "VueJS-123"
222+
}],
223+
}, {
224+
type: "checklist",
225+
label: "CHECKLIST listBox",
226+
model: "checklistlistbox",
227+
listBox: true,
228+
values: [{
229+
name: "HTML5",
230+
value: "HTML5-123"
231+
}, {
232+
name: "Javascript",
233+
value: "Javascript-123"
234+
}, {
235+
name: "CSS3",
236+
value: "CSS3-123"
237+
}, {
238+
name: "CoffeeScript",
239+
value: "CoffeeScript-123"
240+
}, {
241+
name: "AngularJS",
242+
value: "AngularJS-123"
243+
}, {
244+
name: "ReactJS",
245+
value: "ReactJS-123"
246+
}, {
247+
name: "VueJS",
248+
value: "VueJS-123"
249+
}],
250+
}, {
197251
type: "radios",
198252
label: "RADIOS",
199253
model: "radios",

src/fields/core/fieldChecklist.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template lang="pug">
22
.wrapper
33
.listbox.form-control(v-if="schema.listBox", :disabled="disabled")
4-
.list-row(v-for="item in items")
4+
.list-row(v-for="item in items", :class="{'is-checked': getItemIsChecked(item)}")
55
label
66
input(type="checkbox", :checked="getItemIsChecked(item)", :disabled="disabled", @change="onChanged($event, item)")
77
| {{ getItemName(item) }}
@@ -12,7 +12,7 @@
1212
.arrow
1313

1414
.dropList
15-
.list-row(v-if="comboExpanded", v-for="item in items")
15+
.list-row(v-if="comboExpanded", v-for="item in items", :class="{'is-checked': getItemIsChecked(item)}")
1616
label
1717
input(type="checkbox", :checked="getItemIsChecked(item)", :disabled="disabled", @change="onChanged($event, item)")
1818
| {{ getItemName(item) }}

src/fields/core/fieldRadios.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template lang="pug">
22
.radio-list(:disabled="disabled")
3-
label(v-for="item in items")
3+
label(v-for="item in items", :class="{'is-checked': isItemChecked(item)}")
44
input(type="radio", :disabled="disabled", :name="id", @click="onSelection(item)", :value="getItemValue(item)", :checked="isItemChecked(item)" )
55
| {{ getItemName(item) }}
66

0 commit comments

Comments
 (0)