mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4340] FormCloud - Be able to upload a file from the local source (#4647)
* Add a shiny upload button * Fix tslint * Enable the viewer on the content click * Call the process storage in case the form has an upload * Fix the lint * Fix unit tests * Fix tslint on unit tests * Fix the lint * Fix the lint
This commit is contained in:
committed by
Eugenio Romano
parent
b87c18bc13
commit
be49e72208
@@ -0,0 +1,3 @@
|
||||
.activiti-form-viewer {
|
||||
margin: 10px;
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
<adf-viewer
|
||||
[overlayMode]="true"
|
||||
[nodeId]="nodeId">
|
||||
</adf-viewer>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 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 { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { Params } from '@angular/router/src/shared';
|
||||
|
||||
@Component({
|
||||
selector: 'app-cloud-viewer',
|
||||
templateUrl: './cloud-viewer.component.html'
|
||||
})
|
||||
export class CloudViewerComponent implements OnInit, OnDestroy {
|
||||
|
||||
nodeId: string;
|
||||
|
||||
private sub: Subscription;
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.sub = this.route.params.subscribe((params: Params) => {
|
||||
this.nodeId = params['nodeId'];
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
|
||||
}
|
@@ -69,6 +69,10 @@ export class TaskDetailsCloudDemoComponent {
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
onFormContentClicked(resourceId) {
|
||||
this.router.navigate([`/cloud/${this.appName}/task-details/${this.taskId}/files/${resourceId.nodeId}/view`]);
|
||||
}
|
||||
|
||||
onFormSaved() {
|
||||
this.notificationService.openSnackMessage('Task has been saved successfully');
|
||||
}
|
||||
|
Reference in New Issue
Block a user