Fix community logo url upload. Update library
This commit is contained in:
parent
5d731ea8b8
commit
26ea5cc265
|
@ -200,7 +200,7 @@ export class AppComponent implements OnInit {
|
||||||
this.userMenuItems.push(new MenuItem("", "User information", "", "/user-info", false, [], [], {}));
|
this.userMenuItems.push(new MenuItem("", "User information", "", "/user-info", false, [], [], {}));
|
||||||
}
|
}
|
||||||
if (this.community) {
|
if (this.community) {
|
||||||
this.headerLogoUrl = this.community.logoUrl;
|
this.headerLogoUrl = this.community.getLogoUrl();
|
||||||
this.headerUrl = 'https://' + ((properties.environment !== 'production')?'beta.':'') + this.community.communityId + '.openaire.eu';
|
this.headerUrl = 'https://' + ((properties.environment !== 'production')?'beta.':'') + this.community.communityId + '.openaire.eu';
|
||||||
this.menuHeader = {
|
this.menuHeader = {
|
||||||
route: "/" + this.community.communityId,
|
route: "/" + this.community.communityId,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3632510e387b3a83f8d8e0f27cd796912a19c741
|
Subproject commit 79e6748d7f4ed7da329ed7d2678a88320a2bf1a5
|
|
@ -200,8 +200,8 @@ export class EditCommunityComponent {
|
||||||
this.communityFb.get('shortName').enable();
|
this.communityFb.get('shortName').enable();
|
||||||
this.subscriptions.push(this.utilsService.uploadPhoto(this.properties.utilsService + "/upload/stakeholder/" + encodeURIComponent(this.communityFb.value.communityId), this.file).subscribe(res => {
|
this.subscriptions.push(this.utilsService.uploadPhoto(this.properties.utilsService + "/upload/stakeholder/" + encodeURIComponent(this.communityFb.value.communityId), this.file).subscribe(res => {
|
||||||
this.deletePhoto();
|
this.deletePhoto();
|
||||||
this.removePhoto();
|
|
||||||
this.communityFb.get('logoUrl').setValue(res.filename);
|
this.communityFb.get('logoUrl').setValue(res.filename);
|
||||||
|
this.removePhoto();
|
||||||
this.saveCommunity(callback, errorCallback);
|
this.saveCommunity(callback, errorCallback);
|
||||||
}, error => {
|
}, error => {
|
||||||
this.uploadError = "An error has been occurred during upload your image. Try again later";
|
this.uploadError = "An error has been occurred during upload your image. Try again later";
|
||||||
|
@ -311,7 +311,7 @@ export class EditCommunityComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public deletePhoto() {
|
public deletePhoto() {
|
||||||
if (this.community.logoUrl) {
|
if (this.community.logoUrl && this.community.isUpload) {
|
||||||
this.subscriptions.push(this.utilsService.deletePhoto(this.properties.utilsService + '/delete/stakeholder/' + this.community.logoUrl).subscribe());
|
this.subscriptions.push(this.utilsService.deletePhoto(this.properties.utilsService + '/delete/stakeholder/' + this.community.logoUrl).subscribe());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ type Tab = 'all' | 'communities' | 'ris';
|
||||||
{{community.shortTitle}}
|
{{community.shortTitle}}
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="community.logoUrl" class="logo uk-margin-top uk-margin-bottom">
|
<div *ngIf="community.logoUrl" class="logo uk-margin-top uk-margin-bottom">
|
||||||
<img [src]="community.logoUrl | urlPrefix">
|
<img [src]="community.getLogoUrl() | urlPrefix">
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -110,6 +110,7 @@ export class ManageCommunitiesComponent implements OnInit, OnDestroy {
|
||||||
communities => {
|
communities => {
|
||||||
this.communities = [];
|
this.communities = [];
|
||||||
this.ris = [];
|
this.ris = [];
|
||||||
|
console.log(communities);
|
||||||
communities.forEach(community => {
|
communities.forEach(community => {
|
||||||
if (Session.isPortalAdministrator(this.user) || Session.isCommunityCurator(this.user) || Session.isManager('community', community.communityId, this.user)) {
|
if (Session.isPortalAdministrator(this.user) || Session.isCommunityCurator(this.user) || Session.isManager('community', community.communityId, this.user)) {
|
||||||
if (community.type === 'community') {
|
if (community.type === 'community') {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 318c6560565a7a0da818385de27ebb430b22aea3
|
Subproject commit 999d3833d3805534677aa741a3759e26e09b50f2
|
Loading…
Reference in New Issue