@@ -14,7 +14,7 @@ import {
1414 ExcelExport , ICalendarImport , ICalendarExport , CellClickEventArgs , Timezone , CurrentAction
1515} from '@syncfusion/ej2-react-schedule' ;
1616import { DropDownButtonComponent , ItemModel , MenuEventArgs } from '@syncfusion/ej2-react-splitbuttons' ;
17- import { addClass , Browser , closest , extend , Internationalization , isNullOrUndefined , removeClass , remove , compile } from '@syncfusion/ej2-base' ;
17+ import { addClass , Browser , closest , extend , Internationalization , isNullOrUndefined , removeClass , remove } from '@syncfusion/ej2-base' ;
1818import { DataManager , Predicate , Query } from '@syncfusion/ej2-data' ;
1919import { tz } from 'moment-timezone' ;
2020import { SampleBase } from '../common/sample-base' ;
@@ -138,11 +138,6 @@ export class Overview extends SampleBase<{}, {}> {
138138 { Name : 'First Four-Day Week' , Value : 'FirstFourDayWeek' }
139139 ] ;
140140
141- private importTemplateFn ( data : Record < string , any > ) : NodeList {
142- const template : string = '<div class="e-template-btn"><span class="e-btn-icon e-icons e-upload-1 e-icon-left"></span>${text}</div>' ;
143- return compile ( template . trim ( ) ) ( data ) as NodeList ;
144- }
145-
146141 private updateLiveTime ( ) : void {
147142 let scheduleTimezone : string = this . scheduleObj ? this . scheduleObj . timezone : 'Etc/GMT' ;
148143 let timeBtn : HTMLElement = document . querySelector ( '.schedule-overview #timeBtn' ) as HTMLElement ;
@@ -578,9 +573,10 @@ export class Overview extends SampleBase<{}, {}> {
578573 < div className = 'control-panel calendar-export' >
579574 < ButtonComponent id = 'printBtn' cssClass = 'title-bar-btn' iconCss = 'e-icons e-print' onClick = { ( this . onPrint . bind ( this ) ) } content = 'Print' />
580575 </ div >
581- < div className = 'control-panel' >
576+ < div className = 'control-panel' style = { { display : 'inline-flex' , paddingLeft : '15px' } } >
577+ < div className = 'e-icons e-upload-1 e-btn-icon e-icon-left' style = { { lineHeight : '40px' } } > </ div >
582578 < UploaderComponent id = 'fileUpload' type = 'file' allowedExtensions = '.ics' cssClass = 'calendar-import'
583- buttons = { { browse : this . importTemplateFn ( { text : 'Import' } ) [ 0 ] as HTMLElement } } multiple = { false } showFileList = { false } selected = { ( this . onImportClick . bind ( this ) ) } />
579+ buttons = { { browse : 'Import' } } multiple = { false } showFileList = { false } selected = { ( this . onImportClick . bind ( this ) ) } />
584580 </ div >
585581 < div className = 'control-panel calendar-export' >
586582 < DropDownButtonComponent id = 'exporting' content = 'Export' items = { this . exportItems } select = { this . onExportClick . bind ( this ) } />
@@ -731,7 +727,7 @@ export class Overview extends SampleBase<{}, {}> {
731727 < label style = { { lineHeight : '34px' , margin : '0' } } > First Day of Week</ label >
732728 </ div >
733729 < div className = 'col-right' >
734- < DropDownListComponent id = "weekFirstDay" dataSource = { this . weekDays } fields = { { text : 'text' , value : 'value' } } value = { 0 }
730+ < DropDownListComponent id = "weekFirstDay" width = { 170 } dataSource = { this . weekDays } fields = { { text : 'text' , value : 'value' } } value = { 0 }
735731 popupHeight = { 150 } change = { ( args : ChangeEventArgs ) => { this . scheduleObj . firstDayOfWeek = args . value as number ; } } />
736732 </ div >
737733 </ div >
@@ -740,7 +736,7 @@ export class Overview extends SampleBase<{}, {}> {
740736 < label style = { { lineHeight : '34px' , margin : '0' } } > Work week</ label >
741737 </ div >
742738 < div className = 'col-right' >
743- < MultiSelectComponent id = "workWeekDays" cssClass = 'schedule-workweek' ref = { ( workWeek : MultiSelectComponent ) => this . workWeekObj = workWeek } dataSource = { this . weekDays } mode = 'CheckBox'
739+ < MultiSelectComponent id = "workWeekDays" cssClass = 'schedule-workweek' ref = { ( workWeek : MultiSelectComponent ) => this . workWeekObj = workWeek } width = { 170 } dataSource = { this . weekDays } mode = 'CheckBox'
744740 fields = { { text : 'text' , value : 'value' } } enableSelectionOrder = { false } showClearButton = { false } showDropDownIcon = { true }
745741 popupHeight = { 150 } value = { [ 1 , 2 , 3 , 4 , 5 ] } change = { ( args : MultiSelectChangeEventArgs ) => this . scheduleObj . workDays = args . value as number [ ] } >
746742 < Inject services = { [ CheckBoxSelection ] } />
@@ -752,7 +748,7 @@ export class Overview extends SampleBase<{}, {}> {
752748 < label style = { { lineHeight : '34px' , margin : '0' } } > Resources</ label >
753749 </ div >
754750 < div className = 'col-right' >
755- < MultiSelectComponent id = "resources" cssClass = 'schedule-resource' ref = { ( resources : MultiSelectComponent ) => this . resourceObj = resources } dataSource = { this . calendarCollections as Record < string , any > [ ] }
751+ < MultiSelectComponent id = "resources" cssClass = 'schedule-resource' ref = { ( resources : MultiSelectComponent ) => this . resourceObj = resources } width = { 170 } dataSource = { this . calendarCollections as Record < string , any > [ ] }
756752 mode = 'CheckBox' fields = { { text : 'CalendarText' , value : 'CalendarId' } } enableSelectionOrder = { false } showClearButton = { false } showDropDownIcon = { true }
757753 popupHeight = { 150 } value = { [ 1 ] } change = { this . onResourceChange . bind ( this ) } >
758754 < Inject services = { [ CheckBoxSelection ] } />
@@ -764,7 +760,7 @@ export class Overview extends SampleBase<{}, {}> {
764760 < label style = { { lineHeight : '34px' , margin : '0' } } > Timezone</ label >
765761 </ div >
766762 < div className = 'col-right' >
767- < DropDownListComponent id = "timezone" dataSource = { this . timezoneData } fields = { { text : 'text' , value : 'value' } } value = 'Etc/GMT'
763+ < DropDownListComponent id = "timezone" width = { 170 } dataSource = { this . timezoneData } fields = { { text : 'text' , value : 'value' } } value = 'Etc/GMT'
768764 popupHeight = { 150 } change = { ( args : ChangeEventArgs ) => {
769765 this . scheduleObj . timezone = args . value as string ;
770766 this . updateLiveTime ( ) ;
@@ -778,7 +774,7 @@ export class Overview extends SampleBase<{}, {}> {
778774 < label style = { { lineHeight : '34px' , margin : '0' } } > Day Start Hour</ label >
779775 </ div >
780776 < div className = 'col-right' >
781- < TimePickerComponent id = 'dayStartHour' showClearButton = { false } value = { new Date ( new Date ( ) . setHours ( 0 , 0 , 0 ) ) }
777+ < TimePickerComponent id = 'dayStartHour' width = { 170 } showClearButton = { false } value = { new Date ( new Date ( ) . setHours ( 0 , 0 , 0 ) ) }
782778 change = { ( args : TimeEventArgs ) => this . scheduleObj . startHour = this . intl . formatDate ( args . value as Date , { skeleton : 'Hm' } ) } />
783779 </ div >
784780 </ div >
@@ -787,7 +783,7 @@ export class Overview extends SampleBase<{}, {}> {
787783 < label style = { { lineHeight : '34px' , margin : '0' } } > Day End Hour</ label >
788784 </ div >
789785 < div className = 'col-right' >
790- < TimePickerComponent id = 'dayEndHour' showClearButton = { false } value = { new Date ( new Date ( ) . setHours ( 23 , 59 , 59 ) ) }
786+ < TimePickerComponent id = 'dayEndHour' width = { 170 } showClearButton = { false } value = { new Date ( new Date ( ) . setHours ( 23 , 59 , 59 ) ) }
791787 change = { ( args : TimeEventArgs ) => this . scheduleObj . endHour = this . intl . formatDate ( args . value as Date , { skeleton : 'Hm' } ) } />
792788 </ div >
793789 </ div >
@@ -796,7 +792,7 @@ export class Overview extends SampleBase<{}, {}> {
796792 < label style = { { lineHeight : '34px' , margin : '0' } } > Work Start Hour</ label >
797793 </ div >
798794 < div className = 'col-right' >
799- < TimePickerComponent id = 'workHourStart' showClearButton = { false } value = { new Date ( new Date ( ) . setHours ( 9 , 0 , 0 ) ) }
795+ < TimePickerComponent id = 'workHourStart' width = { 170 } showClearButton = { false } value = { new Date ( new Date ( ) . setHours ( 9 , 0 , 0 ) ) }
800796 change = { ( args : TimeEventArgs ) => this . scheduleObj . workHours . start = this . intl . formatDate ( args . value as Date , { skeleton : 'Hm' } ) } />
801797 </ div >
802798 </ div >
@@ -805,7 +801,7 @@ export class Overview extends SampleBase<{}, {}> {
805801 < label style = { { lineHeight : '34px' , margin : '0' } } > Work End Hour</ label >
806802 </ div >
807803 < div className = 'col-right' >
808- < TimePickerComponent id = 'workHourEnd' showClearButton = { false } value = { new Date ( new Date ( ) . setHours ( 18 , 0 , 0 ) ) }
804+ < TimePickerComponent id = 'workHourEnd' width = { 170 } showClearButton = { false } value = { new Date ( new Date ( ) . setHours ( 18 , 0 , 0 ) ) }
809805 change = { ( args : TimeEventArgs ) => this . scheduleObj . workHours . end = this . intl . formatDate ( args . value as Date , { skeleton : 'Hm' } ) } />
810806 </ div >
811807 </ div >
@@ -814,7 +810,7 @@ export class Overview extends SampleBase<{}, {}> {
814810 < label style = { { lineHeight : '34px' , margin : '0' } } > Slot Duration</ label >
815811 </ div >
816812 < div className = 'col-right' >
817- < DropDownListComponent id = "slotDuration" dataSource = { this . majorSlotData } fields = { { text : 'Name' , value : 'Value' } } value = { 60 }
813+ < DropDownListComponent id = "slotDuration" width = { 170 } dataSource = { this . majorSlotData } fields = { { text : 'Name' , value : 'Value' } } value = { 60 }
818814 popupHeight = { 150 } change = { ( args : ChangeEventArgs ) => { this . scheduleObj . timeScale . interval = args . value as number ; } } />
819815 </ div >
820816 </ div >
@@ -823,7 +819,7 @@ export class Overview extends SampleBase<{}, {}> {
823819 < label style = { { lineHeight : '34px' , margin : '0' } } > Slot Interval</ label >
824820 </ div >
825821 < div className = 'col-right' >
826- < DropDownListComponent id = "slotInterval" dataSource = { this . minorSlotData } value = { 2 } popupHeight = { 150 }
822+ < DropDownListComponent id = "slotInterval" width = { 170 } dataSource = { this . minorSlotData } value = { 2 } popupHeight = { 150 }
827823 change = { ( args : ChangeEventArgs ) => { this . scheduleObj . timeScale . slotCount = args . value as number ; } } />
828824 </ div >
829825 </ div >
@@ -832,7 +828,7 @@ export class Overview extends SampleBase<{}, {}> {
832828 < label style = { { lineHeight : '34px' , margin : '0' } } > Time Format</ label >
833829 </ div >
834830 < div className = 'col-right' >
835- < DropDownListComponent id = "timeFormat" dataSource = { this . timeFormatData } fields = { { text : 'Name' , value : 'Value' } } value = { "hh:mm a" } popupHeight = { 150 }
831+ < DropDownListComponent id = "timeFormat" width = { 170 } dataSource = { this . timeFormatData } fields = { { text : 'Name' , value : 'Value' } } value = { "hh:mm a" } popupHeight = { 150 }
836832 change = { ( args : ChangeEventArgs ) => { this . scheduleObj . timeFormat = args . value as any ; } } />
837833 </ div >
838834 </ div >
@@ -841,7 +837,7 @@ export class Overview extends SampleBase<{}, {}> {
841837 < label style = { { lineHeight : '34px' , margin : '0' } } > Week Numbers</ label >
842838 </ div >
843839 < div className = 'col-right' >
844- < DropDownListComponent id = "weekNumber" dataSource = { this . weekNumberData } fields = { { text : 'Name' , value : 'Value' } } value = { "Off" } popupHeight = { 150 }
840+ < DropDownListComponent id = "weekNumber" width = { 170 } dataSource = { this . weekNumberData } fields = { { text : 'Name' , value : 'Value' } } value = { "Off" } popupHeight = { 150 }
845841 change = { ( args : ChangeEventArgs ) => {
846842 if ( args . value == "Off" ) {
847843 this . scheduleObj . showWeekNumber = false ;
0 commit comments