diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__main-form__with-labelMode-static (generic.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__main-form__with-labelMode-static (generic.light).png new file mode 100644 index 000000000000..17b7b00d2f3c Binary files /dev/null and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__main-form__with-labelMode-static (generic.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__main-form__with-labelMode-static (material.blue.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__main-form__with-labelMode-static (material.blue.light).png new file mode 100644 index 000000000000..6e854b42344c Binary files /dev/null and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__main-form__with-labelMode-static (material.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__daily (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__daily (fluent.blue.light).png index 8fdb5ff204d2..d10c6419aefa 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__daily (fluent.blue.light).png and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__daily (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__hourly (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__hourly (fluent.blue.light).png index b431e91ed2cf..5b9e549c2be3 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__hourly (fluent.blue.light).png and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__hourly (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__mobile (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__mobile (fluent.blue.light).png index 924784a7155a..e28a1148fe9b 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__mobile (fluent.blue.light).png and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__mobile (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__monthly (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__monthly (fluent.blue.light).png index da23ddb3f1e6..837906ad7391 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__monthly (fluent.blue.light).png and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__monthly (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__readonly (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__readonly (fluent.blue.light).png index a81c27863970..71f952fa8b26 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__readonly (fluent.blue.light).png and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__readonly (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__weekly (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__weekly (fluent.blue.light).png index 1d45f179e0cd..1a523deb167b 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__weekly (fluent.blue.light).png and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__weekly (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__with-icons (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__with-icons (fluent.blue.light).png index c00a44a6db0f..eabaeba10d90 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__with-icons (fluent.blue.light).png and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__with-icons (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__with-labelMode-static (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__with-labelMode-static (fluent.blue.light).png index 3892cd4d9df8..a550e6b34cf1 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__with-labelMode-static (fluent.blue.light).png and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__with-labelMode-static (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__yearly (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__yearly (fluent.blue.light).png index 69c9e44a16e5..395855353dda 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__yearly (fluent.blue.light).png and b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/etalons/scheduler__appointment__recurrence-form__yearly (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/form.visual.ts b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/form.visual.ts index 0d61f2799deb..df8b17f9e7c0 100644 --- a/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/form.visual.ts +++ b/e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/form.visual.ts @@ -2,6 +2,7 @@ import Scheduler from 'devextreme-testcafe-models/scheduler'; import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; import { createWidget } from '../../../../helpers/createWidget'; import url from '../../../../helpers/getPageUrl'; +import { Themes } from '../../../../helpers/themes'; import { testScreenshot } from '../../../../helpers/themeUtils'; fixture.disablePageReloads`Appointment Form: Main Form` @@ -338,7 +339,10 @@ test.meta({ browserSize: [1500, 1500] })('Recurrence settings button should have }); }); -test.meta({ browserSize: [1500, 1500] })('appointment form with labelMode=static', async (t) => { +test.meta({ + browserSize: [1500, 1500], + themes: [Themes.genericLight, Themes.materialBlue, Themes.fluentBlue], +})('appointment form with labelMode=static', async (t) => { const { takeScreenshot, compareResults } = createScreenshotsComparer(t); const scheduler = new Scheduler(SCHEDULER_SELECTOR); diff --git a/packages/devextreme-scss/scss/widgets/base/scheduler/_index.scss b/packages/devextreme-scss/scss/widgets/base/scheduler/_index.scss index 309239cf053d..38bd26aa9cc9 100644 --- a/packages/devextreme-scss/scss/widgets/base/scheduler/_index.scss +++ b/packages/devextreme-scss/scss/widgets/base/scheduler/_index.scss @@ -503,6 +503,10 @@ $scheduler-appointment-form-label-padding: 20px; } } + .dx-scheduler-form-recurrence-group.dx-field-item { + padding: 0; + } + /* Icons alignment */ .dx-scheduler-form-group-with-icon .dx-item-content > .dx-box-item:has(.dx-scheduler-form-icon) { flex: 0 1 auto !important; // stylelint-disable-line declaration-no-important diff --git a/packages/devextreme-scss/scss/widgets/generic/scheduler/_index.scss b/packages/devextreme-scss/scss/widgets/generic/scheduler/_index.scss index 16f816c52700..d9dc355c03f4 100644 --- a/packages/devextreme-scss/scss/widgets/generic/scheduler/_index.scss +++ b/packages/devextreme-scss/scss/widgets/generic/scheduler/_index.scss @@ -285,6 +285,13 @@ $generic-scheduler-agenda-group-header-padding: $generic-scheduler-agenda-time-c } } + // Fix icon height and padding for floating and static input's label modes + .dx-item-content:has(.dx-texteditor-with-floating-label):not(:has(.dx-scheduler-form-all-day-switch)) .dx-scheduler-form-icon.dx-field-item, + .dx-item-content:has(.dx-texteditor-with-label):not(:has(.dx-scheduler-form-all-day-switch)) .dx-scheduler-form-icon.dx-field-item { + height: $generic-scheduler-appointment-popup-icon-static-label-container-height; + padding-top: $generic-scheduler-appointment-popup-icon-static-label-padding-top; + } + .dx-scheduler-form-icon-sized-gap { width: $generic-scheduler-appointment-popup-icon-size; } diff --git a/packages/devextreme-scss/scss/widgets/generic/scheduler/_sizes.scss b/packages/devextreme-scss/scss/widgets/generic/scheduler/_sizes.scss index 97a54afea79d..88289815d9ec 100644 --- a/packages/devextreme-scss/scss/widgets/generic/scheduler/_sizes.scss +++ b/packages/devextreme-scss/scss/widgets/generic/scheduler/_sizes.scss @@ -31,6 +31,8 @@ $generic-scheduler-appointment-popup-toolbar-height: null !default; $generic-scheduler-appointment-popup-toolbar-label-size: null !default; $generic-scheduler-appointment-popup-icon-size: null !default; $generic-scheduler-appointment-popup-icon-container-height: null !default; +$generic-scheduler-appointment-popup-icon-static-label-container-height: null !default; +$generic-scheduler-appointment-popup-icon-static-label-padding-top: null !default; $generic-scheduler-appointment-popup-icon-padding-right: null !default; $generic-scheduler-appointment-popup-icon-margin-top: null !default; $generic-scheduler-appointment-popup-icon-inner-label-margin-top: null !default; @@ -98,6 +100,8 @@ $generic-scheduler-group-header-agenda-font-size: 14px !default; $generic-scheduler-appointment-popup-toolbar-label-size: 20px !default; $generic-scheduler-appointment-popup-icon-size: 18px !default; $generic-scheduler-appointment-popup-icon-container-height: 36px !default; + $generic-scheduler-appointment-popup-icon-static-label-container-height: 42px !default; + $generic-scheduler-appointment-popup-icon-static-label-padding-top: 7px !default; $generic-scheduler-appointment-popup-icon-padding-right: 5px !default; $generic-scheduler-appointment-popup-icon-margin-top: 22px !default; $generic-scheduler-appointment-popup-icon-inner-label-margin-top: null !default; @@ -167,6 +171,8 @@ $generic-scheduler-group-header-agenda-font-size: 14px !default; $generic-scheduler-appointment-popup-toolbar-label-size: 18px !default; $generic-scheduler-appointment-popup-icon-size: 14px !default; $generic-scheduler-appointment-popup-icon-container-height: 26px !default; + $generic-scheduler-appointment-popup-icon-static-label-container-height: 26px !default; + $generic-scheduler-appointment-popup-icon-static-label-padding-top: 2px !default; $generic-scheduler-appointment-popup-icon-padding-right: 5px !default; $generic-scheduler-appointment-popup-icon-margin-top: 18px !default; $generic-scheduler-appointment-popup-icon-inner-label-margin-top: 4.5px !default; diff --git a/packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts b/packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts index b56f913186d5..bc913b50015c 100644 --- a/packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts +++ b/packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts @@ -1852,21 +1852,8 @@ describe('Appointment Form', () => { const mainFormIcons = POM.popup.mainGroup.querySelectorAll(`.${CLASSES.icon}`); const recurrenceFormIcons = POM.popup.recurrenceGroup.querySelectorAll(`.${CLASSES.icon}`); - expect(mainFormIcons.length).toBe(4); - expect(recurrenceFormIcons.length).toBe(3); - - const mainIconsCorrect = Array.from(mainFormIcons).every((icon) => { - const isVisible = !icon.classList.contains(CLASSES.hidden); - return isVisible === visibleMain; - }); - - const recurrenceIconsCorrect = Array.from(recurrenceFormIcons).every((icon) => { - const isVisible = !icon.classList.contains(CLASSES.hidden); - return isVisible === visibleRecurrence; - }); - - expect(mainIconsCorrect).toBe(true); - expect(recurrenceIconsCorrect).toBe(true); + expect(mainFormIcons.length).toBe(visibleMain ? 4 : 0); + expect(recurrenceFormIcons.length).toBe(visibleRecurrence ? 3 : 0); }); }); }); diff --git a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts index dc44f0c7be9a..2994adab4265 100644 --- a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts +++ b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts @@ -219,17 +219,18 @@ export class AppointmentForm { create(popup: any): void { this._popup = popup; - const mainGroup = this.createMainFormGroup(); + const iconsShowMode = this.getIconsShowMode(); + const showMainGroupIcons = ['main', 'both'].includes(iconsShowMode); + const showRecurrenceGroupIcons = ['recurrence', 'both'].includes(iconsShowMode); + + const mainGroup = this.createMainFormGroup(showMainGroupIcons); this._recurrenceForm = new RecurrenceForm(this.scheduler); - const recurrenceGroup = this._recurrenceForm.createRecurrenceFormGroup(); + const recurrenceGroup = this._recurrenceForm + .createRecurrenceFormGroup(showRecurrenceGroupIcons); const items = [mainGroup, recurrenceGroup]; - const iconsShowMode = this.getIconsShowMode(); - const showMainGroupIcons = ['main', 'both'].includes(iconsShowMode); - const showRecurrenceGroupIcons = ['recurrence', 'both'].includes(iconsShowMode); - this.setStylingModeToEditors(mainGroup, showMainGroupIcons); this.setStylingModeToEditors(recurrenceGroup, showRecurrenceGroupIcons); @@ -324,23 +325,23 @@ export class AppointmentForm { return this.scheduler.createComponent(element, dxForm, formOptions) as dxForm; } - private createMainFormGroup(): GroupItem { + private createMainFormGroup(showIcon: boolean): GroupItem { return { name: MAIN_GROUP_NAME, itemType: 'group', colSpan: 1, cssClass: CLASSES.mainGroup, items: [ - this.createSubjectGroup(), - this.createDateRangeGroup(), - this.createRepeatGroup(), - this.createResourcesGroup(), - this.createDescriptionGroup(), + this.createSubjectGroup(showIcon), + this.createDateRangeGroup(showIcon), + this.createRepeatGroup(showIcon), + this.createResourcesGroup(showIcon), + this.createDescriptionGroup(showIcon), ], } as GroupItem; } - private createSubjectGroup(): GroupItem { + private createSubjectGroup(showIcon: boolean): GroupItem { const { textExpr } = this.scheduler.getDataAccessors().expr; return { @@ -348,19 +349,18 @@ export class AppointmentForm { itemType: 'group', cssClass: `${CLASSES.subjectGroup} ${CLASSES.groupWithIcon}`, colCount: 2, - colCountByScreen: { - xs: 2, - }, + colCountByScreen: { xs: 2 }, items: [ { name: SUBJECT_ICON_NAME, colSpan: 1, cssClass: CLASSES.formIcon, template: createFormIconTemplate('isnotblank'), + visible: showIcon, }, { name: SUBJECT_EDITOR_NAME, - colSpan: 1, + colSpan: showIcon ? 1 : 2, itemType: 'simple', cssClass: CLASSES.textEditor, dataField: textExpr, @@ -373,24 +373,23 @@ export class AppointmentForm { } as GroupItem; } - private createDateRangeGroup(): GroupItem { + private createDateRangeGroup(showIcon: boolean): GroupItem { return { name: DATE_GROUP_NAME, itemType: 'group', cssClass: `${CLASSES.dateRangeGroup} ${CLASSES.groupWithIcon}`, colCount: 2, - colCountByScreen: { - xs: 2, - }, + colCountByScreen: { xs: 2 }, items: [ { name: DATE_ICON_NAME, colSpan: 1, cssClass: CLASSES.formIcon, template: createFormIconTemplate('clock'), + visible: showIcon, }, { - colSpan: 1, + colSpan: showIcon ? 1 : 2, name: DATE_OPTIONS_GROUP_NAME, itemType: 'group', items: [ @@ -653,16 +652,14 @@ export class AppointmentForm { } as GroupItem; } - private createRepeatGroup(): GroupItem { + private createRepeatGroup(showIcon: boolean): GroupItem { const { recurrenceRuleExpr } = this.scheduler.getDataAccessors().expr; return { name: REPEAT_GROUP_NAME, itemType: 'group', colCount: 2, - colCountByScreen: { - xs: 2, - }, + colCountByScreen: { xs: 2 }, cssClass: `${CLASSES.repeatGroup} ${CLASSES.groupWithIcon}`, items: [ { @@ -670,10 +667,11 @@ export class AppointmentForm { colSpan: 1, cssClass: CLASSES.formIcon, template: createFormIconTemplate('repeat'), + visible: showIcon, }, { name: REPEAT_EDITOR_NAME, - colSpan: 1, + colSpan: showIcon ? 1 : 2, itemType: 'simple', cssClass: CLASSES.repeatEditor, label: { @@ -709,16 +707,14 @@ export class AppointmentForm { } as GroupItem; } - private createDescriptionGroup(): GroupItem { + private createDescriptionGroup(showIcon: boolean): GroupItem { const { descriptionExpr } = this.scheduler.getDataAccessors().expr; return { name: DESCRIPTION_GROUP_NAME, itemType: 'group', colCount: 2, - colCountByScreen: { - xs: 2, - }, + colCountByScreen: { xs: 2 }, cssClass: `${CLASSES.descriptionGroup} ${CLASSES.groupWithIcon}`, items: [ { @@ -726,11 +722,12 @@ export class AppointmentForm { colSpan: 1, cssClass: CLASSES.formIcon, template: createFormIconTemplate('description'), + visible: showIcon, }, { name: DESCRIPTION_EDITOR_NAME, dataField: descriptionExpr, - colSpan: 1, + colSpan: showIcon ? 1 : 2, itemType: 'simple', cssClass: CLASSES.descriptionEditor, label: { @@ -745,7 +742,7 @@ export class AppointmentForm { } as GroupItem; } - private createResourcesGroup(): GroupItem { + private createResourcesGroup(showIcon: boolean): GroupItem { const resourcesLoaders: ResourceLoader[] = Object.values(this.scheduler.getResourceById()); let resourcesItems: FormItem[] = resourcesLoaders.map((resourceLoader) => { @@ -778,9 +775,7 @@ export class AppointmentForm { itemType: 'group', visible: resourcesItems.length > 0, colCount: 2, - colCountByScreen: { - xs: 2, - }, + colCountByScreen: { xs: 2 }, cssClass: `${CLASSES.resourcesGroup} ${CLASSES.groupWithIcon}`, items: [ { @@ -788,18 +783,19 @@ export class AppointmentForm { colSpan: 1, cssClass: `${CLASSES.formIcon} ${CLASSES.defaultResourceIcon}`, template: createFormIconTemplate('addcircleoutline'), + visible: showIcon, }, { name: RESOURCE_EDITORS_GROUP_NAME, itemType: 'group', - colSpan: 1, + colSpan: showIcon ? 1 : 2, items: resourcesItems, }, ], } as GroupItem; } - resourcesItems = resourcesItems.map((item, index) => { + resourcesItems = resourcesItems.map((formItem, index) => { const icon = resourcesLoaders[index].icon ?? ''; const dataField = resourcesLoaders[index].resourceIndex; @@ -807,9 +803,7 @@ export class AppointmentForm { itemType: 'group', name: `${dataField}Group`, colCount: 2, - colCountByScreen: { - xs: 2, - }, + colCountByScreen: { xs: 2 }, cssClass: CLASSES.groupWithIcon, items: [ { @@ -817,8 +811,9 @@ export class AppointmentForm { name: `${dataField}Icon`, cssClass: CLASSES.formIcon, template: createFormIconTemplate(icon), + visible: showIcon, }, - item, + { ...formItem, colSpan: showIcon ? 1 : 2 }, ], } as GroupItem; }); @@ -840,12 +835,6 @@ export class AppointmentForm { const isIconItem = itemClasses.includes(CLASSES.formIcon); if (isIconItem) { - const isHidden = itemClasses.includes(CLASSES.hidden); - - if (!showIcon && !isHidden) { - item.cssClass += ` ${CLASSES.hidden}`; - } - return; } diff --git a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts index 8429a6552c4f..148bdb8c7a6a 100644 --- a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts +++ b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts @@ -182,28 +182,26 @@ export class RecurrenceForm { this._readOnly = value; } - createRecurrenceFormGroup(): GroupItem { + createRecurrenceFormGroup(showIcon: boolean): GroupItem { return { name: RECURRENCE_GROUP_NAME, itemType: 'group', cssClass: `${CLASSES.recurrenceGroup} ${CLASSES.recurrenceHidden}`, colSpan: 1, items: [ - this.createRecurrenceStartDateGroup(), - this.createRecurrenceSettingsGroup(), - this.createRecurrenceEndGroup(), + this.createRecurrenceStartDateGroup(showIcon), + this.createRecurrenceSettingsGroup(showIcon), + this.createRecurrenceEndGroup(showIcon), ], } as GroupItem; } - private createRecurrenceStartDateGroup(): GroupItem { + private createRecurrenceStartDateGroup(showIcon: boolean): GroupItem { return { name: GROUP_NAMES.recurrenceStartDateGroup, itemType: 'group', colCount: 2, - colCountByScreen: { - xs: 2, - }, + colCountByScreen: { xs: 2 }, cssClass: CLASSES.groupWithIcon, items: [ { @@ -211,12 +209,14 @@ export class RecurrenceForm { colSpan: 1, cssClass: CLASSES.formIcon, template: createFormIconTemplate('clock'), + visible: showIcon, }, extend( true, getStartDateCommonConfig(this.scheduler.getFirstDayOfWeek()), { name: EDITOR_NAMES.recurrenceStartDateEditor, + colSpan: showIcon ? 1 : 2, cssClass: CLASSES.recurrenceStartDateEditor, label: { text: messageLocalization.format('dxScheduler-editorLabelStartDate'), @@ -235,30 +235,27 @@ export class RecurrenceForm { } as GroupItem; } - private createRecurrenceSettingsGroup(): GroupItem { + private createRecurrenceSettingsGroup(showIcon: boolean): GroupItem { return { itemType: 'group', name: GROUP_NAMES.recurrenceRuleGroup, cssClass: `${CLASSES.recurrenceSettingsGroup} ${CLASSES.groupWithIcon}`, colCount: 2, - colCountByScreen: { - xs: 2, - }, + colCountByScreen: { xs: 2 }, items: [ { name: ICON_NAMES.recurrenceRuleIcon, colSpan: 1, cssClass: CLASSES.formIcon, template: createFormIconTemplate('repeat'), + visible: showIcon, }, { itemType: 'group', name: GROUP_NAMES.recurrencePatternGroup, - colSpan: 1, + colSpan: showIcon ? 1 : 2, colCount: 1, - colCountByScreen: { - xs: 1, - }, + colCountByScreen: { xs: 1 }, items: [ this.createRecurrenceRuleGroup(), this.createDaysOfWeekGroup(), @@ -440,14 +437,12 @@ export class RecurrenceForm { } as GroupItem; } - private createRecurrenceEndGroup(): GroupItem { + private createRecurrenceEndGroup(showIcon: boolean): GroupItem { return { name: GROUP_NAMES.recurrenceEndGroup, itemType: 'group', colCount: 2, - colCountByScreen: { - xs: 2, - }, + colCountByScreen: { xs: 2 }, cssClass: `${CLASSES.groupWithIcon} ${CLASSES.recurrenceEndGroup}`, items: [ { @@ -455,11 +450,12 @@ export class RecurrenceForm { colSpan: 1, cssClass: CLASSES.formIcon, template: createFormIconTemplate('description'), + visible: showIcon, }, { itemType: 'group', name: EDITOR_NAMES.recurrenceEndEditor, - colSpan: 1, + colSpan: showIcon ? 1 : 2, colCount: 2, colCountByScreen: { xs: 2 }, label: { diff --git a/packages/devextreme/playground/jquery.html b/packages/devextreme/playground/jquery.html index abaed02d03f2..98ae3b17fb53 100644 --- a/packages/devextreme/playground/jquery.html +++ b/packages/devextreme/playground/jquery.html @@ -1,5 +1,6 @@ +