mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1045] Process Attachments List - Improve the component (#2067)
* Create two different ProcessUpload service on for task one for process because the API are different Move the attachment task list and process list in different component outside the activiti demo component * Move the create task/process attachment in the child component
This commit is contained in:
committed by
Eugenio Romano
parent
2a16bf2f34
commit
50fef106a8
@@ -32,7 +32,6 @@ import { EcmModelService } from './src/services/ecm-model.service';
|
||||
import { FormRenderingService } from './src/services/form-rendering.service';
|
||||
import { FormService } from './src/services/form.service';
|
||||
import { NodeService } from './src/services/node.service';
|
||||
import { ProcessUploadService } from './src/services/process-upload.service';
|
||||
import { WidgetVisibilityService } from './src/services/widget-visibility.service';
|
||||
|
||||
export * from './src/components/activiti-form.component';
|
||||
@@ -40,7 +39,6 @@ export * from './src/components/adf-form-list.component';
|
||||
export * from './src/components/activiti-content.component';
|
||||
export * from './src/components/activiti-start-form.component';
|
||||
export * from './src/services/form.service';
|
||||
export * from './src/services/process-upload.service';
|
||||
export * from './src/services/activiti-content-service';
|
||||
export * from './src/components/widgets/index';
|
||||
export * from './src/services/ecm-model.service';
|
||||
@@ -59,7 +57,6 @@ export const ACTIVITI_FORM_DIRECTIVES: any[] = [
|
||||
|
||||
export const ACTIVITI_FORM_PROVIDERS: any[] = [
|
||||
FormService,
|
||||
ProcessUploadService,
|
||||
ActivitiContentService,
|
||||
EcmModelService,
|
||||
NodeService,
|
||||
|
@@ -1,39 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AlfrescoApiService, AppConfigService, UploadService } from 'ng2-alfresco-core';
|
||||
|
||||
@Injectable()
|
||||
export class ProcessUploadService extends UploadService {
|
||||
|
||||
instanceApi: AlfrescoApiService;
|
||||
|
||||
constructor(apiService: AlfrescoApiService, appConfigService: AppConfigService) {
|
||||
super(apiService, appConfigService);
|
||||
this.instanceApi = apiService;
|
||||
}
|
||||
|
||||
getUploadPromise(file: any) {
|
||||
let opts = {
|
||||
isRelatedContent: true
|
||||
};
|
||||
let taskId = file.options.parentId;
|
||||
return this.instanceApi.getInstance().activiti.contentApi.createRelatedContentOnTask(taskId, file.file, opts);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user