Skip to content

Commit a42c2ec

Browse files
last angular styling changes.
1 parent bf18c63 commit a42c2ec

File tree

11 files changed

+64
-48
lines changed

11 files changed

+64
-48
lines changed

src/app/admin/permission/permission-edit/permission-edit.component.html

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,22 @@
5858
</div>
5959

6060
<div class="form-group mt-3 col-12">
61-
<mat-form-field class="col-12">
62-
<label class="form-label" for="user">{{ "PERMISSION.EDIT.USERS" | translate }}</label>
63-
<mat-select
64-
[formControl]="userMultiCtrl"
65-
[multiple]="true"
66-
panelClass="overflow-x-hidden"
67-
[(value)]="permission.userIds"
68-
name="users"
69-
#multiSelect
70-
[compareWith]="compare"
71-
>
72-
<app-mat-select-search [formControl]="userMultiFilterCtrl"></app-mat-select-search>
73-
<mat-option *ngFor="let user of filteredUsersMulti | async" [value]="user.id">
74-
{{ getTextForUser(user) }}
75-
</mat-option>
76-
</mat-select>
77-
</mat-form-field>
61+
<label class="form-label" for="user">{{ "PERMISSION.EDIT.USERS" | translate }}</label>
62+
<mat-select
63+
id="userGroup"
64+
class="form-control"
65+
[formControl]="userMultiCtrl"
66+
[multiple]="true"
67+
panelClass="overflow-x-hidden"
68+
[(value)]="permission.userIds"
69+
[compareWith]="compare"
70+
#multiSelect
71+
>
72+
<app-mat-select-search [formControl]="userMultiFilterCtrl"></app-mat-select-search>
73+
<mat-option *ngFor="let user of filteredUsersMulti | async" [value]="user.id">
74+
{{ getTextForUser(user) }}
75+
</mat-option>
76+
</mat-select>
7877
</div>
7978

8079
<div *ngIf="isNotGlobalAdmin">
@@ -103,13 +102,13 @@
103102
</div>
104103

105104
<div class="form-group mt-3 col-12" *ngIf="isOrganizationApplicationPermission()">
106-
<mat-form-field class="col-12">
107105
<label class="form-label" for="name">{{ "PERMISSION.EDIT.APPS" | translate }}</label>
108106
<div class="col-12">
109107
<mat-select
110108
id="applicationIds"
111109
[formControl]="applicationMultiCtrl"
112110
[multiple]="true"
111+
class="form-control"
113112
panelClass="overflow-x-hidden"
114113
[(value)]="permission.applicationIds"
115114
name="applicationIds"
@@ -122,7 +121,6 @@
122121
</mat-option>
123122
</mat-select>
124123
</div>
125-
</mat-form-field>
126124
</div>
127125

128126
<div *ngIf="isReadOrWrite()">

src/app/app-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const routes: Routes = [
5454
];
5555

5656
@NgModule({
57-
imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules})],
57+
imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })],
5858
exports: [RouterModule],
5959
})
6060
export class AppRoutingModule {}

src/app/applications/application-detail/application-detail.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ <h3>{{ "APPLICATION.DETAILS" | translate }}</h3>
6565
</div>
6666
</div>
6767
</div>
68-
<nav mat-tab-nav-bar [tabPanel]="tabPanel">
68+
69+
<nav mat-tab-nav-bar [tabPanel]="tabPanel" >
6970
<a
7071
mat-tab-link
7172
*ngFor="let link of navTabs"
@@ -76,6 +77,7 @@ <h3>{{ "APPLICATION.DETAILS" | translate }}</h3>
7677
>{{ link.label | translate }}</a
7778
>
7879
</nav>
80+
<mat-divider></mat-divider>
7981
<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>
8082
<router-outlet></router-outlet>
8183
</div>

