Skip to content

Commit 9c92ed4

Browse files
committed
fix minor issues
1 parent 4adaf36 commit 9c92ed4

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<script src="../../../../node_modules/cldrjs/dist/cldr/event.js"></script>
1111
<script src="../../../../node_modules/cldrjs/dist/cldr/supplemental.js"></script>
1212
<script src="../../../../node_modules/cldrjs/dist/cldr/unresolved.js"></script>
13-
<link rel="stylesheet" type="text/css" href="../../../../node_modules/devextreme-dist/css/dx.material.blue.dark.css" />
13+
<link rel="stylesheet" type="text/css" href="../../../../node_modules/devextreme-dist/css/dx.light.css" />
1414
<script src="../../../../node_modules/devextreme-dist/js/dx.all.js"></script>
1515
<script src="data.js"></script>
1616
<link rel="stylesheet" type="text/css" href="styles.css" />

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ $(() => {
3232
},
3333
onAppointmentFormOpening(e) {
3434
form = e.form;
35-
window.x = form;
3635

3736
form.on('fieldDataChanged', (e) => {
3837
if (e.dataField === 'startDate') {
@@ -48,6 +47,7 @@ $(() => {
4847
{
4948
template: () => {
5049
$movieInfoContainer = $('<div class="movie-info-container">');
50+
updateMovieInfoContainer(movie);
5151
return $movieInfoContainer;
5252
},
5353
},
@@ -69,8 +69,7 @@ $(() => {
6969
onValueChanged(e) {
7070
const movie = getMovieById(e.value);
7171

72-
const $movieInfo = movieInfoTemplate(movie);
73-
$movieInfoContainer.empty().append($movieInfo);
72+
updateMovieInfoContainer(movie);
7473

7574
if (!form) {
7675
return;
@@ -159,6 +158,11 @@ $(() => {
159158
`);
160159
}
161160

161+
function updateMovieInfoContainer(movie) {
162+
const $movieInfo = movieInfoTemplate(movie);
163+
$movieInfoContainer.empty().append($movieInfo);
164+
}
165+
162166
function getEditorStylingMode() {
163167
return $('.dx-theme-fluent, .dx-theme-material').length > 0 ? 'filled' : 'outlined';
164168
}

packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,7 @@ export class AppointmentForm {
785785
return;
786786
}
787787

788-
const isSimpleItem = item.itemType === 'simple' || 'editorType' in item || 'editorOptions' in item;
789-
const isGroupItem = 'items' in item;
790-
791-
if (isSimpleItem) {
788+
if (item.itemType === 'simple') {
792789
const simpleItem = item as SimpleItem;
793790
const stylingMode = isFluent(current()) ? 'filled' : undefined;
794791

@@ -799,8 +796,9 @@ export class AppointmentForm {
799796
return;
800797
}
801798

802-
if (isGroupItem) {
803-
item.items?.forEach((child) => {
799+
if (item.itemType === 'group') {
800+
const groupItem = item as GroupItem;
801+
groupItem.items?.forEach((child) => {
804802
this.setStylingModeToEditors(child, showIcon);
805803
});
806804
}

packages/devextreme/js/__internal/scheduler/appointment_popup/m_popup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ export class AppointmentPopup {
163163
}
164164

165165
_updateForm(): void {
166-
this.form.showMainGroup(false);
167-
168166
const rawAppointment = this.state.appointment.data;
169167
const appointmentAdapter = this._createAppointmentAdapter(rawAppointment)
170168
.clone()
@@ -174,6 +172,8 @@ export class AppointmentPopup {
174172

175173
this.form.formData = formData;
176174
this.form.readOnly = this._isReadOnly(appointmentAdapter);
175+
176+
this.form.showMainGroup(false);
177177
}
178178

179179
_createFormData(appointmentAdapter: AppointmentAdapter): Record<string, any> {

0 commit comments

Comments
 (0)