Skip to content

Commit b932e95

Browse files
Scheduler Timeline Demo: Update UI Texts (#33183)
Co-authored-by: Sergei Burkatskii <sjbur.dev@gmail.com>
1 parent 915e534 commit b932e95

13 files changed

Lines changed: 60 additions & 40 deletions

File tree

apps/demos/Demos/Scheduler/Timelines/Angular/app/app.component.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
44
width: 100px;
55
}
66

7+
::ng-deep .dx-scheduler-appointment-content {
8+
color: white;
9+
}
10+
711
.options {
812
padding: 20px;
913
background-color: rgba(191, 191, 191, 0.15);
1014
margin-top: 20px;
1115
}
1216

17+
.caption {
18+
font-size: 18px;
19+
font-weight: 500;
20+
}
21+
1322
.option {
1423
margin-top: 10px;
1524
display: flex;

apps/demos/Demos/Scheduler/Timelines/Angular/app/app.component.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@
2929
></dxi-scheduler-resource>
3030
</dx-scheduler>
3131
<div class="options">
32+
<div class="caption">Options</div>
3233
<div class="option">
33-
<span>Snap to Cells Mode:</span>
34+
<span>Snap to Grid:</span>
3435
<dx-select-box
3536
[items]="snapToCellsModeItems"
36-
valueExpr="value"
37-
displayExpr="text"
3837
[value]="snapToCellsMode"
3938
(onValueChanged)="onSnapToCellsModeChanged($event)"
4039
></dx-select-box>

apps/demos/Demos/Scheduler/Timelines/Angular/app/app.component.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ export class AppComponent {
3838

3939
snapToCellsMode: DxSchedulerTypes.SnapToCellsMode = 'always';
4040

41-
snapToCellsModeItems = [
42-
{ value: 'auto', text: 'Auto' },
43-
{ value: 'always', text: 'Always' },
44-
{ value: 'never', text: 'Never' },
45-
];
41+
snapToCellsModeItems: DxSchedulerTypes.SnapToCellsMode[] = ['auto', 'always', 'never'];
4642

4743
constructor(service: Service) {
4844
this.appointmentsData = service.getAppointments();

apps/demos/Demos/Scheduler/Timelines/React/App.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ const currentDate = new Date(2021, 1, 2);
1313
const views: SchedulerTypes.ViewType[] = ['timelineDay', 'timelineWeek', 'timelineWorkWeek', 'timelineMonth'];
1414
const groups = ['priority'];
1515

16-
const snapToCellsModeItems: { value: SchedulerTypes.SnapToCellsMode; text: string }[] = [
17-
{ value: 'auto', text: 'Auto' },
18-
{ value: 'always', text: 'Always' },
19-
{ value: 'never', text: 'Never' },
20-
];
16+
const snapToCellsModeItems: SchedulerTypes.SnapToCellsMode[] = ['auto', 'always', 'never'];
2117

2218
const App = () => {
2319
const [snapToCellsMode, setSnapToCellsMode] = useState<SchedulerTypes.SnapToCellsMode>('always');
@@ -59,12 +55,11 @@ const App = () => {
5955
/>
6056
</Scheduler>
6157
<div className="options">
58+
<div className="caption">Options</div>
6259
<div className="option">
63-
<span>Snap to Cells Mode:</span>
60+
<span>Snap to Grid:</span>
6461
<SelectBox
6562
items={snapToCellsModeItems}
66-
valueExpr="value"
67-
displayExpr="text"
6863
value={snapToCellsMode}
6964
onValueChanged={onSnapToCellsModeChanged}
7065
/>

apps/demos/Demos/Scheduler/Timelines/React/styles.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
44
width: 100px;
55
}
66

7+
.dx-scheduler-appointment-content {
8+
color: white;
9+
}
10+
711
.options {
812
padding: 20px;
913
background-color: rgba(191, 191, 191, 0.15);
1014
margin-top: 20px;
1115
}
1216

17+
.caption {
18+
font-size: 18px;
19+
font-weight: 500;
20+
}
21+
1322
.option {
1423
margin-top: 10px;
1524
display: flex;

apps/demos/Demos/Scheduler/Timelines/ReactJs/App.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ import { data, resourcesData, priorityData } from './data.js';
66
const currentDate = new Date(2021, 1, 2);
77
const views = ['timelineDay', 'timelineWeek', 'timelineWorkWeek', 'timelineMonth'];
88
const groups = ['priority'];
9-
const snapToCellsModeItems = [
10-
{ value: 'auto', text: 'Auto' },
11-
{ value: 'always', text: 'Always' },
12-
{ value: 'never', text: 'Never' },
13-
];
9+
const snapToCellsModeItems = ['auto', 'always', 'never'];
1410
const App = () => {
1511
const [snapToCellsMode, setSnapToCellsMode] = useState('always');
1612
const onSnapToCellsModeChanged = useCallback((e) => {
@@ -49,12 +45,11 @@ const App = () => {
4945
/>
5046
</Scheduler>
5147
<div className="options">
48+
<div className="caption">Options</div>
5249
<div className="option">
53-
<span>Snap to Cells Mode:</span>
50+
<span>Snap to Grid:</span>
5451
<SelectBox
5552
items={snapToCellsModeItems}
56-
valueExpr="value"
57-
displayExpr="text"
5853
value={snapToCellsMode}
5954
onValueChanged={onSnapToCellsModeChanged}
6055
/>

apps/demos/Demos/Scheduler/Timelines/ReactJs/styles.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
44
width: 100px;
55
}
66

7+
.dx-scheduler-appointment-content {
8+
color: white;
9+
}
10+
711
.options {
812
padding: 20px;
913
background-color: rgba(191, 191, 191, 0.15);
1014
margin-top: 20px;
1115
}
1216

17+
.caption {
18+
font-size: 18px;
19+
font-weight: 500;
20+
}
21+
1322
.option {
1423
margin-top: 10px;
1524
display: flex;

apps/demos/Demos/Scheduler/Timelines/Vue/App.vue

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@
3030
/>
3131
</DxScheduler>
3232
<div class="options">
33+
<div class="caption">Options</div>
3334
<div class="option">
34-
<span>Snap to Cells Mode:</span>
35+
<span>Snap to Grid:</span>
3536
<DxSelectBox
3637
:items="snapToCellsModeItems"
37-
value-expr="value"
38-
display-expr="text"
3938
:value="snapToCellsMode"
4039
@value-changed="onSnapToCellsModeChanged"
4140
/>
@@ -57,11 +56,7 @@ const groups = ['priority'];
5756
const currentDate = new Date(2021, 1, 2);
5857
const dataSource = data;
5958
60-
const snapToCellsModeItems: { value: DxSchedulerTypes.SnapToCellsMode; text: string }[] = [
61-
{ value: 'auto', text: 'Auto' },
62-
{ value: 'always', text: 'Always' },
63-
{ value: 'never', text: 'Never' },
64-
];
59+
const snapToCellsModeItems: DxSchedulerTypes.SnapToCellsMode[] = ['auto', 'always', 'never'];
6560
6661
const snapToCellsMode = ref<DxSchedulerTypes.SnapToCellsMode>('always');
6762
@@ -77,12 +72,21 @@ function onSnapToCellsModeChanged(e: DxSelectBoxTypes.ValueChangedEvent) {
7772
width: 100px;
7873
}
7974
75+
.dx-scheduler-appointment-content {
76+
color: white;
77+
}
78+
8079
.options {
8180
padding: 20px;
8281
background-color: rgba(191, 191, 191, 0.15);
8382
margin-top: 20px;
8483
}
8584
85+
.caption {
86+
font-size: 18px;
87+
font-weight: 500;
88+
}
89+
8690
.option {
8791
margin-top: 10px;
8892
display: flex;

apps/demos/Demos/Scheduler/Timelines/jQuery/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
<div class="demo-container">
1717
<div id="scheduler"></div>
1818
<div class="options">
19+
<div class="caption">Options</div>
1920
<div class="option">
20-
<span>Snap to Cells Mode:</span>
21+
<span>Snap to Grid:</span>
2122
<div id="snap-to-cells-mode"></div>
2223
</div>
2324
</div>

apps/demos/Demos/Scheduler/Timelines/jQuery/index.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@ $(() => {
2929
}).dxScheduler('instance');
3030

3131
$('#snap-to-cells-mode').dxSelectBox({
32-
items: [
33-
{ value: 'auto', text: 'Auto' },
34-
{ value: 'always', text: 'Always' },
35-
{ value: 'never', text: 'Never' },
36-
],
37-
valueExpr: 'value',
38-
displayExpr: 'text',
32+
items: ['auto', 'always', 'never'],
3933
value: scheduler.option('snapToCellsMode'),
4034
onValueChanged(e) {
4135
scheduler.option('snapToCellsMode', e.value);

0 commit comments

Comments
 (0)