Skip to content

Commit 8f6a0ad

Browse files
committed
[NAE-2413] Minor CSS changes & fixes
- change margin of breadcrumbs - change buttonfield padding - change margin - change background of pagination - remove sorting icon on double drawer - remove margin on refs case and task views - fix alignment on i18n field - fix alignment of create case button - fix text color on datafields
1 parent 5b46f21 commit 8f6a0ad

23 files changed

Lines changed: 160 additions & 37 deletions

File tree

nae.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,34 @@
321321
"routing": {
322322
"path": "breadcrumbs"
323323
}
324+
},
325+
"double-menu-tabbed-views": {
326+
"component": {
327+
"class": "TabbedViewsExampleComponent",
328+
"from": "./doc/tabbed-case-view/tabbed-views-example.component"
329+
},
330+
"access": "private",
331+
"navigation": {
332+
"title": "Custom Tabbed View",
333+
"icon": "tab"
334+
},
335+
"routing": {
336+
"path": "double-menu-tabbed-views"
337+
},
338+
"children": {
339+
"custom-redirect": {
340+
"component": {
341+
"class": "TabbedViewsExampleComponent",
342+
"from": "./doc/tabbed-case-view/tabbed-views-example.component"
343+
},
344+
"access": "private",
345+
"navigation": false,
346+
"routing": {
347+
"path": "**"
348+
}
349+
}
350+
},
351+
"processUri": "/"
324352
}
325353
}
326354
},
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<nc-navigation-double-drawer #sidenav image="assets/img/netgrif_full_white.svg" imageRouterLink="/tabbed-views">
1+
<nc-navigation-double-drawer #sidenav image="assets/img/netgrif_full_black.svg" imageRouterLink="/tabbed-views">
22
<router-outlet></router-outlet>
33
</nc-navigation-double-drawer>

projects/nae-example-app/src/app/doc/tabbed-case-view/tabbed-case-view/tabbed-case-view.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ export class TabbedCaseViewComponent extends AbstractTabbedCaseViewComponent imp
7878
@Inject(NAE_TAB_DATA) injectedTabData: InjectedTabbedCaseViewData) {
7979
super(caseViewService, loggerService, injectedTabData, overflowService, undefined, undefined, {
8080
enableCaseTitle: true,
81-
isCaseTitleRequired: true
81+
isCaseTitleRequired: true,
82+
newCaseButtonConfig: {
83+
createCaseButtonTitle: 'My custom create case button',
84+
createCaseButtonIcon: 'home'
85+
}
8286
});
8387
}
8488

projects/nae-example-app/src/app/doc/tabbed-case-view/tabbed-task-view/tabbed-task-view.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
.search-panel {
99
margin-top: 16px;
10-
padding: 8px 16px;
10+
margin-bottom: 2px;
1111
}
1212

1313
.content-margin {
Lines changed: 56 additions & 0 deletions
Loading

projects/netgrif-components/nae-theme.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@
4545
margin-top: 0 !important;
4646
margin-bottom: 0 !important;
4747
}
48+
49+
.mat-paginator {
50+
background: transparent !important;
51+
}

projects/netgrif-components/src/lib/data-fields/button-field/button-default-field/button-default-field.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
}
3737

3838
.padding-bottom {
39-
padding-bottom: 6px;
39+
padding-bottom: 12px;
4040
}
4141
.no-shadow {
4242
box-shadow: unset !important;

projects/netgrif-components/src/lib/data-fields/data-field.theme.scss

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
$color-text-enabled: #64748B;
1616
$color-outline-enabled: #64748B;
1717

18+
.mat-form-field-label {
19+
color: $color-text-enabled !important;
20+
}
21+
1822
.editor-preview > h1 {
1923
border-bottom: 1px solid #ddd;
2024
}
@@ -70,13 +74,13 @@
7074
}
7175

7276
.invalid-form-input {
73-
border: solid 2px mat.get-color-from-palette($primary) !important;
77+
border: solid 2px mat.get-color-from-palette($warn) !important;
7478
padding: 1px !important;
7579
}
7680

77-
.invalid-form-label {
78-
color: mat.get-color-from-palette($primary) !important;
79-
}
81+
//.invalid-form-label {
82+
// color: mat.get-color-from-palette($primary) !important;
83+
//}
8084

8185
.netgrif-input {
8286

@@ -216,7 +220,7 @@
216220
}
217221

218222
.mat-form-field-appearance-outline .mat-form-field-wrapper {
219-
margin: 0.25px 0 0;
223+
margin: 0.25px 0 2px;
220224
}
221225

222226
// DISABLED
@@ -323,6 +327,17 @@
323327
}
324328
}
325329

330+
.netgrif-chip-button-fix {
331+
&.mat-form-field .mat-form-field-prefix {
332+
top: 0.33em !important;
333+
padding-right: 4px !important;
334+
}
335+
336+
.netgrif-label {
337+
font-weight: 400 !important;
338+
}
339+
}
340+
326341
.mat-select-trigger {
327342
height: unset;
328343
min-height: 1.125em;

projects/netgrif-components/src/lib/data-fields/i18n-field/i18n-text-field/i18n-text-field.component.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</ng-template>
2424
</ng-template>
2525
<ng-template [ngIf]="!formControlRef.disabled">
26-
<div class="full-width">
26+
<div class="full-width" [ngClass]="{'padding-bottom-fix': !dataField.isInvalid(formControlRef) && !hasHint()}">
2727
<div #i18nLabel class="i18n-label" [ngClass]="{'invalid-form-label': dataField.isInvalid(formControlRef)}">
2828
{{dataField.title}}
2929
<nc-required-label *ngIf="dataField.behavior.required" [isIn]="!dataField.disabled"></nc-required-label>
@@ -75,8 +75,10 @@
7575
</button>
7676
</div>
7777
</div>
78-
<mat-hint class="i18n-hint-error" [ngClass]="{'mat-hint-disabled': formControlRef.disabled}"
79-
*ngIf="!dataField.isInvalid(formControlRef) && hasHint()">{{dataField.description}}</mat-hint>
80-
<mat-error class="i18n-hint-error" *ngIf="dataField.isInvalid(formControlRef)">{{getErrorMessage()}}</mat-error>
78+
<div class="i18n-hint-wrapper" *ngIf="!dataField.isInvalid(formControlRef) && hasHint() || dataField.isInvalid(formControlRef)">
79+
<mat-hint class="i18n-hint-error" [ngClass]="{'mat-hint-disabled': formControlRef.disabled}"
80+
*ngIf="!dataField.isInvalid(formControlRef) && hasHint()">{{dataField.description}}</mat-hint>
81+
<mat-error class="i18n-hint-error" *ngIf="dataField.isInvalid(formControlRef)">{{getErrorMessage()}}</mat-error>
82+
</div>
8183
</div>
8284
</ng-template>

projects/netgrif-components/src/lib/data-fields/i18n-field/i18n-text-field/i18n-text-field.component.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
padding: 0 1em;
5050
font-size: 75%;
5151
width: auto !important;
52+
display: block;
5253
}
5354

5455
.language-svg-wrapper {
@@ -149,3 +150,12 @@
149150
.i18n-bold-text {
150151
font-weight: bold;
151152
}
153+
154+
.padding-bottom-fix {
155+
padding-bottom: 1em;
156+
}
157+
158+
.i18n-hint-wrapper {
159+
height: 18px;
160+
margin-top: -3px;
161+
}

0 commit comments

Comments
 (0)