Merge remote-tracking branch 'origin/develop' into umbrella
This commit is contained in:
commit
472eeef326
|
@ -129,7 +129,7 @@ export class ClaimContextSearchFormComponent {
|
||||||
|
|
||||||
}
|
}
|
||||||
select(communityId, communityLabel) {
|
select(communityId, communityLabel) {
|
||||||
console.log("SELECT", communityId)
|
// console.log("SELECT", communityId)
|
||||||
this.selectedCommunityId = communityId;
|
this.selectedCommunityId = communityId;
|
||||||
this.selectedCommunityLabel = communityLabel;
|
this.selectedCommunityLabel = communityLabel;
|
||||||
this.getCategories();
|
this.getCategories();
|
||||||
|
|
|
@ -202,6 +202,6 @@ export class ShowOptions {
|
||||||
options.push({value: 'context',label: OpenaireEntities.COMMUNITIES})
|
options.push({value: 'context',label: OpenaireEntities.COMMUNITIES})
|
||||||
}
|
}
|
||||||
this.selectOptions = options;
|
this.selectOptions = options;
|
||||||
console.log(options, claimProperties.SELECT_ENTITIES.projects)
|
// console.log(options, claimProperties.SELECT_ENTITIES.projects)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,7 +329,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
delete() {
|
delete() {
|
||||||
let claimsToBeDeleted = ((this.index != null) ? [this.claims[this.index].id] : this.selected.map(claim => claim.id));
|
let claimsToBeDeleted = ((this.index != null) ? [this.claims[this.index].id] : this.selected.map(claim => claim.id));
|
||||||
console.log(claimsToBeDeleted);
|
// console.log(claimsToBeDeleted);
|
||||||
this.subscriptions.push(this._claimService.deleteBulk(claimsToBeDeleted, this.properties.claimsAPIURL).subscribe(
|
this.subscriptions.push(this._claimService.deleteBulk(claimsToBeDeleted, this.properties.claimsAPIURL).subscribe(
|
||||||
res => {
|
res => {
|
||||||
if (this.index != null) {
|
if (this.index != null) {
|
||||||
|
|
|
@ -108,7 +108,6 @@ export class SearchOrcidService {
|
||||||
|
|
||||||
|
|
||||||
static parseOrcidAuthor(data: any, authorIds: string[], authors, addId): any {
|
static parseOrcidAuthor(data: any, authorIds: string[], authors, addId): any {
|
||||||
console.log(data)
|
|
||||||
if (data[2] != null) {
|
if (data[2] != null) {
|
||||||
if (addId) {
|
if (addId) {
|
||||||
authorIds.push(data[2].path);
|
authorIds.push(data[2].path);
|
||||||
|
@ -128,9 +127,7 @@ export class SearchOrcidService {
|
||||||
if (data[3] != null) {
|
if (data[3] != null) {
|
||||||
author['institution'] = data[3];
|
author['institution'] = data[3];
|
||||||
}
|
}
|
||||||
console.log(author['institution'])
|
|
||||||
authors.push(author);
|
authors.push(author);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<loading *ngIf="validInput === null" [full]="true" class="uk-position-center"></loading>
|
||||||
<linking-generic *ngIf="validInput" [localStoragePrefix]="localStoragePrefix" [results]="results" [sources]="sources"
|
<linking-generic *ngIf="validInput" [localStoragePrefix]="localStoragePrefix" [results]="results" [sources]="sources"
|
||||||
[communityId]="communityId" [inlineEntity]="inlineEntity" [showOptions]="showOptions"
|
[communityId]="communityId" [inlineEntity]="inlineEntity" [showOptions]="showOptions"
|
||||||
pageTitle="Direct Linking" [claimsProperties]="claimsProperties">
|
pageTitle="Direct Linking" [claimsProperties]="claimsProperties">
|
||||||
|
|
|
@ -8,12 +8,13 @@ import {SearchResearchResultsServiceModule} from '../../services/searchResearchR
|
||||||
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
|
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
|
||||||
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
|
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
|
||||||
import {LinkingGenericModule} from '../linking/linkingGeneric.module';
|
import {LinkingGenericModule} from '../linking/linkingGeneric.module';
|
||||||
|
import {LoadingModule} from "../../utils/loading/loading.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
SharedModule,
|
SharedModule,
|
||||||
EntitySearchServiceModule, SearchResearchResultsServiceModule,
|
EntitySearchServiceModule, SearchResearchResultsServiceModule,
|
||||||
Schema2jsonldModule, SEOServiceModule, LinkingGenericModule
|
Schema2jsonldModule, SEOServiceModule, LinkingGenericModule, LoadingModule
|
||||||
],
|
],
|
||||||
providers:[],
|
providers:[],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|
|
@ -133,11 +133,11 @@ export class BulkClaimComponent {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
upload() {
|
upload() {
|
||||||
this.enableUpload = false;
|
this.enableUpload = false;
|
||||||
this.showReport = false;
|
this.showReport = false;
|
||||||
this.errorMessage = "";
|
this.errorMessage = "";
|
||||||
console.log(this.filesToUpload);
|
|
||||||
if (this.filesToUpload.length == 0) {
|
if (this.filesToUpload.length == 0) {
|
||||||
this.errorMessage = "There is no selected file to upload.";
|
this.errorMessage = "There is no selected file to upload.";
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -232,7 +232,7 @@ export class ClaimInsertComponent {
|
||||||
data => {
|
data => {
|
||||||
this.feedRecordsJob = data.data;
|
this.feedRecordsJob = data.data;
|
||||||
this.records2Insert = directclaims.length;
|
this.records2Insert = directclaims.length;
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
// this.insertedRecords = data.insertedIds;
|
// this.insertedRecords = data.insertedIds;
|
||||||
//
|
//
|
||||||
// this.errorInRecords = data.errorInClaims;
|
// this.errorInRecords = data.errorInClaims;
|
||||||
|
|
|
@ -132,42 +132,6 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {end: true, offset: footer_offset});
|
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {end: true, offset: footer_offset});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*
|
|
||||||
* Should be smooth
|
|
||||||
*
|
|
||||||
* */
|
|
||||||
private observeBottom() {
|
|
||||||
let bottom = document.getElementById('bottom');
|
|
||||||
if (bottom) {
|
|
||||||
let bottomObs = new IntersectionObserver(entries => {
|
|
||||||
entries.forEach(entry => {
|
|
||||||
this.shouldSticky = !entry.isIntersecting;
|
|
||||||
})
|
|
||||||
});
|
|
||||||
this.subscriptions.push(bottomObs);
|
|
||||||
bottomObs.observe(bottom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* */
|
|
||||||
private observeHeader() {
|
|
||||||
if (this.header) {
|
|
||||||
let headerObs = new IntersectionObserver(entries => {
|
|
||||||
entries.forEach(entry => {
|
|
||||||
if (entry.boundingClientRect.height > 0) {
|
|
||||||
this.layoutService.setReplaceHeader(!entry.isIntersecting);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
this.subscriptions.push(headerObs);
|
|
||||||
headerObs.observe(this.header.nativeElement);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private observeStickyFooter() {
|
private observeStickyFooter() {
|
||||||
if (this.sticky_footer) {
|
if (this.sticky_footer) {
|
||||||
let resizeObs = new ResizeObserver(entries => {
|
let resizeObs = new ResizeObserver(entries => {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {Injectable} from "@angular/core";
|
import {AfterViewInit, Injectable} from "@angular/core";
|
||||||
import {BehaviorSubject, Observable, Subscriber} from "rxjs";
|
import {BehaviorSubject, Observable, Subscriber} from "rxjs";
|
||||||
import {ActivationStart, Router} from "@angular/router";
|
import {ActivationStart, Router} from "@angular/router";
|
||||||
import {Icon} from "../../../sharedComponents/menu";
|
import {Icon} from "../../../sharedComponents/menu";
|
||||||
|
@ -92,6 +92,7 @@ export class LayoutService {
|
||||||
* Display help pop-up on non-admin pages. (default true for the rest of the pages)
|
* Display help pop-up on non-admin pages. (default true for the rest of the pages)
|
||||||
* */
|
* */
|
||||||
private hasHelpPopUpSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
private hasHelpPopUpSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
||||||
|
private isBottomIntersectingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
@ -119,6 +120,20 @@ export class LayoutService {
|
||||||
this.subscriptions.push(resizeObs);
|
this.subscriptions.push(resizeObs);
|
||||||
resizeObs.observe(document.documentElement);
|
resizeObs.observe(document.documentElement);
|
||||||
}
|
}
|
||||||
|
if(typeof document !== "undefined") {
|
||||||
|
setTimeout(() => {
|
||||||
|
let bottom = document.getElementById('bottom');
|
||||||
|
if (bottom) {
|
||||||
|
let bottomObs = new IntersectionObserver(entries => {
|
||||||
|
entries.forEach(entry => {
|
||||||
|
this.isBottomIntersectingSubject.next(entry.isIntersecting);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
this.subscriptions.push(bottomObs);
|
||||||
|
bottomObs.observe(bottom);
|
||||||
|
}
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private router: Router) {
|
constructor(private router: Router) {
|
||||||
|
@ -355,4 +370,8 @@ export class LayoutService {
|
||||||
setHasHelpPopUp(value: boolean) {
|
setHasHelpPopUp(value: boolean) {
|
||||||
this.hasHelpPopUpSubject.next(value);
|
this.hasHelpPopUpSubject.next(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isBottomIntersecting(): Observable<boolean> {
|
||||||
|
return this.isBottomIntersectingSubject.asObservable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<a [routerLink]="getItemRoute(item)" [title]="item.title" (click)="item.items.length === 0?closeOffcanvas():null"
|
<a [routerLink]="getItemRoute(item)" [title]="item.title" (click)="item.items.length === 0?closeOffcanvas():null"
|
||||||
[queryParams]="item.route?item.params:null" [queryParamsHandling]="item.route?queryParamsHandling:null" class="uk-flex uk-flex-middle">
|
[queryParams]="item.route?item.params:null" [queryParamsHandling]="item.route?queryParamsHandling:null" class="uk-flex uk-flex-middle">
|
||||||
<div *ngIf="item.icon && (item.icon.svg || item.icon.name)" class="uk-width-auto">
|
<div *ngIf="item.icon && (item.icon.svg || item.icon.name)" class="uk-width-auto">
|
||||||
<icon class="menu-icon" [customClass]="item.icon.class" [name]="item.icon.name" ratio="0.9" [svg]="item.icon.svg" [flex]="true"></icon>
|
<icon class="menu-icon" [customClass]="item.icon.class" [name]="item.icon.name" [ratio]="item.icon.ratio?item.icon.ratio:0.9" [svg]="item.icon.svg" [flex]="true"></icon>
|
||||||
</div>
|
</div>
|
||||||
<span [class.hide-on-close]="item.icon" class="uk-width-expand@l uk-text-truncate uk-margin-small-left">{{item.title}}</span>
|
<span [class.hide-on-close]="item.icon" class="uk-width-expand@l uk-text-truncate uk-margin-small-left">{{item.title}}</span>
|
||||||
<span *ngIf="item.items.length > 0" class="uk-nav-parent-icon hide-on-close"></span>
|
<span *ngIf="item.items.length > 0" class="uk-nav-parent-icon hide-on-close"></span>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<schema2jsonld *ngIf="dataProviderInfo"
|
<schema2jsonld *ngIf="dataProviderInfo"
|
||||||
[data]=dataProviderInfo [URL]="canonicalUrl" type="datasource"
|
[data]=dataProviderInfo [URL]="canonicalUrl" type="datasource"
|
||||||
[otherURL]="(dataProviderInfo.provenance)?provenanceUrls:null"></schema2jsonld>
|
[otherURL]="(dataProviderInfo.provenance)?provenanceUrls:null"></schema2jsonld>
|
||||||
<div *ngIf="dataProviderInfo && !dataProviderInfo.belongsTo" [innerHTML]="dataProviderInfo.message"
|
<div *ngIf="dataProviderInfo && !dataProviderInfo.belongsTo && !isBottomIntersecting" [innerHTML]="dataProviderInfo.message"
|
||||||
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
||||||
</div>
|
</div>
|
||||||
<!-- Desktop view -->
|
<!-- Desktop view -->
|
||||||
|
|
|
@ -148,14 +148,13 @@ export class DataProviderComponent {
|
||||||
@ViewChild("descriptionDiv") descriptionDiv: ElementRef;
|
@ViewChild("descriptionDiv") descriptionDiv: ElementRef;
|
||||||
@ViewChild('descriptionModal') descriptionModal;
|
@ViewChild('descriptionModal') descriptionModal;
|
||||||
|
|
||||||
// public shouldSticky: boolean = true;
|
|
||||||
|
|
||||||
subscriptions = [];
|
subscriptions = [];
|
||||||
private sub: Subscription;
|
private sub: Subscription;
|
||||||
properties: EnvProperties = properties;
|
properties: EnvProperties = properties;
|
||||||
public openaireEntities = OpenaireEntities;
|
public openaireEntities = OpenaireEntities;
|
||||||
|
|
||||||
public isMobile: boolean = false;
|
public isMobile: boolean = false;
|
||||||
|
public isBottomIntersecting: boolean = false;
|
||||||
public mobileContent: "info" | "metrics" | "actions" = "info";
|
public mobileContent: "info" | "metrics" | "actions" = "info";
|
||||||
public tabMobile: string = "";
|
public tabMobile: string = "";
|
||||||
public viewAllMobile: string = "";
|
public viewAllMobile: string = "";
|
||||||
|
@ -198,6 +197,11 @@ export class DataProviderComponent {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
||||||
this.isMobile = isMobile;
|
this.isMobile = isMobile;
|
||||||
|
this.cdr.detectChanges();
|
||||||
|
}));
|
||||||
|
this.subscriptions.push(this.layoutService.isBottomIntersecting.subscribe(isBottomIntersecting => {
|
||||||
|
this.isBottomIntersecting = isBottomIntersecting;
|
||||||
|
this.cdr.detectChanges();
|
||||||
}));
|
}));
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => {
|
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => {
|
||||||
|
@ -261,16 +265,6 @@ export class DataProviderComponent {
|
||||||
} else {
|
} else {
|
||||||
this.offset = 0;
|
this.offset = 0;
|
||||||
}
|
}
|
||||||
// let bottom = document.getElementById('bottom');
|
|
||||||
// if(bottom) {
|
|
||||||
// let observer = new IntersectionObserver(entries => {
|
|
||||||
// entries.forEach(entry => {
|
|
||||||
// this.shouldSticky = !entry.isIntersecting;
|
|
||||||
// })
|
|
||||||
// });
|
|
||||||
// this.subscriptions.push(observer);
|
|
||||||
// observer.observe(bottom);
|
|
||||||
// }
|
|
||||||
if(this.graph_and_feedback) {
|
if(this.graph_and_feedback) {
|
||||||
this.observeGraphAndFeedback();
|
this.observeGraphAndFeedback();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
[URL]="properties.domain + properties.baseLink+this.properties.searchLinkToOrganization+organizationInfo.relcanId"
|
[URL]="properties.domain + properties.baseLink+this.properties.searchLinkToOrganization+organizationInfo.relcanId"
|
||||||
type="organization">
|
type="organization">
|
||||||
</schema2jsonld>
|
</schema2jsonld>
|
||||||
<div *ngIf="organizationInfo && !organizationInfo.belongsTo" [innerHTML]="organizationInfo.message"
|
<div *ngIf="organizationInfo && !organizationInfo.belongsTo && !isBottomIntersecting" [innerHTML]="organizationInfo.message"
|
||||||
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
||||||
</div>
|
</div>
|
||||||
<!-- Desktop view -->
|
<!-- Desktop view -->
|
||||||
|
|
|
@ -115,8 +115,6 @@ export class OrganizationComponent {
|
||||||
public graph_height: number = 0;
|
public graph_height: number = 0;
|
||||||
@ViewChild("graph_and_feedback") graph_and_feedback;
|
@ViewChild("graph_and_feedback") graph_and_feedback;
|
||||||
|
|
||||||
// public shouldSticky: boolean = true;
|
|
||||||
|
|
||||||
subscriptions = [];
|
subscriptions = [];
|
||||||
innerReportSubscriptions = [];
|
innerReportSubscriptions = [];
|
||||||
properties: EnvProperties;
|
properties: EnvProperties;
|
||||||
|
@ -131,6 +129,7 @@ export class OrganizationComponent {
|
||||||
public deleteByInferenceOpened: boolean = false;
|
public deleteByInferenceOpened: boolean = false;
|
||||||
|
|
||||||
public isMobile: boolean = false;
|
public isMobile: boolean = false;
|
||||||
|
public isBottomIntersecting: boolean = false;
|
||||||
public mobileContent: "info" | "actions" = "info";
|
public mobileContent: "info" | "actions" = "info";
|
||||||
public viewAllMobile: string = "";
|
public viewAllMobile: string = "";
|
||||||
|
|
||||||
|
@ -162,6 +161,11 @@ export class OrganizationComponent {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
||||||
this.isMobile = isMobile;
|
this.isMobile = isMobile;
|
||||||
|
this.cdr.detectChanges();
|
||||||
|
}));
|
||||||
|
this.subscriptions.push(this.layoutService.isBottomIntersecting.subscribe(isBottomIntersecting => {
|
||||||
|
this.isBottomIntersecting = isBottomIntersecting;
|
||||||
|
this.cdr.detectChanges();
|
||||||
}));
|
}));
|
||||||
this.properties = properties;
|
this.properties = properties;
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
|
@ -218,16 +222,6 @@ export class OrganizationComponent {
|
||||||
} else {
|
} else {
|
||||||
this.offset = 0;
|
this.offset = 0;
|
||||||
}
|
}
|
||||||
// let bottom = document.getElementById('bottom');
|
|
||||||
// if(bottom) {
|
|
||||||
// let observer = new IntersectionObserver(entries => {
|
|
||||||
// entries.forEach(entry => {
|
|
||||||
// this.shouldSticky = !entry.isIntersecting;
|
|
||||||
// })
|
|
||||||
// });
|
|
||||||
// this.subscriptions.push(observer);
|
|
||||||
// observer.observe(bottom);
|
|
||||||
// }
|
|
||||||
if(this.graph_and_feedback) {
|
if(this.graph_and_feedback) {
|
||||||
this.observeGraphAndFeedback();
|
this.observeGraphAndFeedback();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<schema2jsonld *ngIf="projectInfo"
|
<schema2jsonld *ngIf="projectInfo"
|
||||||
[data]=projectInfo [URL]="properties.domain+properties.baseLink+properties.searchLinkToProject+projectId"
|
[data]=projectInfo [URL]="properties.domain+properties.baseLink+properties.searchLinkToProject+projectId"
|
||||||
type="project"></schema2jsonld>
|
type="project"></schema2jsonld>
|
||||||
<div *ngIf="projectInfo && !projectInfo.belongsTo" [innerHTML]="projectInfo.message"
|
<div *ngIf="projectInfo && !projectInfo.belongsTo && !isBottomIntersecting" [innerHTML]="projectInfo.message"
|
||||||
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
||||||
</div>
|
</div>
|
||||||
<!-- Desktop view -->
|
<!-- Desktop view -->
|
||||||
|
|
|
@ -169,14 +169,13 @@ export class ProjectComponent {
|
||||||
@ViewChild("descriptionDiv") descriptionDiv: ElementRef;
|
@ViewChild("descriptionDiv") descriptionDiv: ElementRef;
|
||||||
@ViewChild('descriptionModal') descriptionModal;
|
@ViewChild('descriptionModal') descriptionModal;
|
||||||
|
|
||||||
// public shouldSticky: boolean = true;
|
|
||||||
|
|
||||||
subscriptions = [];
|
subscriptions = [];
|
||||||
private sub: Subscription;
|
private sub: Subscription;
|
||||||
properties: EnvProperties;
|
properties: EnvProperties;
|
||||||
public openaireEntities = OpenaireEntities;
|
public openaireEntities = OpenaireEntities;
|
||||||
|
|
||||||
public isMobile: boolean = false;
|
public isMobile: boolean = false;
|
||||||
|
public isBottomIntersecting: boolean = false;
|
||||||
public mobileContent: "info" | "metrics" | "actions" = "info";
|
public mobileContent: "info" | "metrics" | "actions" = "info";
|
||||||
public tabMobile: string = "";
|
public tabMobile: string = "";
|
||||||
public viewAllMobile: string = "";
|
public viewAllMobile: string = "";
|
||||||
|
@ -209,6 +208,11 @@ export class ProjectComponent {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
||||||
this.isMobile = isMobile;
|
this.isMobile = isMobile;
|
||||||
|
this.cdr.detectChanges();
|
||||||
|
}));
|
||||||
|
this.subscriptions.push(this.layoutService.isBottomIntersecting.subscribe(isBottomIntersecting => {
|
||||||
|
this.isBottomIntersecting = isBottomIntersecting;
|
||||||
|
this.cdr.detectChanges();
|
||||||
}));
|
}));
|
||||||
this.properties = properties;
|
this.properties = properties;
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
|
@ -278,16 +282,6 @@ export class ProjectComponent {
|
||||||
} else {
|
} else {
|
||||||
this.offset = 0;
|
this.offset = 0;
|
||||||
}
|
}
|
||||||
// let bottom = document.getElementById('bottom');
|
|
||||||
// if(bottom) {
|
|
||||||
// let observer = new IntersectionObserver(entries => {
|
|
||||||
// entries.forEach(entry => {
|
|
||||||
// this.shouldSticky = !entry.isIntersecting;
|
|
||||||
// })
|
|
||||||
// });
|
|
||||||
// this.subscriptions.push(observer);
|
|
||||||
// observer.observe(bottom);
|
|
||||||
// }
|
|
||||||
if(this.graph_and_feedback) {
|
if(this.graph_and_feedback) {
|
||||||
this.observeGraphAndFeedback();
|
this.observeGraphAndFeedback();
|
||||||
}
|
}
|
||||||
|
@ -467,7 +461,6 @@ export class ProjectComponent {
|
||||||
data => {
|
data => {
|
||||||
this.projectInfo = data;
|
this.projectInfo = data;
|
||||||
this.projectInfo.setBelongsTo(id);
|
this.projectInfo.setBelongsTo(id);
|
||||||
console.log(this.projectInfo);
|
|
||||||
this.projectInfo.id = this.projectId;
|
this.projectInfo.id = this.projectId;
|
||||||
|
|
||||||
this.actionsAfterGettingProjectInfo();
|
this.actionsAfterGettingProjectInfo();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<schema2jsonld *ngIf="resultLandingInfo && resultLandingInfo.record"
|
<schema2jsonld *ngIf="resultLandingInfo && resultLandingInfo.record"
|
||||||
[data]=resultLandingInfo.record [URL]="canonicalUrl"
|
[data]=resultLandingInfo.record [URL]="canonicalUrl"
|
||||||
[searchActionRoute]="properties.searchLinkToResults"></schema2jsonld>
|
[searchActionRoute]="properties.searchLinkToResults"></schema2jsonld>
|
||||||
<div *ngIf="resultLandingInfo && !resultLandingInfo.belongsTo" [innerHTML]="resultLandingInfo.message"
|
<div *ngIf="resultLandingInfo && !resultLandingInfo.belongsTo && !isBottomIntersecting" [innerHTML]="resultLandingInfo.message"
|
||||||
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
class="uk-alert uk-alert-warning uk-position-fixed uk-position-bottom-center uk-text-small" style="z-index: 1000;">
|
||||||
</div>
|
</div>
|
||||||
<!-- Desktop view -->
|
<!-- Desktop view -->
|
||||||
|
|
|
@ -155,8 +155,6 @@ export class ResultLandingComponent {
|
||||||
@ViewChild("descriptionDiv") descriptionDiv: ElementRef;
|
@ViewChild("descriptionDiv") descriptionDiv: ElementRef;
|
||||||
@ViewChild('descriptionModal') descriptionModal;
|
@ViewChild('descriptionModal') descriptionModal;
|
||||||
|
|
||||||
// public shouldSticky: boolean = true;
|
|
||||||
|
|
||||||
public mobileContent: "info" | "metrics" | "actions" = "info";
|
public mobileContent: "info" | "metrics" | "actions" = "info";
|
||||||
public tabMobile: string = "";
|
public tabMobile: string = "";
|
||||||
public viewAllMobile: string = "";
|
public viewAllMobile: string = "";
|
||||||
|
@ -164,6 +162,7 @@ export class ResultLandingComponent {
|
||||||
@ViewChild("sdgFosSuggest") sdgFosSuggest: SdgFosSuggestComponent;
|
@ViewChild("sdgFosSuggest") sdgFosSuggest: SdgFosSuggestComponent;
|
||||||
|
|
||||||
public isMobile: boolean = false;
|
public isMobile: boolean = false;
|
||||||
|
public isBottomIntersecting: boolean = false;
|
||||||
// Full screen modals for small screens (mobile)
|
// Full screen modals for small screens (mobile)
|
||||||
@ViewChild('summaryFsModal') summaryFsModal: FullScreenModalComponent;
|
@ViewChild('summaryFsModal') summaryFsModal: FullScreenModalComponent;
|
||||||
@ViewChild('subjectsFsModal') subjectsFsModal: FullScreenModalComponent;
|
@ViewChild('subjectsFsModal') subjectsFsModal: FullScreenModalComponent;
|
||||||
|
@ -208,6 +207,11 @@ export class ResultLandingComponent {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
|
||||||
this.isMobile = isMobile;
|
this.isMobile = isMobile;
|
||||||
|
this.cdr.detectChanges();
|
||||||
|
}));
|
||||||
|
this.subscriptions.push(this.layoutService.isBottomIntersecting.subscribe(isBottomIntersecting => {
|
||||||
|
this.isBottomIntersecting = isBottomIntersecting;
|
||||||
|
this.cdr.detectChanges();
|
||||||
}));
|
}));
|
||||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||||
this.isLoggedIn = !!user;
|
this.isLoggedIn = !!user;
|
||||||
|
@ -294,16 +298,6 @@ export class ResultLandingComponent {
|
||||||
} else {
|
} else {
|
||||||
this.offset = 0;
|
this.offset = 0;
|
||||||
}
|
}
|
||||||
// let bottom = document.getElementById('bottom');
|
|
||||||
// if(bottom) {
|
|
||||||
// let observer = new IntersectionObserver(entries => {
|
|
||||||
// entries.forEach(entry => {
|
|
||||||
// this.shouldSticky = !entry.isIntersecting;
|
|
||||||
// })
|
|
||||||
// });
|
|
||||||
// this.subscriptions.push(observer);
|
|
||||||
// observer.observe(bottom);
|
|
||||||
// }
|
|
||||||
if(this.graph_and_feedback) {
|
if(this.graph_and_feedback) {
|
||||||
this.observeGraphAndFeedback();
|
this.observeGraphAndFeedback();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
export interface Icon {
|
export interface Icon {
|
||||||
name?: string,
|
name?: string,
|
||||||
svg?: string,
|
svg?: string,
|
||||||
class?: string
|
class?: string,
|
||||||
|
ratio?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export class MenuItem {
|
export class MenuItem {
|
||||||
|
@ -90,4 +91,4 @@ export class SideMenuItem extends MenuItem {
|
||||||
ukIcon: string = '';
|
ukIcon: string = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum MenuAlignment {LEFT = "LEFT", CENTER = "CENTER", RIGHT = "RIGHT"}
|
export enum MenuAlignment {LEFT = "LEFT", CENTER = "CENTER", RIGHT = "RIGHT"}
|
||||||
|
|
|
@ -70,7 +70,7 @@ export class BelongsTo {
|
||||||
if (field) {
|
if (field) {
|
||||||
field = Object.assign({}, field);
|
field = Object.assign({}, field);
|
||||||
let json: any = element;
|
let json: any = element;
|
||||||
if (field.path.length > 0) {
|
if (field.path.length > 0 && json) {
|
||||||
if (Array.isArray(json)) {
|
if (Array.isArray(json)) {
|
||||||
return json.findIndex(value => BelongsTo.check(value, field)) != -1;
|
return json.findIndex(value => BelongsTo.check(value, field)) != -1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -209,7 +209,7 @@ export class ResultLandingInfo {
|
||||||
this.belongsTo = !BelongsTo.result || BelongsTo.result.fields.findIndex(field => BelongsTo.check(this, field)) != -1;
|
this.belongsTo = !BelongsTo.result || BelongsTo.result.fields.findIndex(field => BelongsTo.check(this, field)) != -1;
|
||||||
this.message = !this.belongsTo ? BelongsTo.result.message : null;
|
this.message = !this.belongsTo ? BelongsTo.result.message : null;
|
||||||
if (this.message) {
|
if (this.message) {
|
||||||
this.message = this.message.replace('((result))', StringUtils.getEntityName(this.resultType));
|
this.message = this.message.replace('((result))', StringUtils.capitalizeAll(StringUtils.getEntityName(this.resultType)));
|
||||||
this.message = this.message.replace('((type_id))', typeId);
|
this.message = this.message.replace('((type_id))', typeId);
|
||||||
this.message = this.message.replace('((id))', id);
|
this.message = this.message.replace('((id))', id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
<span *ngIf="result.acronym">
|
<span *ngIf="result.acronym">
|
||||||
{{result.acronym}}
|
{{result.acronym}}
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="result.acronym && (result.title)"> (</span>
|
<ng-container *ngIf="result.acronym != result.title">
|
||||||
<span *ngIf="result.title" [innerHTML]="result.title"></span>
|
<span *ngIf="result.acronym && (result.title)"> (</span>
|
||||||
<span *ngIf="result.acronym && result.title">)</span>
|
<span *ngIf="result.title" [innerHTML]="result.title"></span>
|
||||||
|
<span *ngIf="result.acronym && result.title">)</span>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!result.title && !result.acronym">
|
<div *ngIf="!result.title && !result.acronym">
|
||||||
[no title available]
|
[no title available]
|
||||||
|
|
|
@ -443,9 +443,13 @@ export class StringUtils {
|
||||||
});
|
});
|
||||||
return <string []>words;
|
return <string []>words;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static capitalizeAll(str: string): string {
|
||||||
|
return str.split(' ').map(value => StringUtils.capitalize(value)).join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
public static capitalize(value: string): string {
|
public static capitalize(str: string): string {
|
||||||
return value.charAt(0).toUpperCase() + value.slice(1);
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue