Documentation
parent
5f38657a9e
commit
01e2d10fc7
|
|
@ -302,26 +302,20 @@ export class NttGanttComponent implements OnInit {
|
|||
|
||||
/**############################### NTT Gantt Component Helper Functions /**###############################*/
|
||||
|
||||
/**
|
||||
* The function languageChange executes a language change in the language service and triggers the initLanguage function.
|
||||
* This function is triggered by a manual language of the user.
|
||||
*/
|
||||
public languageChange(args: any){
|
||||
this.languageService.languageChange(args.value),
|
||||
this.initLanguge();
|
||||
}
|
||||
|
||||
public changeScalar(){
|
||||
if(this.selectedScalar == this.scalars[0]){
|
||||
this.timelineSettings = {topTier: {unit: 'Week'}, bottomTier: {format: 'dd', unit: 'Day', count: 1}};
|
||||
this.renderplanTime = false;
|
||||
}
|
||||
if(this.selectedScalar == this.scalars[1]){
|
||||
this.timelineSettings = {topTier: {unit: 'Month'}, bottomTier: {format: 'WW', unit: 'Week', count: 1}};
|
||||
this.renderplanTime = true;
|
||||
}
|
||||
if(this.selectedScalar == this.scalars[2]){
|
||||
this.timelineSettings = {topTier: {unit: 'Year'}, bottomTier: {format: 'MM',unit: 'Month',count: 1}};
|
||||
this.renderplanTime = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The function initLanguge executes a language change for the ntt gantt component. Therefore the time scalar and the gantt columns get the corresponding values determined by the selected language.
|
||||
* This function is triggered by the ngOnInit function or the languageChange function
|
||||
* @param initial determines if the function is initially trigger by the ngOnInit function, in all other cases the gantt chart should be refrehed
|
||||
*/
|
||||
initLanguge(initial: boolean = false){
|
||||
|
||||
if(this.languageService.language == 'DE'){
|
||||
|
|
@ -339,6 +333,24 @@ export class NttGanttComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The function changeScalar executes a change of the displayed time scalar.
|
||||
* This function is triggered if the user changes the time scalar.
|
||||
*/
|
||||
public changeScalar(){
|
||||
if(this.selectedScalar == this.scalars[0]){
|
||||
this.timelineSettings = {topTier: {unit: 'Week'}, bottomTier: {format: 'dd', unit: 'Day', count: 1}};
|
||||
this.renderplanTime = false;
|
||||
}
|
||||
if(this.selectedScalar == this.scalars[1]){
|
||||
this.timelineSettings = {topTier: {unit: 'Month'}, bottomTier: {format: 'WW', unit: 'Week', count: 1}};
|
||||
this.renderplanTime = true;
|
||||
}
|
||||
if(this.selectedScalar == this.scalars[2]){
|
||||
this.timelineSettings = {topTier: {unit: 'Year'}, bottomTier: {format: 'MM',unit: 'Month',count: 1}};
|
||||
this.renderplanTime = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**############################### NTT Gantt Component EVENTS /**###############################*/
|
||||
|
||||
|
|
@ -477,6 +489,7 @@ export class NttGanttComponent implements OnInit {
|
|||
}
|
||||
|
||||
/**############################### Syncfusion Framework EVENTS /**###############################*/
|
||||
|
||||
/**
|
||||
* The function queryTaskbarInfo catches the corresponding syncfsuions event and colors the respective diamond depending on the status
|
||||
* @param args event arguments from the syncfusion gantt chart
|
||||
|
|
@ -520,9 +533,9 @@ export class NttGanttComponent implements OnInit {
|
|||
}
|
||||
|
||||
/**
|
||||
* The function taskbarEdited catches the corresponding syncfsuions event and cancels the user action if the isFixed flag of a task (Date) is set true
|
||||
* If the isFixed flag is false, it triggers the dataService to update the moved date
|
||||
* @param args event arguments from the syncfusion gantt chart
|
||||
* The function taskbarEdited catches the corresponding syncfsuions event and cancels the user action if the isFixed flag of a task (Date) is set true.
|
||||
* If the isFixed flag is false, it triggers the dataService to update the moved date.
|
||||
* @param args event arguments from the syncfusion gantt chart.
|
||||
*/
|
||||
public taskbarEdited(args: any){
|
||||
if(args.data.taskData.isFixed !== false ) {
|
||||
|
|
@ -541,8 +554,8 @@ export class NttGanttComponent implements OnInit {
|
|||
}
|
||||
|
||||
/**
|
||||
* The function taskbarEditing catches the corresponding syncfsuions event and cancels the user action if the isFixed flag of a task (Date) is set true
|
||||
* @param args event arguments from the syncfusion gantt chart
|
||||
* The function taskbarEditing catches the corresponding syncfsuions event and cancels the user action if the isFixed flag of a task (Date) is set true.
|
||||
* @param args event arguments from the syncfusion gantt chart.
|
||||
*/
|
||||
public taskbarEditing(args: any) {
|
||||
if(args.data.taskData.isFixed !== false ) {
|
||||
|
|
@ -550,6 +563,10 @@ export class NttGanttComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The function taskbarEditing catches the corresponding syncfsuions event and executes a query operation to synchronize the scrollbars of the main gannt chart and the planTimeBart gantt chart.
|
||||
* @param args event arguments from the syncfusion gantt chart.
|
||||
*/
|
||||
public actionComplete(args: any){
|
||||
if (args.action === 'HorizontalScroll') {
|
||||
let elem = document.querySelector(
|
||||
|
|
@ -561,24 +578,24 @@ export class NttGanttComponent implements OnInit {
|
|||
}
|
||||
|
||||
/**
|
||||
* The function load catches the corresponding syncfsuions event and triggers the loading spinner to start while the gantt chart is refrehshing
|
||||
* @param args event arguments from the syncfusion gantt chart
|
||||
* The function load catches the corresponding syncfsuions event and triggers the loading spinner to start while the gantt chart is refrehshing.
|
||||
* @param args event arguments from the syncfusion gantt chart.
|
||||
*/
|
||||
public load(args: any) {
|
||||
this.spin = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The function dataBound catches the corresponding syncfsuions event and stops the loading spinner
|
||||
* @param args event arguments from the syncfusion gantt chart
|
||||
* The function dataBound catches the corresponding syncfsuions event and stops the loading spinner.
|
||||
* @param args event arguments from the syncfusion gantt chart.
|
||||
*/
|
||||
public dataBound(args: any) {
|
||||
this.spin = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The function created catches the corresponding syncfsuions event and stops the internal loading spinner
|
||||
* @param args event arguments from the syncfusion gantt chart
|
||||
* The function created catches the corresponding syncfsuions event and stops the internal loading spinner.
|
||||
* @param args event arguments from the syncfusion gantt chart.
|
||||
*/
|
||||
public created(args: any) {
|
||||
this.ganttDefault.hideSpinner();
|
||||
|
|
@ -586,16 +603,26 @@ export class NttGanttComponent implements OnInit {
|
|||
}
|
||||
|
||||
/**
|
||||
* The function onExpand catches the corresponding syncfsuions event and avoids a chart row from beeing expanded by the user
|
||||
* @param args event arguments from the syncfusion gantt chart
|
||||
* The function onExpand catches the corresponding syncfsuions event and avoids a chart row from beeing expanded by the user.
|
||||
* @param args event arguments from the syncfusion gantt chart.
|
||||
*/
|
||||
public onExpand(args: any){
|
||||
args.cancel = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The function onResizing catches the corresponding syncfsuions event and stores the actual splitter postition to synchronize the splitters of the main gannt chart and the planTimeBart gantt chart.
|
||||
* @param args event arguments from the syncfusion gantt chart.
|
||||
*/
|
||||
public onResizing(args){
|
||||
let width = '' + args.paneSize[0]+'px';
|
||||
this.splitterSettings = {position: width};
|
||||
}
|
||||
|
||||
/**
|
||||
* The function actionBegin catches the corresponding syncfsuions event applies a sort by the selected column and refrehses the gantt chart or opens the Change Package direktly in Remedy if the user doubleclicks on a main date.
|
||||
* @param args event arguments from the syncfusion gantt chart.
|
||||
*/
|
||||
public actionBegin(args: any) {
|
||||
if(args.dialogModel){
|
||||
args.cancel = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue