context-dashboard/dashboard-settings/dashboard-appearance-settings.component.ts
OnChanges
selector | c8y-dashboard-appearance-settings |
templateUrl | ./dashboard-appearance-settings.component.html |
Properties |
|
Methods |
Inputs |
Outputs |
constructor(contextDashboardService: ContextDashboardService)
|
||||||
Parameters :
|
appearanceSettingsForm |
Type : ReturnType<>
|
dashboard |
Type : ContextDashboard
|
previewChanged |
Type : EventEmitter
|
changeHeaderClass | ||||||
changeHeaderClass(headerClass: string)
|
||||||
Parameters :
Returns :
void
|
changeThemeClass | ||||||
changeThemeClass(themeClass: string)
|
||||||
Parameters :
Returns :
void
|
ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
Parameters :
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
Readonly DEFAULT_DASHBOARD_MARGIN |
Type : number
|
Default value : 12
|
styling |
Type : object
|
Default value : {
themeClass: 'dashboard-theme-light',
headerClass: 'panel-title-regular'
}
|
<div [formGroup]="appearanceSettingsForm">
<c8y-appearance-settings
[themeClass]="styling.themeClass"
[headerClass]="styling.headerClass"
(themeClassChange)="changeThemeClass($event)"
(headerClassChange)="changeHeaderClass($event)"
[dashboardSettings]="true"
[columns]="3"
>
<div class="col-md-4">
<fieldset class="c8y-fieldset c8y-fieldset--lg">
<legend translate>Misc</legend>
<c8y-form-group>
<label for="margin">{{ 'Widget margin' | translate }}</label>
<div class="input-group">
<input
class="form-control"
id="margin"
placeholder="{{ DEFAULT_DASHBOARD_MARGIN }}"
name="margin"
type="number"
formControlName="widgetMargin"
/>
<span class="input-group-addon">px</span>
</div>
</c8y-form-group>
<c8y-form-group>
<label translate>Widget titles</label>
<label
class="c8y-checkbox"
title="{{ 'Translate if possible' | translate }}"
>
<input
name="translateWidgetTitle"
type="checkbox"
formControlName="translateWidgetTitle"
/>
<span></span>
<span>{{ 'Translate if possible' | translate }}</span>
</label>
</c8y-form-group>
</fieldset>
</div>
</c8y-appearance-settings>
</div>