UI: Fix custom legend for flot widgets settings

This commit is contained in:
fe-dev 2022-07-07 13:36:13 +03:00
parent a22e9d580f
commit be6ddb9036

View File

@ -288,19 +288,19 @@
<fieldset *ngIf="chartType === 'graph' || chartType === 'bar'" class="fields-group fields-group-slider"> <fieldset *ngIf="chartType === 'graph' || chartType === 'bar'" class="fields-group fields-group-slider">
<legend class="group-title" translate>widgets.chart.custom-legend-settings</legend> <legend class="group-title" translate>widgets.chart.custom-legend-settings</legend>
<mat-expansion-panel class="tb-settings" [expanded]="flotSettingsFormGroup.get('customLegendEnabled').value"> <mat-expansion-panel class="tb-settings" [expanded]="flotSettingsFormGroup.get('customLegendEnabled').value">
<mat-expansion-panel-header fxLayout="row wrap"> <mat-expansion-panel-header fxLayout="row" style="height: 100%;">
<mat-panel-title> <mat-panel-title>
<mat-slide-toggle formControlName="customLegendEnabled" (click)="$event.stopPropagation()" <mat-slide-toggle formControlName="customLegendEnabled" (click)="$event.stopPropagation()"
fxLayoutAlign="center"> fxLayoutAlign="center" style="height: 100%;">
{{ 'widgets.chart.enable-custom-legend' | translate }} {{ 'widgets.chart.enable-custom-legend' | translate }}
</mat-slide-toggle> </mat-slide-toggle>
</mat-panel-title> </mat-panel-title>
<mat-panel-description fxLayoutAlign="end center" fxHide.xs translate> <mat-panel-description style="white-space: nowrap;" fxLayoutAlign="end center" fxHide.xs translate>
widget-config.advanced-settings widget-config.advanced-settings
</mat-panel-description> </mat-panel-description>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<ng-template matExpansionPanelContent> <ng-template matExpansionPanelContent>
<fieldset [fxShow]="flotSettingsFormGroup.get('customLegendEnabled').value" class="fields-group"> <fieldset class="fields-group">
<legend class="group-title" translate>widgets.chart.label-keys-list</legend> <legend class="group-title" translate>widgets.chart.label-keys-list</legend>
<div fxLayout="column"> <div fxLayout="column">
<div class="tb-control-list tb-drop-list" cdkDropList cdkDropListOrientation="vertical" <div class="tb-control-list tb-drop-list" cdkDropList cdkDropListOrientation="vertical"
@ -321,6 +321,7 @@
<div style="padding-top: 16px;"> <div style="padding-top: 16px;">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
type="button" type="button"
[disabled]="!flotSettingsFormGroup.get('customLegendEnabled').value"
(click)="addLabelDataKey()"> (click)="addLabelDataKey()">
<span translate>widgets.chart.add-label-key</span> <span translate>widgets.chart.add-label-key</span>
</button> </button>