Merge remote-tracking branch 'origin/develop' into dynamic-piwik
This commit is contained in:
commit
a37662cd7e
|
@ -0,0 +1,200 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1,86 +1,102 @@
|
|||
import {properties} from "../../../../environments/environment";
|
||||
|
||||
export class Layout {
|
||||
_id:string;
|
||||
portalPid:string;
|
||||
layoutOptions:CustomizationOptions;
|
||||
_id: string;
|
||||
portalPid: string;
|
||||
layoutOptions: CustomizationOptions;
|
||||
date;
|
||||
constructor(community, options:CustomizationOptions){
|
||||
|
||||
constructor(community, options: CustomizationOptions) {
|
||||
this.portalPid = community;
|
||||
this.layoutOptions = options;
|
||||
}
|
||||
|
||||
public static getVariables(options: CustomizationOptions): {} | null {
|
||||
if(options) {
|
||||
if (options) {
|
||||
let variables = {};
|
||||
if(options.identity) {
|
||||
variables['@global-primary-background'] = options.identity.mainColor;
|
||||
variables['@global-secondary-background'] = options.identity.secondaryColor;
|
||||
if (options.identity) {
|
||||
variables['@global-primary-background'] = Layout.convertRGBAtoRGB(options.identity.mainColor);
|
||||
variables['@global-secondary-background'] = Layout.convertRGBAtoRGB(options.identity.secondaryColor);
|
||||
}
|
||||
if(options.backgrounds){
|
||||
variables['@general-search-form-background'] = options.backgrounds.form.color;
|
||||
variables['@base-body-background'] = options.backgrounds.light.color;
|
||||
variables['@hero-background-image'] = (options.backgrounds.form.imageFile?(this.getUrl(properties.utilsService + '/download/' +options.backgrounds.form.imageFile)): 'none') ;
|
||||
if (options.backgrounds) {
|
||||
variables['@general-search-form-background'] = Layout.convertRGBAtoRGB(options.backgrounds.form.color);
|
||||
variables['@global-background'] = Layout.convertRGBAtoRGB(options.backgrounds.light.color);
|
||||
variables['@hero-background-image'] = (options.backgrounds.form.imageFile ? (this.getUrl(properties.utilsService + '/download/' + options.backgrounds.form.imageFile)) : 'none');
|
||||
variables['@hero-background-position'] = options.backgrounds.form.position;
|
||||
}
|
||||
if(options.buttons){
|
||||
if (options.buttons) {
|
||||
//general
|
||||
variables['@button-border-width'] = options.buttons.lightBackground.borderWidth + "px";
|
||||
variables['@button-border-radius'] = options.buttons.lightBackground.borderRadius + "px";
|
||||
// default -> on dark background todo check again when we have sucj=h buttons
|
||||
variables['@button-default-background'] = options.buttons.darkBackground.backgroundColor;
|
||||
variables['@button-default-color'] = options.buttons.darkBackground.color;
|
||||
variables['@button-default-border'] = options.buttons.darkBackground.borderColor;
|
||||
variables['@button-default-hover-background'] = options.buttons.darkBackground.onHover.backgroundColor;
|
||||
variables['@button-default-hover-color'] = options.buttons.darkBackground.onHover.color;
|
||||
variables['@button-default-hover-border'] = options.buttons.darkBackground.onHover.borderColor;
|
||||
variables['@button-default-active-background'] = options.buttons.darkBackground.onHover.backgroundColor;
|
||||
variables['@button-default-active-color'] = options.buttons.darkBackground.onHover.color;
|
||||
variables['@button-default-active-border'] = options.buttons.darkBackground.onHover.borderColor;
|
||||
variables['@button-default-background'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.backgroundColor);
|
||||
variables['@button-default-color'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.color);
|
||||
variables['@button-default-border'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.borderColor);
|
||||
variables['@button-default-hover-background'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.backgroundColor);
|
||||
variables['@button-default-hover-color'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.color);
|
||||
variables['@button-default-hover-border'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.borderColor);
|
||||
variables['@button-default-active-background'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.backgroundColor);
|
||||
variables['@button-default-active-color'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.color);
|
||||
variables['@button-default-active-border'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.borderColor);
|
||||
|
||||
// primary
|
||||
variables['@button-primary-background'] = options.buttons.lightBackground.backgroundColor;
|
||||
variables['@button-primary-color'] = options.buttons.lightBackground.color;
|
||||
variables['@button-primary-border'] = options.buttons.lightBackground.borderColor;
|
||||
variables['@button-primary-hover-background'] = options.buttons.lightBackground.onHover.backgroundColor;
|
||||
variables['@button-primary-hover-color'] = options.buttons.lightBackground.onHover.color;
|
||||
variables['@button-primary-hover-border'] = options.buttons.lightBackground.onHover.borderColor;
|
||||
variables['@button-primary-active-background'] = options.buttons.lightBackground.onHover.backgroundColor;
|
||||
variables['@button-primary-active-color'] = options.buttons.lightBackground.onHover.color;
|
||||
variables['@button-primary-active-border'] = options.buttons.lightBackground.onHover.borderColor;
|
||||
variables['@button-primary-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
|
||||
variables['@button-primary-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
|
||||
variables['@button-primary-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.borderColor);
|
||||
variables['@button-primary-hover-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.backgroundColor);
|
||||
variables['@button-primary-hover-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.color);
|
||||
variables['@button-primary-hover-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.borderColor);
|
||||
variables['@button-primary-active-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.backgroundColor);
|
||||
variables['@button-primary-active-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.color);
|
||||
variables['@button-primary-active-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.borderColor);
|
||||
|
||||
// secondary
|
||||
variables['@button-secondary-background'] = options.buttons.lightBackground.color;
|
||||
variables['@button-secondary-color'] = options.buttons.lightBackground.backgroundColor;
|
||||
variables['@button-secondary-border'] = options.buttons.lightBackground.backgroundColor;
|
||||
variables['@button-secondary-hover-background'] = options.buttons.lightBackground.backgroundColor;
|
||||
variables['@button-secondary-hover-color'] = options.buttons.lightBackground.color;
|
||||
variables['@button-secondary-hover-border'] = options.buttons.lightBackground.borderColor;
|
||||
variables['@button-secondary-active-background'] = options.buttons.lightBackground.backgroundColor;
|
||||
variables['@button-secondary-active-color'] = options.buttons.lightBackground.color;
|
||||
variables['@button-secondary-active-border'] = options.buttons.lightBackground.borderColor;
|
||||
variables['@button-secondary-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
|
||||
variables['@button-secondary-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
|
||||
variables['@button-secondary-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
|
||||
variables['@button-secondary-hover-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
|
||||
variables['@button-secondary-hover-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
|
||||
variables['@button-secondary-hover-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.borderColor);
|
||||
variables['@button-secondary-active-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
|
||||
variables['@button-secondary-active-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
|
||||
variables['@button-secondary-active-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.borderColor);
|
||||
|
||||
}
|
||||
return variables;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static getUrl(url){
|
||||
|
||||
public static getUrl(url) {
|
||||
return 'url("' + url + '")';
|
||||
}
|
||||
|
||||
public static convertRGBAtoRGB(color: string): string {
|
||||
if(color.includes('rgba')) {
|
||||
const regexPattern = /rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/;
|
||||
const matches = color.match(regexPattern);
|
||||
const [, r, g, b, a] = matches;
|
||||
let R = parseInt(r)*parseFloat(a) + (1 - parseFloat(a))*255;
|
||||
let G = parseInt(g)*parseFloat(a) + (1 - parseFloat(a))*255;
|
||||
let B = parseInt(b)*parseFloat(a) + (1 - parseFloat(a))*255;
|
||||
return 'rgb(' + R + ',' + G + ',' + B + ',' + ')';
|
||||
} else {
|
||||
return color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class CustomizationOptions {
|
||||
identity: {
|
||||
mainColor: string;
|
||||
secondaryColor: string;
|
||||
};
|
||||
identityIsCustom:boolean;
|
||||
backgroundsIsCustom:boolean;
|
||||
buttonsIsCustom:boolean;
|
||||
identityIsCustom: boolean;
|
||||
backgroundsIsCustom: boolean;
|
||||
buttonsIsCustom: boolean;
|
||||
backgrounds: {
|
||||
dark: {
|
||||
color: string; //background
|
||||
color: string; //background
|
||||
}
|
||||
light: {
|
||||
color: string; //background
|
||||
|
@ -89,7 +105,7 @@ export class CustomizationOptions {
|
|||
color: string; //background
|
||||
imageUrl: string;
|
||||
imageFile: string;
|
||||
position:string;
|
||||
position: string;
|
||||
}
|
||||
};
|
||||
buttons: {
|
||||
|
@ -98,24 +114,24 @@ export class CustomizationOptions {
|
|||
};
|
||||
|
||||
constructor(mainColor: string = null, secondaryColor: string = null) {
|
||||
this.identity= {
|
||||
this.identity = {
|
||||
mainColor: mainColor ? mainColor : CustomizationOptions.getIdentity().mainColor,
|
||||
secondaryColor : secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
||||
secondaryColor: secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
||||
};
|
||||
this.identityIsCustom = false;
|
||||
this.backgroundsIsCustom = false;
|
||||
this.buttonsIsCustom = false;
|
||||
this.backgrounds={
|
||||
dark : {
|
||||
this.backgrounds = {
|
||||
dark: {
|
||||
color: this.identity.mainColor,
|
||||
},
|
||||
light : {
|
||||
light: {
|
||||
color: "#f9f9f9" //CustomizationOptions.getRGBA(this.identity.mainColor,0.05),
|
||||
},
|
||||
form : {
|
||||
color: CustomizationOptions.getRGBA(this.identity.mainColor,0.15),
|
||||
imageUrl : null,
|
||||
imageFile : null,
|
||||
form: {
|
||||
color: CustomizationOptions.getRGBA(this.identity.mainColor, 0.15),
|
||||
imageUrl: null,
|
||||
imageFile: null,
|
||||
position: null
|
||||
}
|
||||
};
|
||||
|
@ -123,7 +139,7 @@ export class CustomizationOptions {
|
|||
|
||||
this.buttons = {
|
||||
darkBackground: {
|
||||
isDefault:true,
|
||||
isDefault: true,
|
||||
backgroundColor: "#ffffff",
|
||||
color: "#000000",
|
||||
borderStyle: "solid",
|
||||
|
@ -137,7 +153,7 @@ export class CustomizationOptions {
|
|||
}
|
||||
},
|
||||
lightBackground: {
|
||||
isDefault:true,
|
||||
isDefault: true,
|
||||
backgroundColor: this.identity.mainColor,
|
||||
color: '#ffffff',
|
||||
borderStyle: "solid",
|
||||
|
@ -153,12 +169,13 @@ export class CustomizationOptions {
|
|||
|
||||
};
|
||||
}
|
||||
public static checkForObsoleteVersion(current:CustomizationOptions, communityId:string){
|
||||
let defaultCO = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor,CustomizationOptions.getIdentity(communityId).secondaryColor);
|
||||
|
||||
public static checkForObsoleteVersion(current: CustomizationOptions, communityId: string) {
|
||||
let defaultCO = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
|
||||
let updated = Object.assign({}, defaultCO);
|
||||
if(!current){
|
||||
if (!current) {
|
||||
current = Object.assign({}, defaultCO);
|
||||
}else {
|
||||
} else {
|
||||
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
|
||||
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
|
||||
}
|
||||
|
@ -198,39 +215,41 @@ export class CustomizationOptions {
|
|||
|
||||
|
||||
}
|
||||
public static getIdentity(community:string=null){
|
||||
let COLORS= {
|
||||
default:{
|
||||
mainColor:'#4687E6',
|
||||
|
||||
public static getIdentity(community: string = null) {
|
||||
let COLORS = {
|
||||
default: {
|
||||
mainColor: '#4687E6',
|
||||
secondaryColor: '#2D72D6'
|
||||
},
|
||||
"covid-19":{
|
||||
mainColor:"#03ADEE",
|
||||
"covid-19": {
|
||||
mainColor: "#03ADEE",
|
||||
secondaryColor: "#F15157"
|
||||
}
|
||||
};
|
||||
if(community && COLORS[community]){
|
||||
if (community && COLORS[community]) {
|
||||
return COLORS[community];
|
||||
}
|
||||
return COLORS.default;
|
||||
}
|
||||
public static getRGBA(color, A){
|
||||
if(color.indexOf("#")!=-1){
|
||||
return 'rgba('+parseInt(color.substring(1,3),16)+','+parseInt(color.substring(3,5),16)+','+parseInt(color.substring(5,7),16)+','+A+')';
|
||||
|
||||
public static getRGBA(color, A) {
|
||||
if (color.indexOf("#") != -1) {
|
||||
return 'rgba(' + parseInt(color.substring(1, 3), 16) + ',' + parseInt(color.substring(3, 5), 16) + ',' + parseInt(color.substring(5, 7), 16) + ',' + A + ')';
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
public static isForLightBackground(color:string){
|
||||
public static isForLightBackground(color: string) {
|
||||
let L, r, g, b, a = 1;
|
||||
if(color.length == 7 || color.length == 9) {
|
||||
if (color.length == 7 || color.length == 9) {
|
||||
r = parseInt(color.substring(1, 3), 16);
|
||||
g = parseInt(color.substring(3, 5), 16);
|
||||
b = parseInt(color.substring(5, 7), 16);
|
||||
if(color.length == 9) {
|
||||
a = parseInt(color.substring(7, 9), 16);
|
||||
if (color.length == 9) {
|
||||
a = parseInt(color.substring(7, 9), 16);
|
||||
}
|
||||
}else if(color.length > 9){
|
||||
} else if (color.length > 9) {
|
||||
let array = color.split("rgba(")[1].split(")")[0].split(",");
|
||||
r = parseInt(array[0]);
|
||||
g = parseInt(array[1]);
|
||||
|
@ -238,7 +257,7 @@ export class CustomizationOptions {
|
|||
a = +array[3];
|
||||
|
||||
}
|
||||
const brightness = r* 0.299 + g * 0.587 + b * 0.114 + (1 - a) * 255;
|
||||
const brightness = r * 0.299 + g * 0.587 + b * 0.114 + (1 - a) * 255;
|
||||
|
||||
return (brightness < 186)
|
||||
|
||||
|
@ -258,8 +277,9 @@ export class CustomizationOptions {
|
|||
|
||||
|
||||
}
|
||||
export class ButtonsCustomization{
|
||||
isDefault:boolean;
|
||||
|
||||
export class ButtonsCustomization {
|
||||
isDefault: boolean;
|
||||
backgroundColor: string;
|
||||
color: string;
|
||||
borderStyle: string;
|
||||
|
|
|
@ -122,8 +122,8 @@ export class CommunityService {
|
|||
} else {
|
||||
community.fos = [];
|
||||
}
|
||||
if (resData.advancedConstraint != null) {
|
||||
community.selectionCriteria = resData.advancedConstraint;
|
||||
if (resData.advancedConstraints != null) {
|
||||
community.selectionCriteria = resData.advancedConstraints;
|
||||
} else {
|
||||
community.selectionCriteria = new SelectionCriteria();
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import {
|
|||
import {LayoutService, SidebarItem} from "../sidebar/layout.service";
|
||||
|
||||
declare var UIkit;
|
||||
declare var ResizeObserver;
|
||||
|
||||
@Component({
|
||||
selector: '[page-content]',
|
||||
|
@ -99,23 +98,24 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
|
||||
ngAfterViewInit() {
|
||||
if (typeof document !== "undefined") {
|
||||
this.observeStickyFooter();
|
||||
if (this.shouldSticky && typeof document !== 'undefined') {
|
||||
this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), {
|
||||
offset: this.offset
|
||||
});
|
||||
this.subscriptions.push(UIkit.util.on(document, 'active', '#' + this.sticky.header.$el.id, () => {
|
||||
this.isStickyActive = true;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.subscriptions.push(UIkit.util.on(document, 'inactive', '#' + this.sticky.header.$el.id, () => {
|
||||
this.isStickyActive = false;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
}
|
||||
if (this.sticky_footer) {
|
||||
let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement);
|
||||
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset});
|
||||
this.initFooter();
|
||||
this.observeStickyFooter();
|
||||
}
|
||||
if (this.shouldSticky && typeof document !== 'undefined') {
|
||||
setTimeout(() => {
|
||||
this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), {
|
||||
offset: this.offset
|
||||
});
|
||||
this.subscriptions.push(UIkit.util.on(document, 'active', '#' + this.sticky.header.$el.id, () => {
|
||||
this.isStickyActive = true;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.subscriptions.push(UIkit.util.on(document, 'inactive', '#' + this.sticky.header.$el.id, () => {
|
||||
this.isStickyActive = false;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -124,12 +124,16 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
this.subscriptions.forEach(subscription => {
|
||||
if (typeof ResizeObserver !== "undefined" && subscription instanceof ResizeObserver) {
|
||||
subscription.disconnect();
|
||||
} else if (typeof ResizeObserver !== "undefined" && subscription instanceof IntersectionObserver) {
|
||||
} else if (typeof IntersectionObserver !== "undefined" && subscription instanceof IntersectionObserver) {
|
||||
subscription.disconnect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
initFooter() {
|
||||
let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement);
|
||||
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset});
|
||||
}
|
||||
|
||||
/**
|
||||
* Workaround for sticky not update bug when sidebar is toggled.
|
||||
|
@ -206,8 +210,7 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
let resizeObs = new ResizeObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
setTimeout(() => {
|
||||
this.sticky.footer.offset = this.calcStickyFooterOffset(entry.target);
|
||||
this.cdr.detectChanges();
|
||||
this.initFooter();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
|
|
@ -59,7 +59,7 @@ export class LayoutService {
|
|||
/**
|
||||
* Add hasQuickContact: false on data of route config, if the quick-contact fixed button is not needed.
|
||||
*/
|
||||
private hasQuickContactSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
||||
private hasQuickContactSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
/**
|
||||
* Add activeMenuItem: string on data of route config, if page should activate a specific MenuItem and route url does not match.
|
||||
*/
|
||||
|
|
|
@ -49,7 +49,9 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
|
|||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.toggle(true);
|
||||
setTimeout(() => {
|
||||
this.toggle(true);
|
||||
});
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
|
|
|
@ -35,8 +35,11 @@ export class HttpInterceptorService implements HttpInterceptor {
|
|||
return of(response);
|
||||
} else {
|
||||
if (isPlatformServer(this.platformId)) {
|
||||
if(request.url.startsWith('/assets') || request.url.startsWith('assets')) {
|
||||
return of(null);
|
||||
}
|
||||
let headers = new HttpHeaders();
|
||||
if(request.withCredentials) {
|
||||
if(request.withCredentials && !properties.hasMachineCache) {
|
||||
headers = headers.set('Cookie', this.req.get('Cookie'));
|
||||
}
|
||||
const authReq = request.clone({
|
||||
|
|
|
@ -186,8 +186,8 @@ export class DataProviderComponent {
|
|||
this.stickyHeader = false;
|
||||
this.updateDescription("");
|
||||
|
||||
if(data["pv"]) {
|
||||
this.prevPath = data["pv"];
|
||||
if(data["return_path"]) {
|
||||
this.prevPath = data["return_path"] + (data["search_params"] ? ("?"+data["search_params"]) : "");
|
||||
}
|
||||
if((typeof document !== 'undefined') && document.referrer) {
|
||||
this.referrer = document.referrer;
|
||||
|
@ -845,7 +845,11 @@ export class DataProviderComponent {
|
|||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
return this.routerHelper.addQueryParam("pv", this.prevPath, obj);
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -141,7 +141,11 @@ export class RelatedDatasourcesTabComponent {
|
|||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
return this.routerHelper.addQueryParam("pv", this.prevPath, obj);
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -128,7 +128,11 @@ export class AvailableOnComponent {
|
|||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
return this.routerHelper.addQueryParam("pv", this.prevPath, obj);
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -110,7 +110,11 @@ export class FundedByComponent {
|
|||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
return this.routerHelper.addQueryParam("pv", this.prevPath, obj);
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,9 @@ import {EnvProperties} from '../../../utils/properties/env-properties';
|
|||
import {ClickEvent} from "../../../utils/click/click-outside-or-esc.directive";
|
||||
import {NumberUtils} from "../../../utils/number-utils.class";
|
||||
import {OpenaireEntities} from "../../../utils/properties/searchFields";
|
||||
import {StringUtils} from "../../../utils/string-utils.class";
|
||||
import {properties} from "../../../../../environments/environment";
|
||||
import {RouterHelper} from "../../../utils/routerHelper.class";
|
||||
|
||||
@Component({
|
||||
selector: 'metrics',
|
||||
|
@ -77,7 +80,7 @@ import {OpenaireEntities} from "../../../utils/properties/searchFields";
|
|||
<tbody>
|
||||
<tr *ngFor="let key of getKeys(metrics.infos)">
|
||||
<td class="uk-width-1-3 uk-text-center uk-text-truncate" uk-tooltip [title]="metrics.infos.get(key).name">
|
||||
<a [href]="metrics.infos.get(key).url + (prevPath ? ('&pv='+prevPath) : '')">
|
||||
<a [queryParams]="addEoscPrevInParams({datasourceId: metrics.infos.get(key).url})" [routerLink]="properties.searchLinkToDataProvider.split('?')[0]">
|
||||
{{metrics.infos.get(key).name}}
|
||||
</a>
|
||||
</td>
|
||||
|
@ -151,6 +154,7 @@ export class MetricsComponent {
|
|||
public status: number;
|
||||
public state: number = -1;
|
||||
public openaireEntities = OpenaireEntities;
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
|
||||
constructor(private metricsService: MetricsService, private cdr: ChangeDetectorRef) {
|
||||
}
|
||||
|
@ -313,4 +317,15 @@ export class MetricsComponent {
|
|||
let formatted = NumberUtils.roundNumber(+num);
|
||||
return formatted.number + formatted.size;
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,11 @@ import {MetricsService} from '../../../services/metrics.service';
|
|||
import {ErrorMessagesModule} from '../../../utils/errorMessages.module';
|
||||
import {IFrameModule} from "../../../utils/iframe.module";
|
||||
import {IconsModule} from "../../../utils/icons/icons.module";
|
||||
import {RouterModule} from "@angular/router";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, ErrorMessagesModule, IFrameModule, IconsModule
|
||||
CommonModule, FormsModule, RouterModule, ErrorMessagesModule, IFrameModule, IconsModule
|
||||
],
|
||||
declarations: [
|
||||
MetricsComponent
|
||||
|
|
|
@ -9,10 +9,11 @@ import {StringUtils} from "../../utils/string-utils.class";
|
|||
})
|
||||
export class ParsingFunctions {
|
||||
public eoscSubjects = [
|
||||
{label: 'EOSC::Jupyter Notebook', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3AJupyter+Notebook', value: 'Jupyter Notebook'},
|
||||
{label: 'EOSC::RO-crate', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/datasources/eosc.psnc.6f0470e3bb9203ec3a7553f3a72a7a1f?q=ROHub', value: 'RO-crate'},
|
||||
{label: 'EOSC::Galaxy Workflow', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3AGalaxy+Workflow', value: 'Galaxy Workflow'},
|
||||
{label: 'EOSC::Twitter Data', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3ATwitter+Data', value: 'Twitter Data'}
|
||||
{label: 'EOSC::Jupyter Notebook', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:"EOSC%5C:%5C:Jupyter%20Notebook"', value: 'Jupyter Notebook'},
|
||||
{label: 'EOSC::RO-crate', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/data-source?q=*&fq=tag_list:%22eosc%5C:%5C:ro%5C-crate%22', value: 'RO-crate'},
|
||||
{label: 'EOSC::Galaxy Workflow', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:%22eosc%5C:%5C:galaxy%20workflow%22', value: 'Galaxy Workflow'},
|
||||
{label: 'EOSC::Twitter Data', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:%22EOSC%5C:%5C:Twitter%20Data%22', value: 'Twitter Data'},
|
||||
{label: 'EOSC::Data Cube', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:%22EOSC%5C:%5C:Data%20Cube%22', value: 'Data Cube'}
|
||||
]
|
||||
|
||||
public notebookInSubjects: boolean = false;
|
||||
|
|
|
@ -170,8 +170,8 @@ export class OrganizationComponent {
|
|||
this.updateTitle("Organization");
|
||||
this.updateDescription("");
|
||||
|
||||
if(params["pv"]) {
|
||||
this.prevPath = params["pv"];
|
||||
if(params["return_path"]) {
|
||||
this.prevPath = params["return_path"] + (params["search_params"] ? ("?"+params["search_params"]) : "");
|
||||
}
|
||||
if((typeof document !== 'undefined') && document.referrer) {
|
||||
this.referrer = document.referrer;
|
||||
|
|
|
@ -214,8 +214,8 @@ export class ProjectComponent {
|
|||
this.updateTitle(title);
|
||||
this.updateDescription(description);
|
||||
|
||||
if(params["pv"]) {
|
||||
this.prevPath = params["pv"];
|
||||
if(params["return_path"]) {
|
||||
this.prevPath = params["return_path"] + (params["search_params"] ? ("?"+params["search_params"]) : "");
|
||||
}
|
||||
if((typeof document !== 'undefined') && document.referrer) {
|
||||
this.referrer = document.referrer;
|
||||
|
@ -979,7 +979,11 @@ export class ProjectComponent {
|
|||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
return this.routerHelper.addQueryParam("pv", this.prevPath, obj);
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -466,7 +466,7 @@
|
|||
<img src="assets/common-assets/eosc-logo.png"
|
||||
loading="lazy" alt="eosc_logo" style="width:27px; height:27px">
|
||||
<div class="uk-margin-small-left uk-flex uk-flex-column uk-flex-center">
|
||||
<div *ngFor="let subject of resultLandingInfo.eoscSubjects; let i=index" class="uk-text-truncate">
|
||||
<div *ngFor="let subject of resultLandingInfo.eoscSubjects; let i=index" class="uk-text-truncate" uk-tooltip="This interoperability link will provide you with a list of services able to process it in EOSC.">
|
||||
<a [href]="subject.link" target="_blank" class="custom-external">{{subject.value}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -208,9 +208,8 @@ export class ResultLandingComponent {
|
|||
this.egiTransferModalOpen = true;
|
||||
}
|
||||
this.updateDescription("");
|
||||
|
||||
if(data["pv"]) {
|
||||
this.prevPath = data["pv"];
|
||||
if(data["return_path"]) {
|
||||
this.prevPath = data["return_path"] + (data["search_params"] ? ("?"+data["search_params"]) : "");
|
||||
}
|
||||
if((typeof document !== 'undefined') && document.referrer) {
|
||||
this.referrer = document.referrer;
|
||||
|
@ -723,7 +722,7 @@ export class ResultLandingComponent {
|
|||
}
|
||||
if(!this.identifier) {
|
||||
this._location.go(( pid ? (this.linkToLandingPage.split("?")[0] + "?pid=" + pid.id):
|
||||
(this.linkToLandingPage + this.id)) + (this.prevPath ? ("&pv="+this.prevPath) : ""));
|
||||
(this.linkToLandingPage + this.id)) + this.getEoscParams());
|
||||
}
|
||||
// else {
|
||||
// this._location.go(this.linkToLandingPage.split("?")[0] + "?pid=" + this.identifier.id);
|
||||
|
@ -924,9 +923,25 @@ export class ResultLandingComponent {
|
|||
this.descriptionModal.open();
|
||||
}
|
||||
|
||||
public getEoscParams() {
|
||||
let params = "";
|
||||
if(this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
params = "&return_path="+StringUtils.URIEncode(splitted[0]);
|
||||
if(splitted.length > 0) {
|
||||
params += "&search_params="+StringUtils.URIEncode(splitted[1]);
|
||||
}
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
return this.routerHelper.addQueryParam("pv", this.prevPath, obj);
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -1,299 +0,0 @@
|
|||
@import "~src/assets/openaire-theme/less/_import-variables";
|
||||
|
||||
@media only screen and (min-width: @breakpoint-small) {
|
||||
.how .first > div:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.how .first > div:first-child:after {
|
||||
content: "we";
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
padding-bottom: 5%;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/1.svg");
|
||||
right: -21%;
|
||||
top: 33%;
|
||||
width: 20%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
|
||||
.how .second > div:first-child {
|
||||
position: relative;
|
||||
padding: 0 10% 0 20%;
|
||||
}
|
||||
|
||||
.how .second > div:first-child:after {
|
||||
content: "and";
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
padding-bottom: 5%;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/2.svg");
|
||||
right: -17%;
|
||||
top: 33%;
|
||||
width: 30%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
|
||||
.how .third {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.how .third > div:first-child {
|
||||
padding: 0 14% 0 13%;
|
||||
}
|
||||
|
||||
.how .third:after {
|
||||
content: "on which";
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
padding-right: 30%;
|
||||
padding-top: 5%;
|
||||
padding-bottom: 5%;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
bottom: -6%;
|
||||
left: 13%;
|
||||
transform: translateY(100%);
|
||||
width: 140px;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .fourth {
|
||||
padding: 10% 3% 0 3%;
|
||||
}
|
||||
|
||||
.how .fourth > div:first-child {
|
||||
position: relative;
|
||||
padding: 0 16% 0 16%;
|
||||
}
|
||||
|
||||
.how .fourth> div:first-child:after {
|
||||
content: "and";
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
padding-bottom: 5%;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/4.svg");
|
||||
left: -18%;
|
||||
top: 36%;
|
||||
width: 30%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
|
||||
.how .fifth {
|
||||
padding: 11% 2% 0 2%;
|
||||
}
|
||||
|
||||
.how .fifth > div:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.how .fifth > div:first-child:after {
|
||||
content: "We";
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
padding-bottom: 5%;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/5.svg");
|
||||
left: -35%;
|
||||
top: 36%;
|
||||
width: 30%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
|
||||
.how .sixth {
|
||||
padding: 10% 5% 0 0;
|
||||
}
|
||||
|
||||
.how .sixth > div:first-child {
|
||||
padding: 0 15% 0 15%;
|
||||
}
|
||||
|
||||
.how .final {
|
||||
padding: 10% 20% 0 20%;
|
||||
}
|
||||
|
||||
.how .final > div:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.how .final > div:first-child:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/6.svg");
|
||||
left: -26%;
|
||||
top: -20%;
|
||||
height: 70%;
|
||||
width: 30%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
|
||||
.how .final > div:first-child:after {
|
||||
content: "We make visualizations, graphs, reports and deliver all in a customisable tool";
|
||||
font-size: 20px;
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
width: 250px;
|
||||
padding: 8% 0 5% 0;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: @breakpoint-xsmall-max) {
|
||||
.how .first {
|
||||
position: relative;
|
||||
padding-bottom: 30%;
|
||||
}
|
||||
|
||||
.how .first:after {
|
||||
content: "we";
|
||||
text-align: center;
|
||||
padding: 10% 34% 10% 0;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
left: 26%;
|
||||
top: 79%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .second {
|
||||
position: relative;
|
||||
padding: 0 10% 30% 10%;
|
||||
}
|
||||
|
||||
.how .second:after {
|
||||
content: "and";
|
||||
text-align: center;
|
||||
padding: 10% 34% 10% 0;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
left: 25%;
|
||||
top: 80%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .third {
|
||||
position: relative;
|
||||
padding: 0 5% 30% 5%;
|
||||
}
|
||||
|
||||
.how .third:after {
|
||||
content: "on which";
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 10% 41% 10% 0;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
left: 15%;
|
||||
top: 83%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .fourth {
|
||||
position: relative;
|
||||
padding: 0 0 30% 0;
|
||||
}
|
||||
|
||||
.how .fourth > div:first-child {
|
||||
padding: 0 10% 0 10%;
|
||||
}
|
||||
|
||||
.how .fourth:after {
|
||||
content: "and";
|
||||
text-align: center;
|
||||
padding: 10% 34% 10% 0;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
left: 26%;
|
||||
top: 79%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .fifth {
|
||||
position: relative;
|
||||
padding: 0 2% 30% 2%;
|
||||
}
|
||||
|
||||
.how .fifth:after {
|
||||
content: "We";
|
||||
text-align: center;
|
||||
padding: 10% 34% 10% 0;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
left: 27%;
|
||||
top: 76%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .sixth {
|
||||
padding: 0 5% 30% 0;
|
||||
}
|
||||
|
||||
.how .sixth > div:first-child {
|
||||
padding: 0 15% 0 15%;
|
||||
}
|
||||
|
||||
.how .final {
|
||||
padding: 20% 0 20% 0;
|
||||
}
|
||||
|
||||
.how .final > div:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.how .final > div:first-child:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/6.svg");
|
||||
left: 34%;
|
||||
top: -70%;
|
||||
height: 70%;
|
||||
width: 30%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .final > div:first-child:after {
|
||||
content: "We make visualizations, graphs, reports and deliver all in a customisable tool";
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
left: -62%;
|
||||
top: 85%;
|
||||
width: 300px;
|
||||
padding: 12% 0 0 54%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
import {Component} from "@angular/core";
|
||||
|
||||
@Component({
|
||||
selector: 'how',
|
||||
template: `
|
||||
<div class="how" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-fade; delay: 100">
|
||||
<div class="uk-flex uk-flex-wrap">
|
||||
<div class="uk-width-1-3@s first" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/1.png" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-text-center uk-text-large">
|
||||
<span class="uk-text-uppercase uk-text-bold">Starting</span> from existing<br>research-related data sources
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-3@s second" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/2.png" loading="lazy">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-3@s third" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/3.png" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-text-center uk-text-large">
|
||||
build an open, global<br>and trusted Research graph
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-wrap">
|
||||
<div class="uk-width-1-3@s fourth uk-flex-last@s" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/4.png" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-text-center">
|
||||
we perform <span class="uk-text-uppercase uk-text-bold">Statistical <br> Analysis</span> and produce <br>
|
||||
<span class="uk-text-primary">Open Science Indicators</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-3@s fifth" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/5.png" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-text-center">
|
||||
furthermore <span class="uk-text-uppercase uk-text-bold">Network<br>Analysis</span> producing <br>
|
||||
<span class="uk-text-primary">Collaboration Indicators</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-3@s sixth uk-flex-first@s" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/6.png" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-text-center">
|
||||
Often combine with external data <br>
|
||||
(patents, social, company) and
|
||||
perform <br><span class="uk-text-uppercase uk-text-bold">Impact Analysis</span> to
|
||||
produce <br><span class="uk-text-primary">Innovation Indicators</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="final" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/7.png" loading="lazy">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
styleUrls: ['how.component.less']
|
||||
})
|
||||
export class HowComponent {
|
||||
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {HowComponent} from "./how.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule],
|
||||
declarations: [HowComponent],
|
||||
exports: [HowComponent]
|
||||
})
|
||||
export class HowModule {
|
||||
|
||||
}
|
|
@ -26,7 +26,7 @@ import {Subscriber} from "rxjs";
|
|||
<div>
|
||||
<h5>Indicator themes that we are covering in the Monitor dashboards.</h5>
|
||||
<p>
|
||||
This is the current set of indicator themes we cover. We’ll keep enriching it as new requests and data are coming into the <a href="https://graph.openaire.eu" class="text-graph" target="_blank">OpenAIRE Research Graph</a>. We are at your disposal, should you have any recommendations!
|
||||
This is the current set of indicator themes we cover. We’ll keep enriching it as new requests and data are coming into the <a href="https://graph.openaire.eu" class="text-graph" target="_blank">OpenAIRE Graph</a>. We are at your disposal, should you have any recommendations!
|
||||
</p>
|
||||
<p>
|
||||
Check out the indicator pages (for <a [routerLink]="['../funder']" [relativeTo]="route">funders</a>,
|
||||
|
@ -50,7 +50,7 @@ import {Subscriber} from "rxjs";
|
|||
<div>
|
||||
<h5 class="uk-margin-large-top uk-margin-large-bottom">Indicator themes that we are covering in the Monitor dashboards.</h5>
|
||||
<p>
|
||||
This is the current set of indicator themes we cover. We’ll keep enriching it as new requests and data are coming into the <a href="https://graph.openaire.eu" class="text-graph" target="_blank">OpenAIRE Research Graph</a>. We are at your disposal, should you have any recommendations!
|
||||
This is the current set of indicator themes we cover. We’ll keep enriching it as new requests and data are coming into the <a href="https://graph.openaire.eu" class="text-graph" target="_blank">OpenAIRE Graph</a>. We are at your disposal, should you have any recommendations!
|
||||
</p>
|
||||
<p>
|
||||
Check out the indicator pages (for <a [routerLink]="['../funder']" [relativeTo]="route">funders</a>,
|
||||
|
|
|
@ -32,7 +32,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
</li>
|
||||
<li><span class="uk-text-bold">Coverage and accuracy:</span> As detailed in <a
|
||||
href="https://graph.openaire.eu/" target="_blank">graph.openaire.eu</a>
|
||||
multiple data sources are ingested in the OpenAIRE research graph for coverage to the fullest extent
|
||||
multiple data sources are ingested in the OpenAIRE Graph for coverage to the fullest extent
|
||||
possible, in order to provide meaningful indicators.
|
||||
</li>
|
||||
<li><span class="uk-text-bold">Clarity and replicability:</span> We describe our construction methodology in
|
||||
|
@ -69,7 +69,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
<h2 class="uk-margin-small-top">How? It’s about open data and collaboration<span class="text-graph">.</span></h2>
|
||||
<ul class="uk-list uk-list-bullet uk-margin-large-top">
|
||||
<li class="uk-flex uk-flex-column uk-margin-medium-bottom">
|
||||
<span class="uk-text-large uk-margin-small-bottom">Built on the <span class="uk-text-bold">OpenAire Research Graph</span></span>
|
||||
<span class="uk-text-large uk-margin-small-bottom">Built on the <span class="uk-text-bold">OpenAire Graph</span></span>
|
||||
<span>Linked scholarly information from open initiatives around the world. Beyond publications.</span>
|
||||
</li>
|
||||
<li class="uk-flex uk-flex-column uk-margin-medium-bottom">
|
||||
|
@ -84,7 +84,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
</div>
|
||||
</div>
|
||||
<div class="uk-position-relative">
|
||||
<img class="uk-visible@m uk-height-1-1 uk-position-center-right" src="assets/common-assets/common/graph-nodes.svg" alt="OpenAIRE Research Graph" loading="lazy">
|
||||
<img class="uk-visible@m uk-height-1-1 uk-position-center-right" src="assets/common-assets/common/graph-nodes.svg" alt="OpenAIRE Graph" loading="lazy">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -105,7 +105,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
</li>
|
||||
<li class="uk-margin-small-bottom"><span class="uk-text-bold">Coverage and accuracy:</span> As detailed in <a
|
||||
href="https://graph.openaire.eu/" target="_blank">graph.openaire.eu</a>
|
||||
multiple data sources are ingested in the OpenAIRE research graph for coverage to the fullest extent
|
||||
multiple data sources are ingested in the OpenAIRE Graph for coverage to the fullest extent
|
||||
possible, in order to provide meaningful indicators.
|
||||
</li>
|
||||
<li class="uk-margin-small-bottom"><span class="uk-text-bold">Clarity and replicability:</span> We describe our construction methodology in
|
||||
|
@ -131,7 +131,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-xlarge-top uk-padding-large">
|
||||
<img src="assets/common-assets/common/graph-nodes.svg" alt="OpenAIRE Research Graph" loading="lazy">
|
||||
<img src="assets/common-assets/common/graph-nodes.svg" alt="OpenAIRE Graph" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-margin-top uk-margin-large-bottom">
|
||||
<span class="uk-text-large text-graph">Completeness, inclusion, transparency and replicability</span>
|
||||
|
@ -139,7 +139,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
<h2 class="uk-margin-remove-top uk-padding uk-padding-remove-vertical uk-padding-remove-left">It’s about open data and collaboration<span class="text-graph">.</span></h2>
|
||||
<ul class="uk-list uk-list-bullet uk-margin-large-top">
|
||||
<li class="uk-flex uk-flex-column uk-margin-medium-bottom">
|
||||
<span class="uk-text-large uk-margin-small-bottom">Built on the <span class="uk-text-bold">OpenAire Research Graph</span></span>
|
||||
<span class="uk-text-large uk-margin-small-bottom">Built on the <span class="uk-text-bold">OpenAire Graph</span></span>
|
||||
<span>Linked scholarly information from open initiatives around the world. Beyond publications.</span>
|
||||
</li>
|
||||
<li class="uk-flex uk-flex-column uk-margin-medium-bottom">
|
||||
|
|
|
@ -5,10 +5,7 @@ import {MethodolocigalApproachComponent} from "./methodological-approach.compone
|
|||
import {RouterModule} from "@angular/router";
|
||||
import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import {PageContentModule} from "../../dashboard/sharedComponents/page-content/page-content.module";
|
||||
import {HowModule} from "../how/how.module";
|
||||
import {IconsModule} from "../../utils/icons/icons.module";
|
||||
import {IconsService} from "../../utils/icons/icons.service";
|
||||
import {graph} from "../../utils/icons/icons";
|
||||
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
|
||||
import {SliderTabsModule} from "../../sharedComponents/tabs/slider-tabs.module";
|
||||
import {HelperModule} from "../../utils/helper/helper.module";
|
||||
|
@ -32,11 +29,8 @@ import {HelperModule} from "../../utils/helper/helper.module";
|
|||
component: MethodolocigalApproachComponent,
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
]), PageContentModule, HowModule, IconsModule, BreadcrumbsModule, SliderTabsModule, HelperModule],
|
||||
]), PageContentModule, IconsModule, BreadcrumbsModule, SliderTabsModule, HelperModule],
|
||||
exports: [TerminologyComponent, MethodolocigalApproachComponent]
|
||||
})
|
||||
export class MethodologyModule {
|
||||
constructor(private iconsService: IconsService) {
|
||||
this.iconsService.registerIcons([graph]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.uk-width-medium {
|
||||
width: 350px;
|
||||
}
|
|
@ -42,15 +42,14 @@ declare var ResizeObserver;
|
|||
<div id="graph_element" #graph_element class="uk-blur-background" uk-sticky="bottom: true"
|
||||
[attr.offset]="graph_offset">
|
||||
<div class="uk-container uk-container-large uk-margin-small-top uk-margin-small-bottom">
|
||||
<icon name="graph" customClass="text-graph"></icon>
|
||||
<span class="uk-margin-small-left uk-text-meta">More information for </span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="text-graph">OpenAIRE Research Graph</a>
|
||||
<span class="uk-text-meta">.</span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@m">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 17px;">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-section uk-container uk-container-large" uk-scrollspy-class>
|
||||
<div id="parentContainer" class="uk-grid uk-grid-large" uk-grid>
|
||||
<div class="uk-width-1-4 uk-margin-top">
|
||||
<div class="uk-width-medium uk-margin-top">
|
||||
<div class="uk-sticky" uk-sticky="bottom: !#parentContainer; offset: 100;">
|
||||
<slider-tabs type="scrollable" position="left">
|
||||
<slider-tab tabId="entities" tabTitle="1. Entities"></slider-tab>
|
||||
|
@ -87,10 +86,9 @@ declare var ResizeObserver;
|
|||
<div id="graph_element" #graph_element class="uk-blur-background" uk-sticky="bottom: true"
|
||||
[attr.offset]="graph_offset">
|
||||
<div class="uk-container uk-container-large uk-margin-small-top uk-margin-small-bottom uk-text-xsmall uk-text-right">
|
||||
<icon name="graph" customClass="text-graph"></icon>
|
||||
<span class="uk-margin-small-left uk-text-meta">More information for </span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="text-graph">OpenAIRE Research Graph</a>
|
||||
<span class="uk-text-meta">.</span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@m">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 17px;">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -116,7 +114,8 @@ declare var ResizeObserver;
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
`,
|
||||
styleUrls: ['terminology.component.less']
|
||||
})
|
||||
export class TerminologyComponent implements OnInit, OnDestroy, AfterViewInit, AfterContentChecked {
|
||||
public tab: 'entities' | 'attributes' = 'entities';
|
||||
|
|
|
@ -55,26 +55,26 @@ export class SdgComponent implements OnInit, OnDestroy {
|
|||
this.updateUrl(this.url);
|
||||
this.updateTitle(this.pageTitle);
|
||||
this.updateDescription(this.pageDescription);
|
||||
this.vocabulariesService.getSDGs(properties).subscribe(data => {
|
||||
this.subscriptions.push(this.vocabulariesService.getSDGs(properties).subscribe(data => {
|
||||
this.sdgs = data['sdg'];
|
||||
});
|
||||
this.subscriptions.push(this.refineFieldResultsService.getRefineFieldsResultsByEntityName(['sdg'], 'result', this.properties, refineParams).subscribe(data => {
|
||||
this.sdgsResearchOutcomes = data[1][0].values;
|
||||
let merged =[];
|
||||
for(let i=0; i<this.sdgs.length; i++){
|
||||
merged.push({
|
||||
...this.sdgs[i],
|
||||
...(this.sdgsResearchOutcomes.find((innerItem) => innerItem.id === this.sdgs[i].id))
|
||||
});
|
||||
}
|
||||
this.displayedSdgs = merged;
|
||||
this.loading = false;
|
||||
}));
|
||||
}));
|
||||
let refineParams = null;
|
||||
if(this.customFilter) {
|
||||
let refineValue = StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId)));
|
||||
refineParams = '&fq=' + refineValue;
|
||||
}
|
||||
this.refineFieldResultsService.getRefineFieldsResultsByEntityName(['sdg'], 'result', this.properties, refineParams).subscribe(data => {
|
||||
this.sdgsResearchOutcomes = data[1][0].values;
|
||||
let merged =[];
|
||||
for(let i=0; i<this.sdgs.length; i++){
|
||||
merged.push({
|
||||
...this.sdgs[i],
|
||||
...(this.sdgsResearchOutcomes.find((innerItem) => innerItem.id === this.sdgs[i].id))
|
||||
});
|
||||
}
|
||||
this.displayedSdgs = merged;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
|
|
|
@ -56,6 +56,7 @@ export class EntitiesSelectionComponent {
|
|||
showPage["" + data['pages'][i]["route"] + ""] = data['pages'][i]["isEnabled"];
|
||||
}
|
||||
}
|
||||
this.entities = [];
|
||||
if(this.onlyresults) {
|
||||
if(this.simpleView) {
|
||||
this.entities.push({label: 'All ' + OpenaireEntities.RESULTS.toLowerCase(), value: 'all'});
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
|
||||
<li *ngFor="let result of results">
|
||||
<div class="uk-card uk-card-default uk-position-relative uk-flex uk-flex-column uk-flex-center"
|
||||
[ngClass]="result.type" [class.uk-disabled]="!hasPermission(result)">
|
||||
[ngClass]="result.type" [class.noColor]="properties.adminToolsPortalType == 'connect'" [class.uk-disabled]="!hasPermission(result)">
|
||||
<div *ngIf="type === 'community' && result.isSubscribed" [class.uk-position-top-left]="!isMobile" [class.uk-position-top-right]="isMobile" class="uk-text-background uk-text-center uk-padding-small uk-text-uppercase uk-text-bold">
|
||||
<span>Member</span>
|
||||
</div>
|
||||
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="result.description && !isMobile" class="uk-margin-top uk-text-small multi-line-ellipsis lines-3">
|
||||
<p class="uk-text-meta" [innerHTML]="result.description"></p>
|
||||
<p class="uk-text-meta" >{{result.description | htmlToString}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-5@m uk-width-1-3 uk-flex-first@m">
|
||||
|
|
|
@ -11,15 +11,15 @@
|
|||
|
||||
@media(min-width: @breakpoint-medium) {
|
||||
.uk-card {
|
||||
&.funder {
|
||||
&.funder:not(.noColor) {
|
||||
.setType(@funder-color);
|
||||
}
|
||||
|
||||
&.ri {
|
||||
&.ri:not(.noColor) {
|
||||
.setType(@ri-color);
|
||||
}
|
||||
|
||||
&.organization {
|
||||
&.organization:not(.noColor) {
|
||||
.setType(@organization-color);
|
||||
}
|
||||
}
|
||||
|
@ -27,15 +27,15 @@
|
|||
|
||||
@media(max-width: @breakpoint-small-max) {
|
||||
.uk-card {
|
||||
&.funder {
|
||||
&.funder:not(.noColor) {
|
||||
.setType(@funder-color, bottom);
|
||||
}
|
||||
|
||||
&.ri {
|
||||
&.ri:not(.noColor) {
|
||||
.setType(@ri-color, bottom);
|
||||
}
|
||||
|
||||
&.organization {
|
||||
&.organization:not(.noColor) {
|
||||
.setType(@organization-color, bottom);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,12 +11,13 @@ import {UrlPrefixModule} from "../../utils/pipes/url-prefix.module";
|
|||
import {IconsService} from "../../utils/icons/icons.service";
|
||||
import {incognito, restricted} from "../../utils/icons/icons";
|
||||
import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
|
||||
import {HTMLToStringPipeModule} from "../../utils/pipes/HTMLToStringPipe.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
RouterModule, ErrorMessagesModule,
|
||||
AlertModalModule, ManageModule, IconsModule, UrlPrefixModule, LogoUrlPipeModule
|
||||
AlertModalModule, ManageModule, IconsModule, UrlPrefixModule, LogoUrlPipeModule, HTMLToStringPipeModule
|
||||
],
|
||||
declarations: [
|
||||
PortalSearchResultComponent
|
||||
|
|
|
@ -58,7 +58,7 @@ export class MetricsService {
|
|||
info = {};
|
||||
|
||||
info.name = result[2];
|
||||
info.url = properties.searchLinkToDataProvider+id;
|
||||
info.url = id;
|
||||
info.numOfDownloads = "0";
|
||||
info.openaireDownloads = "0";
|
||||
info.numOfViews = "0";
|
||||
|
|
|
@ -15,13 +15,12 @@ import {
|
|||
ViewChild,
|
||||
ViewChildren
|
||||
} from "@angular/core";
|
||||
import {AbstractControl, UntypedFormArray, UntypedFormControl, ValidatorFn} from "@angular/forms";
|
||||
import {AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup, ValidatorFn} from "@angular/forms";
|
||||
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
||||
import {BehaviorSubject, Subscription} from "rxjs";
|
||||
import {EnvProperties} from "../../utils/properties/env-properties";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {ClickEvent} from "../../utils/click/click-outside-or-esc.directive";
|
||||
import {element} from "protractor";
|
||||
|
||||
export type InputType =
|
||||
'text'
|
||||
|
@ -31,7 +30,8 @@ export type InputType =
|
|||
| 'autocomplete_soft'
|
||||
| 'textarea'
|
||||
| 'select'
|
||||
| 'chips';
|
||||
| 'chips'
|
||||
| 'year-range';
|
||||
|
||||
export interface Option {
|
||||
icon?: string,
|
||||
|
@ -48,6 +48,16 @@ export interface Placeholder {
|
|||
static?: boolean
|
||||
}
|
||||
|
||||
export interface YearRange {
|
||||
from: ControlConfiguration,
|
||||
to: ControlConfiguration
|
||||
}
|
||||
|
||||
export interface ControlConfiguration {
|
||||
control: string,
|
||||
placeholder: string
|
||||
}
|
||||
|
||||
declare var UIkit;
|
||||
|
||||
/**
|
||||
|
@ -63,11 +73,11 @@ declare var UIkit;
|
|||
<div *ngIf="formControl" [id]="id">
|
||||
<div class="input-wrapper" [class.disabled]="formControl.disabled" [class.opened]="opened"
|
||||
[class.focused]="focused" [ngClass]="inputClass" [class.hint]="hint"
|
||||
[class.active]="(formAsControl?.value || selectable || formAsArray?.length > 0 || getLabel(formAsControl?.value)) && !focused"
|
||||
[class.active]="!focused && (formAsControl?.value || selectable || formAsArray?.length > 0 || getLabel(formAsControl?.value) || yearRangeActive)"
|
||||
[class.danger]="(formControl.invalid && (formControl.touched || !!searchControl?.touched)) || (!!searchControl?.invalid && !!searchControl?.touched)">
|
||||
<div #inputBox class="input-box" [class.select]="selectable" click-outside-or-esc
|
||||
[class.static]="placeholderInfo?.static" (clickOutside)="click($event)">
|
||||
<div *ngIf="!placeholderInfo?.static && placeholderInfo.label" class="placeholder">
|
||||
<div *ngIf="!placeholderInfo?.static && placeholderInfo?.label" class="placeholder">
|
||||
<label>{{placeholderInfo.label}} <sup *ngIf="required">*</sup></label>
|
||||
</div>
|
||||
<div class="uk-flex" [class.uk-flex-middle]="type !== 'textarea'"
|
||||
|
@ -140,6 +150,17 @@ declare var UIkit;
|
|||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template [ngIf]="type === 'year-range' && yearRange && formAsGroup">
|
||||
<div class="uk-width-2-5">
|
||||
<input #input class="input uk-text-center uk-text-truncate" [attr.placeholder]="yearRange.from.placeholder"
|
||||
maxlength="4" (click)="activeIndex = 0;$event.preventDefault()" [formControl]="getFormByName(yearRange.from.control)">
|
||||
</div>
|
||||
<div class="uk-width-1-5 uk-text-center">-</div>
|
||||
<div class="uk-width-2-5">
|
||||
<input #input class="input uk-text-center uk-text-truncate" [attr.placeholder]="yearRange.to.placeholder"
|
||||
maxlength="4" (click)="activeIndex = 1;$event.preventDefault()" [formControl]="getFormByName(yearRange.to.control)">
|
||||
</div>
|
||||
</ng-template>
|
||||
<div
|
||||
*ngIf="(formControl.disabled && disabledIcon) || icon || (selectable && selectArrow) || type === 'autocomplete' || searchable"
|
||||
class="uk-margin-small-left icon">
|
||||
|
@ -157,6 +178,7 @@ declare var UIkit;
|
|||
</button>
|
||||
</ng-template>
|
||||
</div>
|
||||
<!-- use action-icon class in order to apply css in your icon button-->
|
||||
<ng-content select="[action]"></ng-content>
|
||||
</div>
|
||||
<div class="tools">
|
||||
|
@ -179,7 +201,7 @@ declare var UIkit;
|
|||
</div>
|
||||
</div>
|
||||
<span *ngIf="formControl?.invalid && formControl?.touched" class="uk-text-danger">
|
||||
<span *ngIf="formControl.errors.error">{{formControl.errors.error}}</span>
|
||||
<span *ngIf="errors?.error">{{errors?.error}}</span>
|
||||
<span *ngIf="type === 'URL' || type === 'logoURL'">Please provide a valid URL (e.g. https://example.com)</span>
|
||||
</span>
|
||||
<span class="uk-text-small uk-text-danger">
|
||||
|
@ -213,7 +235,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
@Input() tooltip: boolean = false;
|
||||
@Input() searchable: boolean = false;
|
||||
/** Text */
|
||||
@ViewChild('input') input: ElementRef;
|
||||
@ViewChildren('input') input: QueryList<ElementRef>;
|
||||
/** Textarea options */
|
||||
@ViewChild('textArea') textArea: ElementRef;
|
||||
@Input('rows') rows: number = 3;
|
||||
|
@ -236,6 +258,10 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
@Input() visibleChips: number = 1;
|
||||
@Input() separators: string[] = [];
|
||||
@Input() noWrap: boolean = false;
|
||||
/** Year Range Configuration */
|
||||
@Input() yearRange: YearRange;
|
||||
public activeIndex: 0 | 1 | null = null;
|
||||
|
||||
@Input() visibleRows: number = -1;
|
||||
@Input() extendEnter: () => void = null;
|
||||
@Output() focusEmitter: EventEmitter<boolean> = new EventEmitter<boolean>();
|
||||
|
@ -259,7 +285,9 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
|
||||
@Input()
|
||||
set placeholder(placeholder: string | Placeholder) {
|
||||
if (typeof placeholder === 'string') {
|
||||
if(this.type === 'year-range') {
|
||||
this.placeholderInfo = null;
|
||||
} else if (typeof placeholder === 'string') {
|
||||
this.placeholderInfo = {label: placeholder, static: false};
|
||||
} else {
|
||||
if (placeholder.static && (this.type === 'autocomplete' || this.hint)) {
|
||||
|
@ -325,9 +353,9 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
|
||||
@HostListener('window:keydown.arrowLeft', ['$event'])
|
||||
arrowLeft(event: KeyboardEvent) {
|
||||
if (this.focused) {
|
||||
event.preventDefault();
|
||||
if (this.type === 'chips' && this.focused) {
|
||||
if (this.activeElement.getValue()) {
|
||||
event.preventDefault();
|
||||
let index = this.chips.toArray().indexOf(this.activeElement.getValue());
|
||||
if (index > 0) {
|
||||
this.activeElement.next(this.chips.get(index - 1));
|
||||
|
@ -339,9 +367,9 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
|
||||
@HostListener('window:keydown.arrowRight', ['$event'])
|
||||
arrowRight(event: KeyboardEvent) {
|
||||
if (this.focused) {
|
||||
event.preventDefault();
|
||||
if (this.type === 'chips' && this.focused) {
|
||||
if (this.activeElement.getValue()) {
|
||||
event.preventDefault();
|
||||
let index = this.chips.toArray().indexOf(this.activeElement.getValue());
|
||||
if (index < this.chips.length - 1) {
|
||||
this.activeElement.next(this.chips.get(index + 1));
|
||||
|
@ -432,6 +460,22 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
this.unsubscribe();
|
||||
}
|
||||
|
||||
getFormByName(name: string): UntypedFormControl {
|
||||
if (this.formControl instanceof UntypedFormGroup) {
|
||||
return <UntypedFormControl>this.formControl.get(name);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
get formAsGroup(): UntypedFormGroup {
|
||||
if (this.formControl instanceof UntypedFormGroup) {
|
||||
return this.formControl;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
get formAsControl(): UntypedFormControl {
|
||||
if (this.formControl instanceof UntypedFormControl) {
|
||||
return this.formControl;
|
||||
|
@ -448,6 +492,25 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
}
|
||||
}
|
||||
|
||||
get yearRangeActive(): boolean {
|
||||
if(this.yearRange) {
|
||||
return this.formAsGroup && (this.getFormByName(this.yearRange.from.control)?.value || this.getFormByName(this.yearRange.to.control)?.value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
get errors(): any {
|
||||
if(this.formAsGroup) {
|
||||
return (this.formAsGroup.errors
|
||||
?this.formAsGroup.errors:(this.getFormByName(this.yearRange.from.control).errors
|
||||
?this.getFormByName(this.yearRange.from.control).errors:this.getFormByName(this.yearRange.to.control).errors));
|
||||
} else if(this.formAsControl) {
|
||||
return this.formAsControl.errors;
|
||||
} else {
|
||||
return this.searchControl.errors;
|
||||
}
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.secure = true;
|
||||
this.unsubscribe();
|
||||
|
@ -455,7 +518,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
if (this.type === 'logoURL') {
|
||||
this.secure = (!this.initValue || this.initValue.includes('https://'));
|
||||
}
|
||||
if (this.optionsArray) {
|
||||
if (this.optionsArray?.length > 0) {
|
||||
this.filteredOptions = this.filter('');
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
|
@ -475,26 +538,28 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
}
|
||||
}));
|
||||
}
|
||||
if (this.formControl.validator) {
|
||||
if (this.formAsControl?.validator) {
|
||||
let validator = this.formControl.validator({} as AbstractControl);
|
||||
this.required = (validator && validator.required);
|
||||
}
|
||||
this.subscriptions.push(this.formControl.valueChanges.subscribe(value => {
|
||||
if (this.formControl.enabled) {
|
||||
value = (value === '') ? null : value;
|
||||
if (this.type === 'logoURL') {
|
||||
this.secure = (!value || value.includes('https://'));
|
||||
}
|
||||
if (this.initValue === value || (this.initValue === '' && value === null)) {
|
||||
this.formControl.markAsPristine();
|
||||
} else {
|
||||
this.formControl.markAsDirty();
|
||||
}
|
||||
if (this.type === 'autocomplete_soft') {
|
||||
this.filteredOptions = this.filter(value);
|
||||
this.cdr.detectChanges();
|
||||
if (this.focused) {
|
||||
this.open(true);
|
||||
if(this.type !== 'year-range') {
|
||||
value = (value === '') ? null : value;
|
||||
if (this.type === 'logoURL') {
|
||||
this.secure = (!value || value.includes('https://'));
|
||||
}
|
||||
if (this.initValue === value || (this.initValue === '' && value === null)) {
|
||||
this.formControl.markAsPristine();
|
||||
} else {
|
||||
this.formControl.markAsDirty();
|
||||
}
|
||||
if (this.type === 'autocomplete_soft') {
|
||||
this.filteredOptions = this.filter(value);
|
||||
this.cdr.detectChanges();
|
||||
if (this.focused) {
|
||||
this.open(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((this.value && value && this.value !== value) || (!this.value && value) || this.value && !value) {
|
||||
|
@ -502,8 +567,36 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
}
|
||||
}
|
||||
}));
|
||||
if(this.formAsGroup) {
|
||||
let fromControl = this.formAsGroup.get(this.yearRange.from.control);
|
||||
this.subscriptions.push(fromControl.valueChanges.subscribe(value => {
|
||||
let from = this.initValue[this.yearRange.from.control];
|
||||
if (from === value || (from === '' && value === null)) {
|
||||
fromControl.markAsPristine();
|
||||
} else {
|
||||
fromControl.markAsDirty();
|
||||
}
|
||||
if(fromControl.valid) {
|
||||
if(this.activeIndex === 0 && value) {
|
||||
this.activeIndex = 1;
|
||||
this.input.get(this.activeIndex).nativeElement.focus();
|
||||
}
|
||||
}
|
||||
}));
|
||||
let toControl = this.formAsGroup.get(this.yearRange.to.control);
|
||||
this.subscriptions.push(toControl.valueChanges.subscribe(value => {
|
||||
let to = this.initValue[this.yearRange.to.control];
|
||||
if (to === value || (to === '' && value === null)) {
|
||||
toControl.markAsPristine();
|
||||
} else {
|
||||
toControl.markAsDirty();
|
||||
}
|
||||
}));
|
||||
}
|
||||
if (this.input) {
|
||||
this.input.nativeElement.disabled = this.formControl.disabled;
|
||||
this.input.forEach(input => {
|
||||
input.nativeElement.disabled = this.formControl.disabled;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -598,14 +691,17 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
}
|
||||
|
||||
focus(value: boolean, event = null) {
|
||||
if(!this.activeIndex) {
|
||||
this.activeIndex = 0;
|
||||
}
|
||||
if (this.focused) {
|
||||
this.formControl.markAsTouched();
|
||||
}
|
||||
this.focused = value;
|
||||
this.cdr.detectChanges();
|
||||
if (this.focused) {
|
||||
if (this.input) {
|
||||
this.input.nativeElement.focus();
|
||||
if (this.input?.length > 0) {
|
||||
this.input.get(this.activeIndex).nativeElement.focus();
|
||||
} else if (this.textArea) {
|
||||
this.textArea.nativeElement.focus();
|
||||
} else if (this.searchInput) {
|
||||
|
@ -618,9 +714,12 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
this.open(true);
|
||||
}
|
||||
} else {
|
||||
this.activeIndex = null;
|
||||
this.open(false);
|
||||
if (this.input) {
|
||||
this.input.nativeElement.blur();
|
||||
this.input.forEach(input => {
|
||||
input.nativeElement.blur();
|
||||
})
|
||||
} else if (this.textArea) {
|
||||
this.textArea.nativeElement.blur();
|
||||
} else if (this.searchInput) {
|
||||
|
|
|
@ -317,7 +317,7 @@
|
|||
</div>
|
||||
<ng-template #header_template let-mobile="mobile">
|
||||
<a *ngIf="!activeHeader.url" [routerLink]="activeHeader.route" [class.uk-padding-remove]="!isHeaderLeft"
|
||||
class="uk-logo uk-navbar-item uk-flex uk-flex-middle">
|
||||
class="uk-logo uk-navbar-item uk-flex uk-flex-middle" [class.small]="activeHeader.logoInfo">
|
||||
<img *ngIf="(mobile && activeHeader.logoSmallUrl) || (!mobile && activeHeader.logoUrl)"
|
||||
[src]="!mobile?activeHeader.logoUrl:activeHeader.logoSmallUrl"
|
||||
[alt]="activeHeader.title">
|
||||
|
@ -329,7 +329,7 @@
|
|||
</ng-container>
|
||||
</a>
|
||||
<a *ngIf="activeHeader.url" [href]="activeHeader.url" [class.uk-padding-remove]="!isHeaderLeft"
|
||||
class="uk-logo uk-navbar-item uk-flex uk-flex-middle">
|
||||
class="uk-logo uk-navbar-item uk-flex uk-flex-middle" [class.small]="activeHeader.logoInfo">
|
||||
<img *ngIf="(mobile && activeHeader.logoSmallUrl) || (!mobile && activeHeader.logoUrl)"
|
||||
[src]="!mobile?activeHeader.logoUrl:activeHeader.logoSmallUrl"
|
||||
[alt]="activeHeader.title">
|
||||
|
|
|
@ -5,7 +5,7 @@ import { BehaviorSubject, Observable } from "rxjs";
|
|||
providedIn: "root"
|
||||
})
|
||||
export class QuickContactService {
|
||||
private display: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
||||
private display: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
|
||||
public get isDisplayed(): Observable<boolean> {
|
||||
return this.display.asObservable();
|
||||
|
|
|
@ -60,7 +60,7 @@ export class EGIDataTransferComponent {
|
|||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
if(this.isOpen){
|
||||
if(this.isOpen && typeof document !== 'undefined'){
|
||||
this.open();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,14 +185,16 @@ export class AlertModal implements OnInit, AfterViewInit, OnDestroy {
|
|||
* Opens an alert window creating backdrop.
|
||||
*/
|
||||
open() {
|
||||
UIkit.modal(this.element.nativeElement).show();
|
||||
if(typeof UIkit !== "undefined") {
|
||||
UIkit.modal(this.element.nativeElement).show();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ok method closes the modal and emits modalOutput.
|
||||
*/
|
||||
ok() {
|
||||
if (!this.stayOpen) {
|
||||
if (!this.stayOpen && typeof UIkit !== "undefined") {
|
||||
UIkit.modal(this.element.nativeElement).hide();
|
||||
}
|
||||
if (!this.choice) {
|
||||
|
@ -209,6 +211,8 @@ export class AlertModal implements OnInit, AfterViewInit, OnDestroy {
|
|||
* cancel method closes the modal.
|
||||
*/
|
||||
cancel() {
|
||||
UIkit.modal(this.element.nativeElement).hide();
|
||||
if(typeof UIkit !== "undefined") {
|
||||
UIkit.modal(this.element.nativeElement).hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export type Environment = "development" | "test" | "beta" | "production";
|
||||
export type Dashboard = "explore" | "connect" | "monitor" | "aggregator" | "eosc";
|
||||
export type Dashboard = "explore" | "connect" | "monitor" | "aggregator" | "eosc" | "client-management-portal";
|
||||
export type PortalType = "explore" | "connect" | "community" | "monitor" | "funder" | "ri" | "project" | "organization" | "aggregator" | "eosc";
|
||||
|
||||
export interface EnvProperties {
|
||||
|
@ -144,4 +144,5 @@ export interface EnvProperties {
|
|||
connectPortalUrl?;
|
||||
eoscDataTransferAPI?;
|
||||
eoscDataTransferDestinations?;
|
||||
hasMachineCache?: boolean;
|
||||
}
|
||||
|
|
|
@ -180,7 +180,11 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
|||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
return this.routerHelper.addQueryParam("pv", this.prevPath, obj);
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -122,12 +122,12 @@ export class ISVocabulariesService {
|
|||
|
||||
getFos(properties: EnvProperties): Observable<any> {
|
||||
let url = "/assets/common-assets/vocabulary/fos.json";
|
||||
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||
return this.http.get(url).pipe(map(res => (res && res['fos'])?res:{fos: []}));
|
||||
}
|
||||
|
||||
getSDGs(properties: EnvProperties): Observable<any> {
|
||||
let url = "/assets/common-assets/vocabulary/sdg.json";
|
||||
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||
return this.http.get(url).pipe(map(res => (res && res['sdg'])?res:{sdg: []}));
|
||||
}
|
||||
|
||||
parseSDGs(data: any): AutoCompleteValue[] {
|
||||
|
|
Loading…
Reference in New Issue