mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
[ADF-3745] Added Confirm dialog docs (#4193)
This commit is contained in:
parent
a872c6d8fa
commit
30b28889e1
@ -260,6 +260,7 @@ for more information about installing and using the source code.
|
|||||||
|
|
||||||
| Name | Description | Source link |
|
| Name | Description | Source link |
|
||||||
| ---- | ----------- | ----------- |
|
| ---- | ----------- | ----------- |
|
||||||
|
| [Confirm dialog](content-services/confirm.dialog.md) | Requests a yes/no choice from the user. | [Source](../lib/content-services/dialogs/confirm.dialog.ts) |
|
||||||
| [Library dialog](content-services/library.dialog.md) | Creates a new Content Services document library/site. | [Source](../lib/content-services/dialogs/library/library.dialog.ts) |
|
| [Library dialog](content-services/library.dialog.md) | Creates a new Content Services document library/site. | [Source](../lib/content-services/dialogs/library/library.dialog.ts) |
|
||||||
|
|
||||||
## Directives
|
## Directives
|
||||||
|
@ -58,6 +58,7 @@ for more information about installing and using the source code.
|
|||||||
|
|
||||||
| Name | Description | Source link |
|
| Name | Description | Source link |
|
||||||
| ---- | ----------- | ----------- |
|
| ---- | ----------- | ----------- |
|
||||||
|
| [Confirm dialog](confirm.dialog.md) | Requests a yes/no choice from the user. | [Source](../../lib/content-services/dialogs/confirm.dialog.ts) |
|
||||||
| [Library dialog](library.dialog.md) | Creates a new Content Services document library/site. | [Source](../../lib/content-services/dialogs/library/library.dialog.ts) |
|
| [Library dialog](library.dialog.md) | Creates a new Content Services document library/site. | [Source](../../lib/content-services/dialogs/library/library.dialog.ts) |
|
||||||
|
|
||||||
## Directives
|
## Directives
|
||||||
|
47
docs/content-services/confirm.dialog.md
Normal file
47
docs/content-services/confirm.dialog.md
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
Title: Confirm dialog component
|
||||||
|
Added: v2.3.0
|
||||||
|
Status: Active
|
||||||
|
Last reviewed: 2019-01-22
|
||||||
|
---
|
||||||
|
|
||||||
|
# [Confirm dialog component](../../lib/content-services/dialogs/library/library.dialog.ts "Defined in library.dialog.ts")
|
||||||
|
|
||||||
|
Requests a yes/no choice from the user.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Basic Usage
|
||||||
|
|
||||||
|
```ts
|
||||||
|
constructor(private dialog: MatDialog) {}
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
let files = [
|
||||||
|
// Files defined here...
|
||||||
|
];
|
||||||
|
|
||||||
|
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
|
||||||
|
data: {
|
||||||
|
title: 'Upload',
|
||||||
|
message: `Are you sure you want to upload ${files.length} file(s)?`
|
||||||
|
},
|
||||||
|
minWidth: '250px'
|
||||||
|
});
|
||||||
|
|
||||||
|
dialogRef.afterClosed().subscribe((result) => {
|
||||||
|
if (result === true) {
|
||||||
|
event.resumeUpload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
This component lets the user make a yes/no choice to confirm an action. Use the
|
||||||
|
Angular [`MatDialog`](https://material.angular.io/components/dialog/overview)
|
||||||
|
service to open the dialog, as shown in the example, and pass a `data` object
|
||||||
|
with properties for the `title` and `message` to show. The `afterClosed` event
|
||||||
|
of the [`MatDialog`](https://material.angular.io/components/dialog/overview)
|
||||||
|
gives you the user's choice via the `result` parameter.
|
BIN
docs/docassets/images/ConfirmDialog.png
Normal file
BIN
docs/docassets/images/ConfirmDialog.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
@ -33,6 +33,7 @@
|
|||||||
"Blob": "https://developer.mozilla.org/en-US/docs/Web/API/Blob",
|
"Blob": "https://developer.mozilla.org/en-US/docs/Web/API/Blob",
|
||||||
"Promise": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises",
|
"Promise": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises",
|
||||||
"EventEmitter": "https://angular.io/api/core/EventEmitter",
|
"EventEmitter": "https://angular.io/api/core/EventEmitter",
|
||||||
|
"MatDialog": "https://material.angular.io/components/dialog/overview",
|
||||||
"MatIconRegistry": "https://material.angular.io/components/icon/api",
|
"MatIconRegistry": "https://material.angular.io/components/icon/api",
|
||||||
"MatSnackBarRef": "https://material.angular.io/components/snack-bar/overview",
|
"MatSnackBarRef": "https://material.angular.io/components/snack-bar/overview",
|
||||||
"TemplateRef": "https://angular.io/api/core/TemplateRef",
|
"TemplateRef": "https://angular.io/api/core/TemplateRef",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user