@@ -30,24 +36,33 @@ export class FosComponent {
@Input() subjects: string[];
@Input() viewAll: boolean = false;
@Output() viewAllClicked = new EventEmitter();
+ @Output() feedbackClicked = new EventEmitter();
public lessBtn: boolean = false;
public threshold: number = 2;
public routerHelper: RouterHelper = new RouterHelper();
public properties = properties;
- public title: string = "Fields of Science (FOS) [Beta]";
+ public title: string = "Fields of Science";
public viewAllClick() {
- if(this.subjects.length <= this.threshold*2) {
- this.viewAll = true;
- this.lessBtn = true;
- } else {
+ // if(this.subjects.length <= this.threshold*2) {
+ // this.viewAll = true;
+ // this.lessBtn = true;
+ // } else {
this.viewAll = true;
this.viewAllClicked.emit('fos');
- }
+ // }
}
public viewLessClick() {
this.viewAll = false;
this.viewAllClicked.emit("");
}
+
+ public feedbackClick() {
+ this.feedbackClicked.emit("");
+ }
+
+ public urlEncodeAndQuote(str: string): string {
+ return StringUtils.quote(StringUtils.URIEncode(str));
+ }
}
\ No newline at end of file
diff --git a/landingPages/landing-utils/fundedBy.component.ts b/landingPages/landing-utils/fundedBy.component.ts
index 64d1b3b7..23fd374f 100644
--- a/landingPages/landing-utils/fundedBy.component.ts
+++ b/landingPages/landing-utils/fundedBy.component.ts
@@ -11,14 +11,14 @@ import {properties} from "../../../../environments/environment";
{{title}}
{{title}}
-
View less
+
View less
threshold && !viewAll"
- (click)="viewAllClick();">View more
+ (click)="viewAllClick();" class="view-more-less-link">View all
diff --git a/landingPages/landing-utils/sdg.component.ts b/landingPages/landing-utils/sdg.component.ts
index 29a8199e..7aa5283c 100644
--- a/landingPages/landing-utils/sdg.component.ts
+++ b/landingPages/landing-utils/sdg.component.ts
@@ -1,19 +1,25 @@
import {Component, EventEmitter, Input, Output} from "@angular/core";
import {RouterHelper} from "../../utils/routerHelper.class";
import {properties} from "../../../../environments/environment";
+import {StringUtils} from "../../utils/string-utils.class";
@Component({
selector: 'sdg',
template: `
-
-
+ Beta
+
@@ -21,8 +27,8 @@ import {properties} from "../../../../environments/environment";
loading="lazy" alt="sdg_colors" style="width:27px; height:27px">
@@ -35,24 +41,33 @@ export class SdgComponent {
@Input() subjects: string[];
@Input() viewAll: boolean = false;
@Output() viewAllClicked = new EventEmitter();
+ @Output() feedbackClicked = new EventEmitter();
public lessBtn: boolean = false;
public threshold: number = 4;
public routerHelper: RouterHelper = new RouterHelper();
public properties = properties;
- public title: string = "Sustainable Development Goals (SDG) [Beta]";
+ public title: string = "SDGs";
public viewAllClick() {
- if(this.subjects.length <= this.threshold*2) {
- this.viewAll = true;
- this.lessBtn = true;
- } else {
+ // if(this.subjects.length <= this.threshold*2) {
+ // this.viewAll = true;
+ // this.lessBtn = true;
+ // } else {
this.viewAll = true;
this.viewAllClicked.emit('sdg');
- }
+ // }
}
public viewLessClick() {
this.viewAll = false;
this.viewAllClicked.emit("");
}
+
+ public feedbackClick() {
+ this.feedbackClicked.emit("");
+ }
+
+ public urlEncodeAndQuote(str: string): string {
+ return StringUtils.quote(StringUtils.URIEncode(str));
+ }
}
\ No newline at end of file
diff --git a/landingPages/landing-utils/showIdentifiers.component.ts b/landingPages/landing-utils/showIdentifiers.component.ts
index 5203b285..21e55ecb 100644
--- a/landingPages/landing-utils/showIdentifiers.component.ts
+++ b/landingPages/landing-utils/showIdentifiers.component.ts
@@ -44,7 +44,7 @@ import {properties} from "../../../../environments/environment";
diff --git a/landingPages/landing-utils/showSubjects.component.ts b/landingPages/landing-utils/showSubjects.component.ts
index 20684e75..92096e41 100644
--- a/landingPages/landing-utils/showSubjects.component.ts
+++ b/landingPages/landing-utils/showSubjects.component.ts
@@ -17,23 +17,11 @@ import {properties} from "../../../../environments/environment";
Subjects by Vocabulary
-
-
-
- {{key}}:
-
-
-
- {{subject}}
-
-
-
-
-
-
-
-
+
+
+
0) || (otherSubjects && otherSubjects.size > 0)">
0">
@@ -41,7 +29,7 @@ import {properties} from "../../../../environments/environment";
@@ -65,6 +53,30 @@ import {properties} from "../../../../environments/environment";
+
+
+
+
+
+
+ {{key}}:
+
+
+
+ {{subject}}
+
+
+
+
+
+
+
+
+
+
+
`
})
@@ -73,14 +85,18 @@ export class ShowSubjectsComponent {
@Input() otherSubjects: Map
;
@Input() classifiedSubjects: Map;
isLarge: boolean = false;
+ isClassifiedLarge: boolean = false;
properties = properties;
specialSubjects = [];
@ViewChildren("content", { read: ElementRef }) content: QueryList;
+ @ViewChildren("classifiedContent", { read: ElementRef }) classifiedContent: QueryList;
@ViewChild('subjectsModal') subjectsModal;
+ @ViewChild('subjectsByVocabularyModal') subjectsByVocabularyModal;
@HostListener('window:resize', ['$event'])
onResize(event) {
this.checkLarge();
+ this.checkLargeClassified();
}
constructor(private cdr: ChangeDetectorRef) {
@@ -113,6 +129,7 @@ export class ShowSubjectsComponent {
ngAfterViewInit() {
this.checkLarge();
+ this.checkLargeClassified();
}
checkLarge() {
@@ -124,6 +141,19 @@ export class ShowSubjectsComponent {
}
}
+ checkLargeClassified() {
+ let overflow = 42;
+ if(typeof document !== "undefined") {
+ this.getKeys(this.classifiedSubjects).forEach(key => {
+ let tag = this.classifiedContent.find(tag => tag.nativeElement.id === "content_"+key);
+ if(tag && tag.nativeElement.offsetHeight > overflow) {
+ this.isClassifiedLarge = true;
+ }
+ });
+ this.cdr.detectChanges();
+ }
+ }
+
public getKeys(map) {
return Array.from(map.keys());
}
@@ -137,4 +167,11 @@ export class ShowSubjectsComponent {
this.subjectsModal.alertTitle = "Subjects";
this.subjectsModal.open();
}
+
+ public openSubjectsByVocabularyModal() {
+ this.subjectsByVocabularyModal.cancelButton = false;
+ this.subjectsByVocabularyModal.okButton = false;
+ this.subjectsByVocabularyModal.alertTitle = "Subjects by Vocabulary";
+ this.subjectsByVocabularyModal.open();
+ }
}
diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html
index 8e1d1ee3..3e3b11e8 100644
--- a/landingPages/project/project.component.html
+++ b/landingPages/project/project.component.html
@@ -352,12 +352,12 @@
diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html
index 89bb4013..a06eda61 100644
--- a/landingPages/result/resultLanding.component.html
+++ b/landingPages/result/resultLanding.component.html
@@ -94,8 +94,8 @@