[Connect | develop]: app.component.ts: Updated when and how "initAdminToolCommunity()" is called to init css - for community gateway, always display its customized css when exists | Updating libraries.
This commit is contained in:
parent
27511be14e
commit
a855a7491d
|
@ -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 ? "" : "/",
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e6974dfd0f989955999f7ccffa19e2e266867723
|
||||
Subproject commit 95a3cc3ff62983d593730827a8d07fd43887627b
|
|
@ -1 +1 @@
|
|||
Subproject commit c92a0dea1b7fc51f0cf272f8d4343735d000a23b
|
||||
Subproject commit 468b2b008f474c88dacc52991a5231693833f1f9
|
Loading…
Reference in New Issue