diff --git a/src/app/app.component.ts b/src/app/app.component.ts index b62a7f0..ffd1579 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -228,7 +228,7 @@ export class AppComponent implements OnInit, OnDestroy { private init() { let communityId: string = ConnectHelper.getCommunityFromDomain(this.properties.domain); this.showMenu = false; - this.initAdminToolCommunity(communityId); + // this.initAdminToolCommunity(communityId); this.buildMenu(communityId); // this.communityId = communityId; if (!communityId) { @@ -299,6 +299,7 @@ export class AppComponent implements OnInit, OnDestroy { } initLayout(communityId){ if(!this.layout && (typeof location == 'undefined') && !this.previewLayout) { + // if((typeof location == 'undefined') && !this.previewLayout) { this.subscriptions.push(this.layoutSub.subscribe(value => { this.layout = this.layouts.filter(layout => layout.portalPid == communityId)[0]?this.layouts.filter(layout => layout.portalPid == communityId)[0]:this.layouts.filter(layout => layout.portalPid == 'default')[0]; this.initCss(this.layout.portalPid, this.layout.date?this.layout.date:null) @@ -331,6 +332,8 @@ export class AppComponent implements OnInit, OnDestroy { buildCommunityMenu(){ if (this.community && !ConnectHelper.isPrivate(this.community, this.user)) { this.communityId = this.community.communityId; + this.initAdminToolCommunity(this.communityId); + this.header = { // url: 'https://' + (this.properties.environment == 'beta' ? 'beta.' : '') + this.community.id + '.openaire.eu', route: "/", @@ -405,14 +408,16 @@ export class AppComponent implements OnInit, OnDestroy { } this.showMenu = true; } else { + this.initAdminToolCommunity(this.communityId); + this.communityId = null; this.properties.adminToolsPortalType = "connect"; this.configurationService.initCommunityInformation(this.properties, "connect"); - this.initAdminToolCommunity(null); + // this.initAdminToolCommunity(null); this.buildConnectMenu(true); if (this.community && this.community.status == "manager") { - if (!this.user ) { - if(typeof location !== 'undefined' && location.pathname.indexOf("user-info") == -1) { + if (!this.user) { + if (typeof location !== 'undefined' && location.pathname.indexOf("user-info") == -1) { this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_LOGIN, @@ -433,6 +438,8 @@ export class AppComponent implements OnInit, OnDestroy { } } buildConnectMenu(restrictedData: boolean = false) { + this.initAdminToolCommunity(null); + let url = "https://" + (properties.environment != "production" ? "beta." : "") + "connect.openaire.eu"; this.header = { route: restrictedData ? "" : "/", diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index e6974df..95a3cc3 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit e6974dfd0f989955999f7ccffa19e2e266867723 +Subproject commit 95a3cc3ff62983d593730827a8d07fd43887627b diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index c92a0de..468b2b0 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit c92a0dea1b7fc51f0cf272f8d4343735d000a23b +Subproject commit 468b2b008f474c88dacc52991a5231693833f1f9