-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature (value): adapt date to common value comp. structure
- Loading branch information
Tobias Schweizer
committed
Apr 6, 2020
1 parent
87462a5
commit def47c9
Showing
5 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* CSS changed here must also be changed in each child component of a wrapped component | ||
* time-input.component.scss, interval-input.component.scss, etc. | ||
*/ | ||
|
||
.child-input-component { | ||
display: inline-block; | ||
vertical-align: bottom; | ||
width: 49%; | ||
} | ||
|
||
.child-input-component:nth-child(2) { | ||
padding-left: 2%; | ||
} |
17 changes: 14 additions & 3 deletions
17
projects/knora-ui/src/lib/viewer/values/date-value/date-value.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
<span [formGroup]="form"> | ||
<mat-form-field class="large-field"> | ||
<mat-form-field class="large-field child-value-component" floatLabel="never"> | ||
<kui-date-input #dateInput [formControlName]="'dateValue'" class="value" placeholder="Date value" [readonly]="mode === 'read'" [errorStateMatcher]="matcher"></kui-date-input> | ||
</mat-form-field> | ||
<br> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
<mat-form-field class="large-field"> | ||
<input matInput [formControlName]="'comment'" class="comment" placeholder="Comment" type="text" [readonly]="mode === 'read'"> | ||
<mat-form-field class="large-field value-component-comment" *ngIf="shouldShowComment"> | ||
<textarea matInput | ||
cdkTextareaAutosize | ||
#autosize="cdkTextareaAutosize" | ||
cdkAutosizeMinRows="1" | ||
cdkAutosizeMaxRows="6" | ||
[formControlName]="'comment'" | ||
class="comment" | ||
placeholder="Comment" | ||
type="text" | ||
[readonly]="mode === 'read'" | ||
spellcheck="false"> | ||
</textarea> | ||
</mat-form-field> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:host ::ng-deep .child-value-component { | ||
.mat-form-field-underline { | ||
display: none; | ||
} | ||
.mat-form-field-infix{ | ||
border-top: 0.2em solid transparent !important; | ||
.mat-form-field-underline{ | ||
display: block; | ||
} | ||
} | ||
} |
https://github.com/dasch-swiss/knora-ui-ng-lib/blob/0bee998ec0ee602d253ebc6119ad8daf72b0eb33/projects/knora-ui/src/lib/viewer/values/date-value/date-value.component.html#L4-L6
can you remove this breakline please? due to the css grid I'm using, it's not currently affecting anything but it may in the future since the other component templates don't have it :)