File tree Expand file tree Collapse file tree 16 files changed +55
-53
lines changed Expand file tree Collapse file tree 16 files changed +55
-53
lines changed Original file line number Diff line number Diff line change 57
57
</k-draggable >
58
58
59
59
<!-- No blocks -->
60
- <k-empty class =" k-blocks-empty" icon =" box" @click =" choose(blocks.length)" >
60
+ <k-empty
61
+ class =" k-blocks-empty"
62
+ icon =" box"
63
+ v-on =" !disabled ? { click: () => choose(blocks.length) } : {}"
64
+ >
61
65
{{ empty ?? $t("field.blocks.empty") }}
62
66
</k-empty >
63
67
</template >
Original file line number Diff line number Diff line change 14
14
@input =" update({ text: $event })"
15
15
/>
16
16
<k-input
17
- v-if =" levels.length > 1"
17
+ v-if =" levels.length > 1 && !disabled "
18
18
ref =" level"
19
- :disabled =" disabled"
20
19
:empty =" false"
21
20
:options =" levels"
22
21
:value =" content.level"
Original file line number Diff line number Diff line change @@ -78,12 +78,6 @@ export default {
78
78
.k-field [data-disabled = " true" ] {
79
79
cursor : not-allowed ;
80
80
}
81
- .k-field [data-disabled = " true" ] * {
82
- pointer-events : none ;
83
- }
84
- .k-field [data-disabled = " true" ] .k-text [data-theme = " help" ] * {
85
- pointer-events : initial ;
86
- }
87
81
.k-field-header {
88
82
display : flex ;
89
83
justify-content : space-between ;
Original file line number Diff line number Diff line change 48
48
<span v-html =" currentOption.text" />
49
49
</template >
50
50
51
- <template v-if =" mode === ' picker' " #icon >
51
+ <template v-if =" mode === ' picker' && ! disabled " #icon >
52
52
<k-button
53
53
:icon =" icon"
54
54
class =" k-input-icon-button"
Original file line number Diff line number Diff line change 14
14
@input =" onDateInput"
15
15
@submit =" $emit('submit')"
16
16
>
17
- <template v-if =" calendar " #icon >
17
+ <template v-if =" calendar && ! disabled " #icon >
18
18
<k-button
19
- :disabled =" disabled"
20
19
:icon =" icon"
21
20
:title =" $t('date.select')"
22
21
class =" k-input-icon-button"
47
46
@input =" onTimeInput"
48
47
@submit =" $emit('submit')"
49
48
>
50
- <template v-if =" times " #icon >
49
+ <template v-if =" times && ! disabled " #icon >
51
50
<k-button
52
- :disabled =" disabled"
53
51
:icon =" time.icon ?? 'clock'"
54
52
:title =" $t('time.select')"
55
53
class =" k-input-icon-button"
Original file line number Diff line number Diff line change 13
13
>
14
14
<template #icon >
15
15
<k-button
16
- v-if =" link"
16
+ v-if =" link && mailto "
17
17
:icon =" icon"
18
18
:link =" mailto"
19
19
:title =" $t('open')"
Original file line number Diff line number Diff line change 35
35
:value =" JSON.stringify(entries)"
36
36
>
37
37
<!-- Empty State -->
38
- <k-empty v-if =" entries.length === 0" icon =" list-bullet" @click =" add()" >
38
+ <k-empty
39
+ v-if =" entries.length === 0"
40
+ icon =" list-bullet"
41
+ v-on =" !disabled ? { click: add } : {}"
42
+ >
39
43
{{ empty ?? $t("field.entries.empty") }}
40
44
</k-empty >
41
45
Original file line number Diff line number Diff line change 23
23
>
24
24
<k-collection
25
25
v-bind =" collection"
26
- @empty = " open"
26
+ v-on = " !disabled ? { empty: open } : {} "
27
27
@sort =" onInput"
28
28
@sort-change =" $emit('change', $event)"
29
29
>
@@ -168,9 +168,3 @@ export default {
168
168
}
169
169
};
170
170
</script >
171
-
172
- <style >
173
- .k-models-field [data-disabled = " true" ] .k-item * {
174
- pointer-events : all !important ;
175
- }
176
- </style >
Original file line number Diff line number Diff line change 46
46
</template >
47
47
</tbody >
48
48
</table >
49
- <k-empty v-else icon =" box" @click =" add" >
49
+
50
+ <k-empty v-else icon =" box" v-on =" !disabled ? { click: add } : {}" >
50
51
{{ empty ?? $t("field.object.empty") }}
51
52
</k-empty >
52
53
</template >
53
- <template v-else >
54
- <k-empty icon =" box" >{{ $t("fields.empty") }}</k-empty >
55
- </template >
54
+
55
+ <k-empty v-else icon =" box" >{{ $t("fields.empty") }}</k-empty >
56
56
57
57
<!-- Validation -->
58
58
<input
Original file line number Diff line number Diff line change 14
14
variant =" filled"
15
15
/>
16
16
<k-button-group v-else >
17
- <template v-if =" canSelect " >
18
- <k-button v-bind =" batchEditingToggle" size =" xs" variant =" filled" />
19
- </template >
17
+ <k-button
18
+ v-if =" canSelect"
19
+ v-bind =" batchEditingToggle"
20
+ size =" xs"
21
+ variant =" filled"
22
+ />
23
+
20
24
<k-button-group layout =" collapsed" >
21
25
<k-button
22
26
:autofocus =" autofocus"
62
66
>
63
67
<template v-if =" hasFields " >
64
68
<!-- Empty State -->
65
- <k-empty v-if =" items.length === 0" icon =" list-bullet" @click =" add()" >
69
+ <k-empty
70
+ v-if =" items.length === 0"
71
+ icon =" list-bullet"
72
+ v-on =" !disabled ? { click: add } : {}"
73
+ >
66
74
{{ empty ?? $t("field.structure.empty") }}
67
75
</k-empty >
68
76
80
88
:selecting =" isSelecting"
81
89
:selected =" selected"
82
90
:sortable =" isSortable"
91
+ class =" k-structure-field-table"
83
92
@cell =" open($event.row, $event.columnIndex)"
84
93
@input =" onTableInput"
85
94
@option =" option"
@@ -620,11 +629,8 @@ export default {
620
629
margin- top: var (-- spacing- 3 );
621
630
}
622
631
623
- /* Allow interaction with disabled structure field to open the drawer */
624
- .k - structure- field[data - disabled= " true" ] {
632
+ /* Restore cursor for disabled structure field content */
633
+ .k - structure- field- table[aria - disabled= " true" ] {
625
634
cursor: initial;
626
635
}
627
- .k - structure- field[data- disabled= " true" ] * {
628
- pointer- events: initial;
629
- }
630
636
< / style>
You can’t perform that action at this time.
0 commit comments