From 76f1b3507a1c8786c2b7c2bc963699b84b4f8ea9 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Mon, 19 Feb 2018 13:06:16 +0100 Subject: [PATCH] Saving field fixed. --- .../schemas/pages/schema/field.component.scss | 8 +++++++- .../schemas/pages/schema/field.component.ts | 19 +++++-------------- .../pages/schema/schema-page.component.html | 2 +- .../pages/schema/schema-page.component.ts | 5 +++-- .../languages/languages-page.component.scss | 8 +++++++- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/Squidex/app/features/schemas/pages/schema/field.component.scss b/src/Squidex/app/features/schemas/pages/schema/field.component.scss index cd74d0355..2a8404a4b 100644 --- a/src/Squidex/app/features/schemas/pages/schema/field.component.scss +++ b/src/Squidex/app/features/schemas/pages/schema/field.component.scss @@ -4,7 +4,13 @@ $field-header: #e7ebef; .table-items-row-details { - cursor: default; + & { + cursor: default; + } + + &::before { + right: 4.6rem; + } } .col { diff --git a/src/Squidex/app/features/schemas/pages/schema/field.component.ts b/src/Squidex/app/features/schemas/pages/schema/field.component.ts index d252a0946..c8ff4d8bd 100644 --- a/src/Squidex/app/features/schemas/pages/schema/field.component.ts +++ b/src/Squidex/app/features/schemas/pages/schema/field.component.ts @@ -13,6 +13,7 @@ import { createProperties, fadeAnimation, FieldDto, + FieldPropertiesDto, ModalView, SchemaDto } from 'shared'; @@ -45,7 +46,7 @@ export class FieldComponent implements OnInit { public showing = new EventEmitter(); @Output() - public saving = new EventEmitter(); + public saving = new EventEmitter(); @Output() public enabling = new EventEmitter(); @@ -107,22 +108,12 @@ export class FieldComponent implements OnInit { if (this.editForm.valid) { const properties = createProperties(this.field.properties['fieldType'], this.editForm.value); - const field = - new FieldDto( - this.field.fieldId, - this.field.name, - this.field.isLocked, - this.field.isHidden, - this.field.isHidden, - this.field.partitioning, - properties); - - this.emitSaving(field); + this.emitSaving(properties); } } - private emitSaving(field: FieldDto) { - this.saving.emit(field); + private emitSaving(properties: FieldPropertiesDto) { + this.saving.emit(properties); } private resetEditForm() { diff --git a/src/Squidex/app/features/schemas/pages/schema/schema-page.component.html b/src/Squidex/app/features/schemas/pages/schema/schema-page.component.html index 6cefc740c..26476dd4e 100644 --- a/src/Squidex/app/features/schemas/pages/schema/schema-page.component.html +++ b/src/Squidex/app/features/schemas/pages/schema/schema-page.component.html @@ -69,7 +69,7 @@ (locking)="lockField(field)" (showing)="showField(field)" (hiding)="hideField(field)" - (saving)="saveField($event)"> + (saving)="saveField(field, $event)">