Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
41d7882e61
|
@ -272,7 +272,10 @@ export class AppComponent implements OnInit {
|
|||
new MenuItem("", "Sources and methodology", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/content", "", false, [], ["/content"], null, null, null, null, null, "_self"),
|
||||
new MenuItem("", "National Bulletins", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/national-bulletins", "", false, [], ["/national-bulletins"], null, null, null, null, null, "_self"),
|
||||
new MenuItem("", "Subjects", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/subjects", "", false, [], ["/subjects"], null, null, null, null, null, "_self"),
|
||||
new MenuItem("", "Projects and funding Opportunities", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/projects", "", false, [], ["/projects"], null, null, null, null, null, "_self")
|
||||
new MenuItem("", "Projects and funding Opportunities", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/projects", "", false, [], ["/projects"], null, null, null, null, null, "_self"),
|
||||
new MenuItem("", "Fields of Science", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/fields-of-science", "", false, [], ["/fields-of-science"], null, null, null, null, null, "_self"),
|
||||
new MenuItem("", "Sustainable Development Goals", "https://"+(properties.environment == "beta" ? "beta." : "")+this.community.communityId+".openaire.eu/sdgs", "", false, [], ["/sdgs"], null, null, null, null, null, "_self"),
|
||||
|
||||
]
|
||||
)
|
||||
);
|
||||
|
|
|
@ -42,6 +42,8 @@ declare var UIkit;
|
|||
export class ConnectAdminCustomizationComponent implements OnInit {
|
||||
private subscriptions: any[] = [];
|
||||
savingChanges = false;
|
||||
cssCreated: number = 0;
|
||||
totalLayouts: number = 0;
|
||||
community;
|
||||
properties = properties;
|
||||
|
||||
|
@ -66,6 +68,7 @@ export class ConnectAdminCustomizationComponent implements OnInit {
|
|||
let defaultCssIsSaved = false;
|
||||
this.subscriptions.push(this.customizationService.getLayouts(properties, ).subscribe(layouts => {
|
||||
|
||||
this.totalLayouts = layouts ? layouts.length : 0;
|
||||
for(let layout of layouts){
|
||||
layout.date = date;
|
||||
if(layout.portalPid == 'connect'){
|
||||
|
@ -79,11 +82,13 @@ export class ConnectAdminCustomizationComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
if(!connectCssIsSaved){
|
||||
this.totalLayouts++;
|
||||
let layout = new Layout("connect", null);
|
||||
layout.date = date;
|
||||
this.callSaveAndCreate(layout, "connect")
|
||||
}
|
||||
if(!defaultCssIsSaved){
|
||||
this.totalLayouts++;
|
||||
let layout = new Layout("default", null);
|
||||
layout.date = date;
|
||||
this.callSaveAndCreate(layout, "connect")
|
||||
|
@ -100,16 +105,22 @@ export class ConnectAdminCustomizationComponent implements OnInit {
|
|||
pos: 'bottom-right'
|
||||
});
|
||||
|
||||
this.cssCreated++;
|
||||
if(this.cssCreated == this.totalLayouts) {
|
||||
this.savingChanges = false;
|
||||
}
|
||||
}));
|
||||
}));
|
||||
}
|
||||
|
||||
purgeBrowserCache() {
|
||||
this.savingChanges = true;
|
||||
this.subscriptions.push(this.communitiesService.getCommunities(this.properties, this.properties.communityAPI + 'communities').subscribe(
|
||||
communities => {
|
||||
communities.forEach(community => {
|
||||
this._clearCacheService.purgeBrowserCache("Layout added/ updated", community.communityId);
|
||||
});
|
||||
this.savingChanges = false;
|
||||
}
|
||||
));
|
||||
this._clearCacheService.purgeBrowserCache("Layout added/ updated", "connect");
|
||||
|
|
Loading…
Reference in New Issue