[Aggregator]: Updates in css | Bug fix in isRouteEnabled check.
1. portal.ts & aggregators.ts: [Bug fix] In method "getMockCommunityInfo()" set also pid for community (isRouteEnabled.guard needs it) | Updates in less files (overrides of colors) 2. styles.less: Updated imports (added linking, landing and canada-custom and removed aggregator-custom). 3. numbers.component.ts: Updated default value of @Input() colorClass to "uk-text-primary". 4. connectHelper.ts: In method "getCommunityFromDomain()" added also "aggregator" and "eosc" portal types to set domain on development.
This commit is contained in:
parent
bae33e0a51
commit
3c1623d12c
|
@ -5,8 +5,10 @@ import {Session} from "../login/utils/helper.class";
|
|||
export class ConnectHelper {
|
||||
|
||||
public static getCommunityFromDomain(domain: string): string{
|
||||
if(properties.environment == "development" && (properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community")) {
|
||||
domain = "covid-19.openaire.eu"; //for testing
|
||||
if(properties.environment == "development" &&
|
||||
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|
||||
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
|
||||
domain = "canada.explore.openaire.eu"; //for testing
|
||||
}
|
||||
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
|
||||
if (domain.indexOf('eosc-portal.eu') != -1) {
|
||||
|
|
|
@ -143,7 +143,7 @@ interface Link {
|
|||
`,
|
||||
})
|
||||
export class NumbersComponent implements OnInit, OnDestroy {
|
||||
@Input() colorClass = 'portal-color';
|
||||
@Input() colorClass = 'uk-text-primary';
|
||||
@Input() backgroundClass = null;
|
||||
/** Add a value if you want to apply refine query*/
|
||||
@Input() refineValue = null;
|
||||
|
|
|
@ -184,8 +184,9 @@ export class Portal {
|
|||
};;
|
||||
};
|
||||
|
||||
public static getMockCommunityInfo(disabledEntities:string[],disabledPages:string[]): any {
|
||||
public static getMockCommunityInfo(pid: string, disabledEntities:string[],disabledPages:string[]): any {
|
||||
let communityInfo = Object.assign({}, Portal.getmockPortalInfo());
|
||||
communityInfo.pid = pid;
|
||||
for(let disabledPage of disabledPages) {
|
||||
for (var i = 0; i < communityInfo.pages.length; i++) {
|
||||
if (communityInfo.pages[i].route == disabledPage) {
|
||||
|
|
Loading…
Reference in New Issue