[ADF-4650] Fix and refactor amount, date and date-time widgets (#4957)

* [ADF-4650] Fix and refactor amount, date and date-time widgets

* fix e2e tests

* Fix people cloud test

* Fix e2e date test

* fix lint
This commit is contained in:
davidcanonieto
2019-07-26 13:01:00 +01:00
committed by Eugenio Romano
parent 624ca9f0ae
commit 479416861f
9 changed files with 35 additions and 109 deletions

View File

@@ -1,9 +1,9 @@
<div class="adf-amount-widget__container adf-amount-widget {{field.className}}" [class.adf-invalid]="!field.isValid" [class.adf-readonly]="field.readOnly">
<mat-form-field class="adf-amount-widget__input">
<label class="adf-label" [attr.for]="field.id">{{field.name | translate }}<span *ngIf="isRequired()">*</span></label>
<span matPrefix class="adf-amount-widget__prefix-spacing"> {{currency }}</span>
<span matPrefix class="adf-amount-widget__prefix-spacing">{{ currency }}</span>
<input matInput
class="adf-amount-widget"
class="adf-input"
type="text"
[id]="field.id"
[required]="isRequired()"

View File

@@ -3,38 +3,17 @@
.adf {
&-amount-widget {
width: 100%;
vertical-align: baseline !important;
.mat-input-placeholder {
margin-top: 5px;
display: none;
.mat-input-element {
margin-left: 13px;
margin-right: 13px;
}
.mat-form-field-flex {
position: relative;
padding-top: 18.5px;
}
.mat-form-field-infix {
position: static;
padding-top: 19px;
}
.adf-label {
position: absolute;
top: 18.5px;
left:0;
}
}
&-amount-widget__container {
max-width: 100%;
.mat-form-field-label-wrapper {
top: 34px !important;
left: 13px;
}
&-amount-widget__container .mat-form-field-label-wrapper {
top: 17px;
left: 12px;
right: 12px;
}
&-amount-widget__input .mat-focused {
@@ -42,8 +21,8 @@
}
&-amount-widget__prefix-spacing {
padding-right: 5px;
position: absolute;
top: 12px;
}
}

View File

@@ -1,27 +1,11 @@
@import '../form';
.adf {
&-date-time-widget {
.mat-form-field-suffix {
text-align: right;
position: absolute;
margin-top: 30px;
width: 100%;
top: 26px;
}
}
/* query for Microsoft IE 11*/
@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
&-date-widget {
.mat-form-field-suffix {
position: relative;
width: auto;
}
}
}
}

View File

@@ -1,44 +1,9 @@
@import '../form';
.adf {
&-date-widget {
.mat-form-field-suffix {
text-align: right;
position: absolute;
margin-top: 30px;
width: 100%;
}
&-date-widget-button {
position: relative;
float: right;
}
&-date-input {
padding-top: 5px;
padding-bottom: 5px;
}
&-grid-date-widget {
align-items: center;
padding: 0;
}
&-date-widget-button__cell {
margin-top: 0;
margin-bottom: 0;
top: 26px;
}
}
/* query for Microsoft IE 11*/
@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
&-date-widget {
.mat-form-field-suffix {
position: relative;
width: auto;
}
}
}
}