#fix focus

This commit is contained in:
mauriziovitale84
2016-12-15 15:45:47 +00:00
parent 5baa124699
commit 1e80980463
3 changed files with 32 additions and 1 deletions

View File

@@ -24,4 +24,28 @@
.large {
font-size: x-large;
margin-top: 24px;
margin-left: 12px;
}
.icon-small i {
float: left;
margin-right: 10px;
display: none;
position: absolute;
}
.icon-small h4 {
clear: left;
margin-left: 26px;
padding-top: 12px;
}
.icon-small:hover {
color: rgb(68,138,255);
cursor: pointer;
}
.icon-small:hover .material-icons {
display: block;
}

View File

@@ -6,13 +6,19 @@
type="text"
class="mdl-textfield__input large"
id="reportName"
autofocus
data-automation-id="reportName"
[value]="reportParameters.name"
(input)="reportParameters.name=$event.target.value"
(blur)="editTitle($event)"
/>
</div>
<h4 *ngIf="!isEditable" (click)="editEnable()">{{reportParameters.name}}</h4>
<div *ngIf="!isEditable">
<span class="icon-small">
<i class="material-icons">mode_edit</i>
<h4 (click)="editEnable()">{{reportParameters.name}}</h4>
</span>
</div>
<div *ngFor="let field of reportParameters.definition.parameters">
<div [ngSwitch]="field.type">
<div *ngSwitchCase="'integer'">

View File

@@ -96,6 +96,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges {
}
ngOnChanges(changes: SimpleChanges) {
this.isEditable = false;
let reportId = changes['reportId'];
if (reportId && reportId.currentValue) {
this.getReportParams(reportId.currentValue);