|
| 1 | +import type { dxElementWrapper } from '@js/core/renderer'; |
1 | 2 | import $ from '@js/core/renderer'; |
2 | 3 | import type dxForm from '@js/ui/form'; |
3 | 4 | import type dxPopup from '@js/ui/popup'; |
@@ -45,6 +46,10 @@ export class PopupModel { |
45 | 46 | return this.element.querySelector('.dx-scheduler-form-subject-group .dx-scheduler-form-icon .dx-icon'); |
46 | 47 | } |
47 | 48 |
|
| 49 | + get subjectInput(): Element | null { |
| 50 | + return this.element.querySelector('.dx-scheduler-form-text-editor .dx-textbox.dx-widget'); |
| 51 | + } |
| 52 | + |
48 | 53 | get startDate(): Element | null { |
49 | 54 | return this.element.querySelector('.dx-scheduler-form-start-date-editor .dx-datebox.dx-widget'); |
50 | 55 | } |
@@ -73,6 +78,10 @@ export class PopupModel { |
73 | 78 | return this.element.querySelector('.dx-scheduler-form-repeat-editor .dx-selectbox.dx-widget'); |
74 | 79 | } |
75 | 80 |
|
| 81 | + get descriptionTextArea(): Element | null { |
| 82 | + return this.element.querySelector('.dx-scheduler-form-description-editor .dx-textarea.dx-widget'); |
| 83 | + } |
| 84 | + |
76 | 85 | get frequencyEditor(): Element | null { |
77 | 86 | return this.element.querySelector('.dx-scheduler-form-recurrence-frequency-editor .dx-selectbox.dx-widget'); |
78 | 87 | } |
@@ -133,6 +142,18 @@ export class PopupModel { |
133 | 142 | return this.element.querySelector('.dx-scheduler-form-day-of-year-group'); |
134 | 143 | } |
135 | 144 |
|
| 145 | + getInput = (editorName: string): dxElementWrapper | undefined => { |
| 146 | + const editor = this.form.getEditor(editorName); |
| 147 | + return editor?.$element().find('input.dx-texteditor-input'); |
| 148 | + }; |
| 149 | + |
| 150 | + getInputValue = (editorName: string): string | undefined => { |
| 151 | + const result = this.getInput(editorName)?.val(); |
| 152 | + return result as string | undefined; |
| 153 | + }; |
| 154 | + |
| 155 | + isInputVisible = (editorName: string): boolean => this.getInput(editorName)?.length === 1; |
| 156 | + |
136 | 157 | getLabelIdByText = (labelText: string): string => { |
137 | 158 | const labels = Array.from(this.element.querySelectorAll('label')); |
138 | 159 |
|
|
0 commit comments