Remove MDL from input field and use MD (#2289)

This commit is contained in:
Maurizio Vitale 2017-09-04 17:24:15 +01:00 committed by Mario Romano
parent 480b0e0e55
commit 204ecd9842
3 changed files with 9 additions and 20 deletions

View File

@ -17,3 +17,7 @@
.material-icons {
cursor: pointer;
}
.mat-input-container {
width: 100%;
}

View File

@ -23,10 +23,9 @@
<dialog class="mdl-dialog" id="checklist-dialog" #dialog>
<h4 class="mdl-dialog__title" id="add-checklist-title">New Check</h4>
<div class="mdl-dialog__content">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" [(ngModel)]="taskName" id="checklist-name"/>
<label class="mdl-textfield__label" for="checklist-name">Name</label>
</div>
<md-input-container>
<input mdInput placeholder="Name" [(ngModel)]="taskName" id="checklist-name" data-automation-id="checklist-name">
</md-input-container>
</div>
<div class="mdl-dialog__actions">
<button type="button" id="add-check" (click)="add()" class="mdl-button">Add Checklist</button>

View File

@ -15,13 +15,12 @@
* limitations under the License.
*/
import { AfterViewInit, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
import { Observable, Observer } from 'rxjs/Rx';
import { TaskDetailsModel } from '../models/task-details.model';
import { TaskListService } from './../services/tasklist.service';
declare let dialogPolyfill: any;
let componentHandler: any;
@Component({
selector: 'adf-checklist, activiti-checklist',
@ -29,7 +28,7 @@ let componentHandler: any;
styleUrls: ['./checklist.component.css'],
providers: [TaskListService]
})
export class ChecklistComponent implements OnInit, OnChanges, AfterViewInit {
export class ChecklistComponent implements OnInit, OnChanges {
@Input()
taskId: string;
@ -82,19 +81,6 @@ export class ChecklistComponent implements OnInit, OnChanges, AfterViewInit {
}
}
ngAfterViewInit() {
this.setupMaterialComponents(componentHandler);
}
setupMaterialComponents(handler?: any): boolean {
// workaround for MDL issues with dynamic components
if (handler) {
handler.upgradeAllRegistered();
return true;
}
return false;
}
public getTaskChecklist(taskId: string) {
this.checklist = [];
if (this.taskId) {