From 60b1042c4bab11ff375f527974c1d21e60174114 Mon Sep 17 00:00:00 2001 From: rhenck <richard.henck@iqb.hu-berlin.de> Date: Tue, 9 Aug 2022 16:40:34 +0200 Subject: [PATCH] [editor] Fix preset dropdown for rich text values Now always shows the values as rich text (which works because basic text is valid html). Also remove some unused fields. --- .../preset-value-properties.component.ts | 29 ++----------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/preset-value-properties.component.ts b/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/preset-value-properties.component.ts index 7de415f5c..5ca803c74 100644 --- a/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/preset-value-properties.component.ts +++ b/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/preset-value-properties.component.ts @@ -22,39 +22,14 @@ import { CombinedProperties } from 'editor/src/app/components/properties-panel/e (input)="updateModel.emit({property: 'value', value: $any($event.target).value })"> </mat-form-field> - <mat-form-field *ngIf="combinedProperties.options !== undefined && !combinedProperties.connectedTo" + <mat-form-field *ngIf="combinedProperties.options !== undefined" appearance="fill" class="wide-form-field"> <mat-label>{{'preset' | translate }}</mat-label> <mat-select [value]="combinedProperties.value" (selectionChange)="updateModel.emit({ property: 'value', value: $event.value })"> <mat-option [value]="null">{{'propertiesPanel.undefined' | translate }}</mat-option> <mat-option *ngFor="let option of $any(combinedProperties.options); let i = index" [value]="i"> - {{option.text}} (Index: {{i}}) - </mat-option> - </mat-select> - </mat-form-field> - - <mat-form-field *ngIf="combinedProperties.richTextOptions !== undefined && !combinedProperties.connectedTo" - appearance="fill" class="wide-form-field"> - <mat-label>{{'preset' | translate }}</mat-label> - <mat-select [value]="combinedProperties.value" - (selectionChange)="updateModel.emit({ property: 'value', value: $event.value })"> - <mat-option [value]="null">{{'propertiesPanel.undefined' | translate }}</mat-option> - <mat-option *ngFor="let option of $any(combinedProperties.richTextOptions); let i = index" [value]="i" - [innerHTML]="option + ' (Index: ' + i + ')'"> - </mat-option> - </mat-select> - </mat-form-field> - - <!-- This is for radio with images--> - <mat-form-field *ngIf="combinedProperties.columns !== undefined && combinedProperties.rows === undefined" - appearance="fill" class="wide-form-field"> - <mat-label>{{'preset' | translate }}</mat-label> - <mat-select [value]="combinedProperties.value" - (selectionChange)="updateModel.emit({ property: 'value', value: $event.value })"> - <mat-option [value]="null">{{'propertiesPanel.undefined' | translate }}</mat-option> - <mat-option *ngFor="let column of $any(combinedProperties.columns); let i = index" [value]="i"> - {{column.name}} (Index: {{i}}) + <div fxFlex fxFlexAlign="center" [innerHTML]="option.text + ' (Index: ' + i + ')'"></div> </mat-option> </mat-select> </mat-form-field> -- GitLab