src/app/applications/applications-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const applicationRoutes: Routes = [
6161
},
6262
],
6363
},
64-
{ path: "datatarget-new", component: DatatargetNewComponent, },
64+
{ path: "datatarget-new", component: DatatargetNewComponent },
6565
{ path: "datatarget-edit", component: DatatargetEditComponent },
6666
{
6767
path: "datatarget-edit/:datatargetId",

src/app/applications/multicast/multicast-edit/multicast-edit.component.html

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -193,31 +193,33 @@
193193
<div class="form-group mt-3 col-12">
194194
<label class="form-label" for="groupType">{{ "QUESTION.GIVE-MULTICAST-IOTDEVICES" | translate }}</label>
195195

196-
<div class="row">
197-
<mat-form-field appearance="outline">
198-
<mat-label>{{ "QUESTION.MULTICAST.SELECT-DEVICES" | translate }}</mat-label>
199-
<mat-select
200-
multiple
201-
name="devices"
202-
[compareWith]="compare"
203-
[(ngModel)]="multicast.iotDevices"
204-
panelClass="overflow-x-hidden"
205-
>
206-
<app-mat-select-search [formControl]="deviceFilterCtrl"></app-mat-select-search>
196+
<div class="mt-3 col-12">
197+
<!-- <mat-form-field appearance="outline"> -->
198+
<!-- <mat-label>{{ "QUESTION.MULTICAST.SELECT-DEVICES" | translate }}</mat-label> -->
199+
<mat-select
200+
id="userGroup"
201+
class="form-control"
202+
[formControl]="deviceCtrl"
203+
[multiple]="true"
204+
panelClass="overflow-x-hidden"
205+
[(value)]="multicast.iotDevices"
206+
[compareWith]="compare"
207+
>
208+
<app-mat-select-search [formControl]="deviceFilterCtrl"></app-mat-select-search>
207209

208-
<button mat-raised-button class="mat-primary fill text-sm choose-all" (click)="selectAll()">
209-
{{ "QUESTION.MULTICAST.SELECTALLDEVICES" | translate }}
210-
</button>
211-
<button mat-raised-button class="mat-primary fill text-sm deselect-all" (click)="unSelectAll()">
212-
{{ "QUESTION.MULTICAST.DESELECTALLDEVICES" | translate }}
213-
</button>
214-
<label class="onlyLorawan">{{ "QUESTION.MULTICAST.ONLY-LORAWAN" | translate }}</label>
210+
<button mat-raised-button class="mat-primary fill text-sm choose-all" (click)="selectAll()">
211+
{{ "QUESTION.MULTICAST.SELECTALLDEVICES" | translate }}
212+
</button>
213+
<button mat-raised-button class="mat-primary fill text-sm deselect-all" (click)="unSelectAll()">
214+
{{ "QUESTION.MULTICAST.DESELECTALLDEVICES" | translate }}
215+
</button>
216+
<label class="onlyLorawan">{{ "QUESTION.MULTICAST.ONLY-LORAWAN" | translate }}</label>
215217

216-
<mat-option *ngFor="let device of filteredDevicesMulti | async | filterDevices" [value]="device">{{
217-
device.name
218-
}}</mat-option>
219-
</mat-select>
220-
</mat-form-field>
218+
<mat-option *ngFor="let device of filteredDevicesMulti | async | filterDevices" [value]="device">{{
219+
device.name
220+
}}</mat-option>
221+
</mat-select>
222+
<!-- </mat-form-field> -->
221223
</div>
222224
</div>
223225
<div class="form-group mt-5">

src/app/applications/multicast/multicast-edit/multicast-edit.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class MulticastEditComponent implements OnInit, OnDestroy {
3636
public formFailedSubmit = false;
3737
public multicastTypes: string[] = Object.values(MulticastType);
3838
// Class-B: { public periodicities: number[] = [2, 4, 8, 16, 32, 64, 128]; // used for classB if it has to be used in the future }
39+
public deviceCtrl: UntypedFormControl = new UntypedFormControl();
3940
public deviceFilterCtrl: UntypedFormControl = new UntypedFormControl();
4041
public filteredDevicesMulti: ReplaySubject<IotDevice[]> = new ReplaySubject<IotDevice[]>(1);
4142

@@ -109,6 +110,7 @@ export class MulticastEditComponent implements OnInit, OnDestroy {
109110
getMulticast(id: number) {
110111
this.multicastSubscription = this.multicastService.get(id).subscribe((response: Multicast) => {
111112
this.multicast = response; // gets the multicast and set's local multicast. Used when update.
113+
this.deviceCtrl.setValue(this.multicast.iotDevices);
112114
});
113115
}
114116

src/app/profiles/device-profiles/device-profiles-edit/device-profiles-edit.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h3>{{ "PROFILES.DEVICE_PROFILE.DETAILS" | translate }}</h3>
2525
</li>
2626
</ul>
2727
</div>
28-
<mat-tab-group animationDuration="0ms">
28+
<mat-tab-group mat-stretch-tabs="false" mat-align-tabs="start" animationDuration="0ms">
2929
<mat-tab label="Generelt">
3030
<div class="input-container col-xs-12 form-group">
3131
<label for="name" class="form-label asterisk-if-mandatory">{{

src/app/shared/components/top-bar/top-bar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ <h3 class="pl-md-3">{{ title || staticTitle }}</h3>
9595
Material styling are not applied properly if the ng-container is moved inside the mat-form-field.
9696
-->
9797
<ng-container *ngIf="hasEmail() && hasAnyPermission(); else emptySearchForm">
98-
<mat-form-field class="search-form--full-width">
98+
<mat-form-field class="search-form--full-width" appearance="fill">
9999
<mat-label>{{ "SEARCH.PLACEHOLDER" | translate }}</mat-label>
100100
<input
101101
matInput

src/app/shared/components/top-bar/top-bar.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@ button:focus {
4545
height: 0;
4646
width: 0;
4747
}
48+
49+
::ng-deep .mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label {
50+
width: 100% !important;
51+
}

src/app/shared/helpers/mat-paginator-intl-da.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class MatPaginatorIntlDa extends MatPaginatorIntl {
1515
public constructor(private translate: TranslateService) {
1616
super();
1717

18-
this.translate.onLangChange.subscribe((e: Event|RouterEvent) => {
18+
this.translate.onLangChange.subscribe((e: Event | RouterEvent) => {
1919
this.getAndInitTranslations();
2020
});
2121

0 commit comments

Comments
 (0)