[ADF-4327] added templating for content dialog (#4549)

* [ADF-4327] added templating for content dialog

* [ADF-4327] added unit test and documentation
This commit is contained in:
Vito
2019-04-04 12:44:47 +01:00
committed by Denys Vuika
parent 4ebc8e2527
commit c5ac798c5b
12 changed files with 286 additions and 22 deletions

View File

@@ -0,0 +1,51 @@
/*!
* @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 } from '@angular/core';
import { MatDialog } from '@angular/material';
import { ConfirmDialogComponent } from '@alfresco/adf-content-services';
@Component({
selector: 'app-confirm-dialog-example',
templateUrl: 'confirm-dialog-example.component.html',
styleUrls: ['confirm-dialog-example.component.scss']
})
export class ConfirmDialogExampleComponent {
constructor(private dialog: MatDialog) { }
openConfirmDefaultDialog() {
this.dialog.open(ConfirmDialogComponent, {
data: {
title: 'Upload',
message: `This is the default message`
},
minWidth: '250px'
});
}
openConfirmCustomDialog() {
this.dialog.open(ConfirmDialogComponent, {
data: {
title: 'Upload',
message: `This is the default message`,
htmlContent: '<div> <p>A</p> <p>Custom</p> <p>Content</p> </div>'
},
minWidth: '250px'
});
}
}