1
|
import { Component, OnInit } from '@angular/core';
|
2
|
import { Router } from "@angular/router";
|
3
|
|
4
|
@Component({
|
5
|
selector: 'app-sources-register',
|
6
|
templateUrl: 'sources-register.component.html'
|
7
|
})
|
8
|
|
9
|
export class SourcesRegisterComponent implements OnInit {
|
10
|
|
11
|
constructor(private router: Router) {
|
12
|
}
|
13
|
|
14
|
ngOnInit() {
|
15
|
let body = document.getElementsByTagName('body')[0];
|
16
|
body.classList.remove("top_bar_active"); //remove the class
|
17
|
body.classList.remove("page_heading_active");
|
18
|
body.classList.remove("landing");
|
19
|
body.classList.add("dashboard");
|
20
|
}
|
21
|
|
22
|
// fixme still when I click the link inside the text in overlay, this event happens as well (I go to the first step of the wizard)
|
23
|
goTo(datasourceType: string) {
|
24
|
if(datasourceType==='literature') {
|
25
|
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
|
26
|
} else if(datasourceType==='data') {
|
27
|
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
|
28
|
} else if(datasourceType==='journal') {
|
29
|
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`);
|
30
|
} else if(datasourceType==='aggregator') {
|
31
|
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`);
|
32
|
}
|
33
|
}
|
34
|
}
|