diff --git a/ng2-components/ng2-activiti-tasklist/.gitignore b/ng2-components/ng2-activiti-tasklist/.gitignore index 13324e66b9..5253e5db68 100644 --- a/ng2-components/ng2-activiti-tasklist/.gitignore +++ b/ng2-components/ng2-activiti-tasklist/.gitignore @@ -7,6 +7,7 @@ dist src/**/*.js src/**/*.js.map src/**/*.d.ts +!src/declarations.d.ts demo/**/*.js demo/**/*.js.map demo/**/*.d.ts diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.ts index 46987e8ac3..dab4a8825b 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.ts @@ -19,10 +19,7 @@ import { Component, Input, OnInit, ViewChild, OnChanges, SimpleChanges } from '@ import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core'; import { ActivitiTaskListService } from './../services/activiti-tasklist.service'; import { TaskDetailsModel } from '../models/task-details.model'; -import { Observer } from 'rxjs/Observer'; -import { Observable } from 'rxjs/Observable'; - -declare let componentHandler: any; +import { Observer, Observable } from 'rxjs/Rx'; @Component({ selector: 'activiti-checklist', @@ -95,6 +92,9 @@ export class ActivitiChecklist implements OnInit, OnChanges { public showDialog() { if (this.dialog) { + if (!this.dialog.nativeElement.showModal) { + dialogPolyfill.registerDialog(this.dialog.nativeElement); + } this.dialog.nativeElement.showModal(); } } diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-comments.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/activiti-comments.component.ts index 4d5ee36750..a2be327c5b 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-comments.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-comments.component.ts @@ -19,10 +19,7 @@ import { Component, Input, OnInit, ViewChild, OnChanges, SimpleChanges } from '@ import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core'; import { ActivitiTaskListService } from './../services/activiti-tasklist.service'; import { Comment } from '../models/comment.model'; -import { Observer } from 'rxjs/Observer'; -import { Observable } from 'rxjs/Observable'; - -declare let componentHandler: any; +import { Observer, Observable } from 'rxjs/Rx'; @Component({ selector: 'activiti-comments', @@ -97,6 +94,9 @@ export class ActivitiComments implements OnInit, OnChanges { public showDialog() { if (this.dialog) { + if (!this.dialog.nativeElement.showModal) { + dialogPolyfill.registerDialog(this.dialog.nativeElement); + } this.dialog.nativeElement.showModal(); } } diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-people.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/activiti-people.component.ts index f444cc8167..7ce00fc1a3 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-people.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-people.component.ts @@ -18,10 +18,7 @@ import { Component, Input, OnInit, ViewChild } from '@angular/core'; import { AlfrescoTranslationService, AlfrescoAuthenticationService } from 'ng2-alfresco-core'; import { User } from '../models/user.model'; -import { Observer } from 'rxjs/Observer'; -import { Observable } from 'rxjs/Observable'; - -declare let componentHandler: any; +import { Observer, Observable } from 'rxjs/Rx'; @Component({ selector: 'activiti-people', @@ -62,6 +59,9 @@ export class ActivitiPeople implements OnInit { public showDialog() { if (this.dialog) { + if (!this.dialog.nativeElement.showModal) { + dialogPolyfill.registerDialog(this.dialog.nativeElement); + } this.dialog.nativeElement.showModal(); } } diff --git a/ng2-components/ng2-activiti-tasklist/src/declarations.d.ts b/ng2-components/ng2-activiti-tasklist/src/declarations.d.ts new file mode 100644 index 0000000000..6ea5002752 --- /dev/null +++ b/ng2-components/ng2-activiti-tasklist/src/declarations.d.ts @@ -0,0 +1,19 @@ +/*! + * @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. + */ + +declare let componentHandler: any; +declare let dialogPolyfill: any;