mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Remove MDL from input field and use MD (#2289)
This commit is contained in:
parent
480b0e0e55
commit
204ecd9842
@ -17,3 +17,7 @@
|
|||||||
.material-icons {
|
.material-icons {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mat-input-container {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
@ -23,10 +23,9 @@
|
|||||||
<dialog class="mdl-dialog" id="checklist-dialog" #dialog>
|
<dialog class="mdl-dialog" id="checklist-dialog" #dialog>
|
||||||
<h4 class="mdl-dialog__title" id="add-checklist-title">New Check</h4>
|
<h4 class="mdl-dialog__title" id="add-checklist-title">New Check</h4>
|
||||||
<div class="mdl-dialog__content">
|
<div class="mdl-dialog__content">
|
||||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
<md-input-container>
|
||||||
<input class="mdl-textfield__input" type="text" [(ngModel)]="taskName" id="checklist-name"/>
|
<input mdInput placeholder="Name" [(ngModel)]="taskName" id="checklist-name" data-automation-id="checklist-name">
|
||||||
<label class="mdl-textfield__label" for="checklist-name">Name</label>
|
</md-input-container>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mdl-dialog__actions">
|
<div class="mdl-dialog__actions">
|
||||||
<button type="button" id="add-check" (click)="add()" class="mdl-button">Add Checklist</button>
|
<button type="button" id="add-check" (click)="add()" class="mdl-button">Add Checklist</button>
|
||||||
|
@ -15,13 +15,12 @@
|
|||||||
* limitations under the License.
|
* 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 { Observable, Observer } from 'rxjs/Rx';
|
||||||
import { TaskDetailsModel } from '../models/task-details.model';
|
import { TaskDetailsModel } from '../models/task-details.model';
|
||||||
import { TaskListService } from './../services/tasklist.service';
|
import { TaskListService } from './../services/tasklist.service';
|
||||||
|
|
||||||
declare let dialogPolyfill: any;
|
declare let dialogPolyfill: any;
|
||||||
let componentHandler: any;
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-checklist, activiti-checklist',
|
selector: 'adf-checklist, activiti-checklist',
|
||||||
@ -29,7 +28,7 @@ let componentHandler: any;
|
|||||||
styleUrls: ['./checklist.component.css'],
|
styleUrls: ['./checklist.component.css'],
|
||||||
providers: [TaskListService]
|
providers: [TaskListService]
|
||||||
})
|
})
|
||||||
export class ChecklistComponent implements OnInit, OnChanges, AfterViewInit {
|
export class ChecklistComponent implements OnInit, OnChanges {
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
taskId: string;
|
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) {
|
public getTaskChecklist(taskId: string) {
|
||||||
this.checklist = [];
|
this.checklist = [];
|
||||||
if (this.taskId) {
|
if (this.taskId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user