diff --git a/src/app/collection-page/collection-form/collection-form.component.ts b/src/app/collection-page/collection-form/collection-form.component.ts index 7f2fb81ec8..37bdc13d7e 100644 --- a/src/app/collection-page/collection-form/collection-form.component.ts +++ b/src/app/collection-page/collection-form/collection-form.component.ts @@ -12,7 +12,7 @@ import { import { Collection } from '../../core/shared/collection.model'; import { ComColFormComponent } from '../../shared/comcol/comcol-forms/comcol-form/comcol-form.component'; import { NotificationsService } from '../../shared/notifications/notifications.service'; -import { CommunityDataService } from '../../core/data/community-data.service'; +import { CollectionDataService } from '../../core/data/collection-data.service'; import { AuthService } from '../../core/auth/auth.service'; import { RequestService } from '../../core/data/request.service'; import { ObjectCacheService } from '../../core/cache/object-cache.service'; @@ -60,7 +60,7 @@ export class CollectionFormComponent extends ComColFormComponent imp protected translate: TranslateService, protected notificationsService: NotificationsService, protected authService: AuthService, - protected dsoService: CommunityDataService, + protected dsoService: CollectionDataService, protected requestService: RequestService, protected objectCache: ObjectCacheService, protected entityTypeService: EntityTypeDataService, diff --git a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.html b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.html index c6386634ea..4ea3d341d7 100644 --- a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.html +++ b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.html @@ -4,8 +4,7 @@ {{type.value + '.edit.logo.label' | translate}} -
+
@@ -44,8 +43,11 @@
- + diff --git a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts index 14e625979b..0c667f2598 100644 --- a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts +++ b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts @@ -75,7 +75,7 @@ export class ComColFormComponent implements On * @type {UploaderOptions} */ uploadFilesOptions: UploaderOptions = Object.assign(new UploaderOptions(), { - autoUpload: false + autoUpload: true }); /** @@ -155,9 +155,9 @@ export class ComColFormComponent implements On this.uploadFilesOptions.url = href; this.uploadFilesOptions.authToken = this.authService.buildAuthHeader(); // If the object already contains a logo, send out a PUT request instead of POST for setting a new logo - if (hasValue(logoRD.payload)) { - this.uploadFilesOptions.method = RestRequestMethod.PUT; - } + // if (hasValue(logoRD.payload)) { + // this.uploadFilesOptions.method = RestRequestMethod.PUT; + // } this.initializedUploaderOptions.next(true); }) ); @@ -317,7 +317,7 @@ export class ComColFormComponent implements On this.refreshCache(); } this.notificationsService.success(null, this.translate.get(this.type.value + '.edit.logo.notifications.add.success')); - this.finish.emit(); + // this.finish.emit(); } /** diff --git a/src/app/shared/upload/uploader/uploader.component.ts b/src/app/shared/upload/uploader/uploader.component.ts index 26fd355871..2072cb4c83 100644 --- a/src/app/shared/upload/uploader/uploader.component.ts +++ b/src/app/shared/upload/uploader/uploader.component.ts @@ -130,9 +130,6 @@ export class UploaderComponent { ngAfterViewInit() { this.uploader.onAfterAddingAll = ((items) => { this.onFileSelected.emit(items); - if (this.uploader.queue.length > 0) { - this.uploader.uploadAll(); - } }); if (isUndefined(this.onBeforeUpload)) { this.onBeforeUpload = () => {return;};