@@ -14,7 +14,7 @@ import {
14
14
ExcelExport , ICalendarImport , ICalendarExport , CellClickEventArgs , Timezone , CurrentAction
15
15
} from '@syncfusion/ej2-react-schedule' ;
16
16
import { 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' ;
18
18
import { DataManager , Predicate , Query } from '@syncfusion/ej2-data' ;
19
19
import { tz } from 'moment-timezone' ;
20
20
import { SampleBase } from '../common/sample-base' ;
@@ -138,11 +138,6 @@ export class Overview extends SampleBase<{}, {}> {
138
138
{ Name : 'First Four-Day Week' , Value : 'FirstFourDayWeek' }
139
139
] ;
140
140
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
-
146
141
private updateLiveTime ( ) : void {
147
142
let scheduleTimezone : string = this . scheduleObj ? this . scheduleObj . timezone : 'Etc/GMT' ;
148
143
let timeBtn : HTMLElement = document . querySelector ( '.schedule-overview #timeBtn' ) as HTMLElement ;
@@ -578,9 +573,10 @@ export class Overview extends SampleBase<{}, {}> {
578
573
< div className = 'control-panel calendar-export' >
579
574
< ButtonComponent id = 'printBtn' cssClass = 'title-bar-btn' iconCss = 'e-icons e-print' onClick = { ( this . onPrint . bind ( this ) ) } content = 'Print' />
580
575
</ 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 >
582
578
< 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 ) ) } />
584
580
</ div >
585
581
< div className = 'control-panel calendar-export' >
586
582
< DropDownButtonComponent id = 'exporting' content = 'Export' items = { this . exportItems } select = { this . onExportClick . bind ( this ) } />
@@ -731,7 +727,7 @@ export class Overview extends SampleBase<{}, {}> {
731
727
< label style = { { lineHeight : '34px' , margin : '0' } } > First Day of Week</ label >
732
728
</ div >
733
729
< 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 }
735
731
popupHeight = { 150 } change = { ( args : ChangeEventArgs ) => { this . scheduleObj . firstDayOfWeek = args . value as number ; } } />
736
732
</ div >
737
733
</ div >
@@ -740,7 +736,7 @@ export class Overview extends SampleBase<{}, {}> {
740
736
< label style = { { lineHeight : '34px' , margin : '0' } } > Work week</ label >
741
737
</ div >
742
738
< 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'
744
740
fields = { { text : 'text' , value : 'value' } } enableSelectionOrder = { false } showClearButton = { false } showDropDownIcon = { true }
745
741
popupHeight = { 150 } value = { [ 1 , 2 , 3 , 4 , 5 ] } change = { ( args : MultiSelectChangeEventArgs ) => this . scheduleObj . workDays = args . value as number [ ] } >
746
742
< Inject services = { [ CheckBoxSelection ] } />
@@ -752,7 +748,7 @@ export class Overview extends SampleBase<{}, {}> {
752
748
< label style = { { lineHeight : '34px' , margin : '0' } } > Resources</ label >
753
749
</ div >
754
750
< 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 > [ ] }
756
752
mode = 'CheckBox' fields = { { text : 'CalendarText' , value : 'CalendarId' } } enableSelectionOrder = { false } showClearButton = { false } showDropDownIcon = { true }
757
753
popupHeight = { 150 } value = { [ 1 ] } change = { this . onResourceChange . bind ( this ) } >
758
754
< Inject services = { [ CheckBoxSelection ] } />
@@ -764,7 +760,7 @@ export class Overview extends SampleBase<{}, {}> {
764
760
< label style = { { lineHeight : '34px' , margin : '0' } } > Timezone</ label >
765
761
</ div >
766
762
< 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'
768
764
popupHeight = { 150 } change = { ( args : ChangeEventArgs ) => {
769
765
this . scheduleObj . timezone = args . value as string ;
770
766
this . updateLiveTime ( ) ;
@@ -778,7 +774,7 @@ export class Overview extends SampleBase<{}, {}> {
778
774
< label style = { { lineHeight : '34px' , margin : '0' } } > Day Start Hour</ label >
779
775
</ div >
780
776
< 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 ) ) }
782
778
change = { ( args : TimeEventArgs ) => this . scheduleObj . startHour = this . intl . formatDate ( args . value as Date , { skeleton : 'Hm' } ) } />
783
779
</ div >
784
780
</ div >
@@ -787,7 +783,7 @@ export class Overview extends SampleBase<{}, {}> {
787
783
< label style = { { lineHeight : '34px' , margin : '0' } } > Day End Hour</ label >
788
784
</ div >
789
785
< 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 ) ) }
791
787
change = { ( args : TimeEventArgs ) => this . scheduleObj . endHour = this . intl . formatDate ( args . value as Date , { skeleton : 'Hm' } ) } />
792
788
</ div >
793
789
</ div >
@@ -796,7 +792,7 @@ export class Overview extends SampleBase<{}, {}> {
796
792
< label style = { { lineHeight : '34px' , margin : '0' } } > Work Start Hour</ label >
797
793
</ div >
798
794
< 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 ) ) }
800
796
change = { ( args : TimeEventArgs ) => this . scheduleObj . workHours . start = this . intl . formatDate ( args . value as Date , { skeleton : 'Hm' } ) } />
801
797
</ div >
802
798
</ div >
@@ -805,7 +801,7 @@ export class Overview extends SampleBase<{}, {}> {
805
801
< label style = { { lineHeight : '34px' , margin : '0' } } > Work End Hour</ label >
806
802
</ div >
807
803
< 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 ) ) }
809
805
change = { ( args : TimeEventArgs ) => this . scheduleObj . workHours . end = this . intl . formatDate ( args . value as Date , { skeleton : 'Hm' } ) } />
810
806
</ div >
811
807
</ div >
@@ -814,7 +810,7 @@ export class Overview extends SampleBase<{}, {}> {
814
810
< label style = { { lineHeight : '34px' , margin : '0' } } > Slot Duration</ label >
815
811
</ div >
816
812
< 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 }
818
814
popupHeight = { 150 } change = { ( args : ChangeEventArgs ) => { this . scheduleObj . timeScale . interval = args . value as number ; } } />
819
815
</ div >
820
816
</ div >
@@ -823,7 +819,7 @@ export class Overview extends SampleBase<{}, {}> {
823
819
< label style = { { lineHeight : '34px' , margin : '0' } } > Slot Interval</ label >
824
820
</ div >
825
821
< 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 }
827
823
change = { ( args : ChangeEventArgs ) => { this . scheduleObj . timeScale . slotCount = args . value as number ; } } />
828
824
</ div >
829
825
</ div >
@@ -832,7 +828,7 @@ export class Overview extends SampleBase<{}, {}> {
832
828
< label style = { { lineHeight : '34px' , margin : '0' } } > Time Format</ label >
833
829
</ div >
834
830
< 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 }
836
832
change = { ( args : ChangeEventArgs ) => { this . scheduleObj . timeFormat = args . value as any ; } } />
837
833
</ div >
838
834
</ div >
@@ -841,7 +837,7 @@ export class Overview extends SampleBase<{}, {}> {
841
837
< label style = { { lineHeight : '34px' , margin : '0' } } > Week Numbers</ label >
842
838
</ div >
843
839
< 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 }
845
841
change = { ( args : ChangeEventArgs ) => {
846
842
if ( args . value == "Off" ) {
847
843
this . scheduleObj . showWeekNumber = false ;
0 commit comments