From dbf734fe3c754086a715f76f8af111df37a4d935 Mon Sep 17 00:00:00 2001 From: Mario Romano Date: Wed, 5 Oct 2016 11:24:58 +0100 Subject: [PATCH 1/2] #631 dialog --- demo-shell-ng2/index.html | 4 ++++ demo-shell-ng2/package.json | 3 ++- .../src/components/activiti-start-task.component.ts | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/demo-shell-ng2/index.html b/demo-shell-ng2/index.html index 986e63bc43..f108c3dfa6 100644 --- a/demo-shell-ng2/index.html +++ b/demo-shell-ng2/index.html @@ -35,6 +35,10 @@ + + + + ``` +#### Dialogs Polyfill + +To make the dialog working with all the browser you have to add the dialog polyfill to you project: + +```sh +npm install --save dialog-polyfill +``` + +Also make sure you include these dependencies in your `index.html` file: + +```html + + + + +``` ## Basic usage examples diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/attach/attach.widget.ts b/ng2-components/ng2-activiti-form/src/components/widgets/attach/attach.widget.ts index fbb2293625..e1c6b010bc 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/attach/attach.widget.ts +++ b/ng2-components/ng2-activiti-form/src/components/widgets/attach/attach.widget.ts @@ -24,6 +24,7 @@ import { FormFieldModel } from '../core/form-field.model'; declare let __moduleName: string; declare var componentHandler; +declare let dialogPolyfill: any; @Component({ moduleId: __moduleName, @@ -122,6 +123,11 @@ export class AttachWidget extends WidgetComponent implements OnInit { public showDialog() { this.setupFileBrowser(); this.getExternalContentNodes(); + + if (!this.dialog.nativeElement.showModal) { + dialogPolyfill.registerDialog(this.dialog.nativeElement); + } + if (this.dialog) { this.dialog.nativeElement.showModal(); } diff --git a/ng2-components/ng2-activiti-tasklist/README.md b/ng2-components/ng2-activiti-tasklist/README.md index c8b225ebc9..719e72b6a5 100644 --- a/ng2-components/ng2-activiti-tasklist/README.md +++ b/ng2-components/ng2-activiti-tasklist/README.md @@ -47,6 +47,26 @@ Also make sure you include these dependencies in your `index.html` file: ``` +#### Dialogs Polyfill + +To make the dialog working with all the browser you have to add the dialog polyfill to you project: + +```sh +npm install --save dialog-polyfill +``` + +Also make sure you include these dependencies in your `index.html` file: + +```html + + + + +``` ## Basic usage example Activiti Task List The component shows the list of all the tasks filter by the