[Monitor Dashboard | Trunk]: Methodology: Revert sections

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@60800 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Konstantinos Triantafyllou 2021-04-05 14:02:18 +00:00
parent 867e79536b
commit c6239ddf20
3 changed files with 189 additions and 200 deletions

View File

@ -274,11 +274,11 @@ export class AppComponent implements OnInit, OnDestroy {
});
this.menuItems.push({
rootItem: new MenuItem("methodology", "Methodology",
"/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}), items: [
new MenuItem("methodology", "Overview",
"/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}),
properties.baseLink + "/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}), items: [
new MenuItem("methodology", "Terminology and construction",
"/" + this.stakeholder.alias + "/methodology#terminology", "", false, [], null, {}),
properties.baseLink + "/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}),
new MenuItem("methodology", "See how it works",
properties.baseLink + "/" + this.stakeholder.alias + "/methodology#how", "", false, [], null, {}),
]
});
if(this.stakeholder.type === "funder") {
@ -307,11 +307,11 @@ export class AppComponent implements OnInit, OnDestroy {
};
this.menuItems.push({
rootItem: new MenuItem("methodology", "Methodology",
"/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}), items: [
new MenuItem("methodology", "Overview",
"/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}),
properties.baseLink + "/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}), items: [
new MenuItem("methodology", "Terminology and construction",
"/" + this.stakeholder.alias + "/methodology#terminology", "", false, [], null, {}),
properties.baseLink + "/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}),
new MenuItem("methodology", "See how it works",
properties.baseLink + "/" + this.stakeholder.alias + "/methodology#how", "", false, [], null, {}),
]
});
if(this.stakeholder.type === "funder") {

View File

@ -12,19 +12,7 @@ import {ActivatedRoute, Router} from "@angular/router";
template: `
<div page-content>
<div inner>
<div *ngIf="loading" class="uk-position-center">
<loading></loading>
</div>
<div *ngIf="!loading">
<div class="uk-container uk-container-large uk-section-small">
<h2 class="uk-text-center">
Overview
</h2>
<div class="uk-margin-large-top">
<how></how>
</div>
</div>
<div id="terminology" class="uk-container uk-container-large uk-section-small">
<h2 class="uk-text-center">
Terminology and construction
</h2>
@ -194,6 +182,13 @@ import {ActivatedRoute, Router} from "@angular/router";
</div>
</div>
</div>
<div id="how" class="uk-container uk-container-large uk-section-small">
<h2 class="uk-text-center">
See how it works
</h2>
<div class="uk-margin-large-top">
<how></how>
</div>
</div>
</div>
</div>
@ -201,7 +196,6 @@ import {ActivatedRoute, Router} from "@angular/router";
styleUrls: ['methodology.component.css']
})
export class MethodologyComponent implements OnInit, OnDestroy {
public loading = true;
public stakeholder: Stakeholder;
public tab: 'entities' | 'attributes' = 'entities';
private subscriptions: any[] = [];
@ -215,7 +209,6 @@ export class MethodologyComponent implements OnInit, OnDestroy {
}
ngOnInit() {
this.loading = true;
this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
this.stakeholder = stakeholder;
if (this.stakeholder) {
@ -229,14 +222,11 @@ export class MethodologyComponent implements OnInit, OnDestroy {
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: title}, "property='og:title'");
this._title.setTitle(title);
setTimeout(() => {
this.loading = false;
this.subscriptions.push(this.route.fragment.subscribe(fragment => {
setTimeout(() => {
this.goTo(fragment);
}, 100);
}));
}, 500)
}
}));
}
@ -244,7 +234,7 @@ export class MethodologyComponent implements OnInit, OnDestroy {
goTo(id: string) {
const yOffset = -100;
const element = document.getElementById(id);
if(element) {
if (element) {
const y = element.getBoundingClientRect().top + window.pageYOffset + yOffset;
window.scrollTo({top: y, behavior: 'smooth'});
}

View File

@ -5,7 +5,6 @@ import {RouterModule} from "@angular/router";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {PageContentModule} from "../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module";
import {HowModule} from "../openaireLibrary/monitor/how/how.module";
import {LoadingModule} from "../openaireLibrary/utils/loading/loading.module";
@NgModule({
declarations: [MethodologyComponent],
@ -15,7 +14,7 @@ import {LoadingModule} from "../openaireLibrary/utils/loading/loading.module";
component: MethodologyComponent,
canDeactivate: [PreviousRouteRecorder]
},
]), PageContentModule, HowModule, LoadingModule],
]), PageContentModule, HowModule],
exports: [MethodologyComponent]
})
export class MethodologyModule {