diff --git a/src/Squidex/app/features/administration/pages/users/users-page.component.html b/src/Squidex/app/features/administration/pages/users/users-page.component.html index 51bc689fe..165e79c14 100644 --- a/src/Squidex/app/features/administration/pages/users/users-page.component.html +++ b/src/Squidex/app/features/administration/pages/users/users-page.component.html @@ -49,7 +49,7 @@
- +
@@ -81,7 +81,9 @@ - + diff --git a/src/Squidex/app/features/administration/pages/users/users-page.component.ts b/src/Squidex/app/features/administration/pages/users/users-page.component.ts index 2d7989cab..6392a22bb 100644 --- a/src/Squidex/app/features/administration/pages/users/users-page.component.ts +++ b/src/Squidex/app/features/administration/pages/users/users-page.component.ts @@ -55,5 +55,9 @@ export class UsersPageComponent implements OnInit { public goNext() { this.usersState.goNext().subscribe(); } + + public trackByUser(index: number, user: UserDto) { + return user.id; + } } diff --git a/src/Squidex/app/features/content/pages/contents/contents-page.component.html b/src/Squidex/app/features/content/pages/contents/contents-page.component.html index 6d1fb6bf2..bbf727529 100644 --- a/src/Squidex/app/features/content/pages/contents/contents-page.component.html +++ b/src/Squidex/app/features/content/pages/contents/contents-page.component.html @@ -1,6 +1,6 @@ - + Contents @@ -58,93 +58,93 @@ -
-
- - - - - - - - - - -
- - - {{field.displayName}} - - Updated - - By - - Actions -
-
+
+ + + + + + + + + + +
+ + + {{field.displayName}} + + Updated + + By + + Actions +
+
-
- {{selectionCount}} items selected:   - - - - - - - - - - -
+
+ {{selectionCount}} items selected:   + + + + + + + + + + +
-
-
- - - - - - - - - - - - - - -
-
+
+
+ + + + + + + + + + + + + + +
+
+ diff --git a/src/Squidex/app/features/content/pages/contents/contents-page.component.ts b/src/Squidex/app/features/content/pages/contents/contents-page.component.ts index 666fa8b90..f558a4060 100644 --- a/src/Squidex/app/features/content/pages/contents/contents-page.component.ts +++ b/src/Squidex/app/features/content/pages/contents/contents-page.component.ts @@ -361,7 +361,7 @@ export class ContentsPageComponent implements OnDestroy, OnInit { this.ctx.bus.emit(new ContentRemoved(content)); } - public trackBy(content: ContentDto): string { + public trackByContent(content: ContentDto): string { return content.id; } diff --git a/src/Squidex/app/features/content/pages/contents/search-form.component.ts b/src/Squidex/app/features/content/pages/contents/search-form.component.ts index 994d9d437..0fb26d42c 100644 --- a/src/Squidex/app/features/content/pages/contents/search-form.component.ts +++ b/src/Squidex/app/features/content/pages/contents/search-form.component.ts @@ -5,13 +5,14 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core'; +import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output } from '@angular/core'; import { FormBuilder } from '@angular/forms'; @Component({ selector: 'sqx-search-form', styleUrls: ['./search-form.component.scss'], - templateUrl: './search-form.component.html' + templateUrl: './search-form.component.html', + changeDetection: ChangeDetectionStrategy.OnPush }) export class SearchFormComponent implements OnChanges { private queryValue = ''; 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 5963ec54a..f02f4f674 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 @@ -51,8 +51,16 @@ +
+ No field created yet. + + +
+
-
+
diff --git a/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts b/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts index d3112f080..963fe7d4a 100644 --- a/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts +++ b/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts @@ -136,6 +136,10 @@ export class SchemaPageComponent implements OnDestroy, OnInit { this.schemaExport = result; } + public trackByField(index: number, field: FieldDto) { + return field.fieldId; + } + private back() { this.router.navigate(['../'], { relativeTo: this.route }); } diff --git a/src/Squidex/app/features/schemas/pages/schemas/schema-form.component.html b/src/Squidex/app/features/schemas/pages/schemas/schema-form.component.html index 55de48510..4d501a310 100644 --- a/src/Squidex/app/features/schemas/pages/schemas/schema-form.component.html +++ b/src/Squidex/app/features/schemas/pages/schemas/schema-form.component.html @@ -1,5 +1,5 @@
- + Clone Schema @@ -27,12 +27,7 @@
-
- - -
- -
+
@@ -43,5 +38,10 @@
+ + + + + \ No newline at end of file diff --git a/src/Squidex/app/features/schemas/pages/schemas/schema-form.component.ts b/src/Squidex/app/features/schemas/pages/schemas/schema-form.component.ts index a9ec44827..972d261ff 100644 --- a/src/Squidex/app/features/schemas/pages/schemas/schema-form.component.ts +++ b/src/Squidex/app/features/schemas/pages/schemas/schema-form.component.ts @@ -12,7 +12,8 @@ import { ApiUrlConfig, AppsState, CreateSchemaForm, - SchemasState + SchemasState, + SchemaDto } from '@app/shared'; @Component({ @@ -22,7 +23,10 @@ import { }) export class SchemaFormComponent implements OnInit { @Output() - public completed = new EventEmitter(); + public created = new EventEmitter(); + + @Output() + public cancelled = new EventEmitter(); @Input() public import: any; @@ -51,8 +55,12 @@ export class SchemaFormComponent implements OnInit { return false; } - public complete() { - this.completed.emit(); + public complete(schema: SchemaDto) { + this.created.emit(schema); + } + + public cancel() { + this.cancelled.emit(); } public createSchema() { @@ -64,7 +72,7 @@ export class SchemaFormComponent implements OnInit { this.schemasState.create(schemaDto) .subscribe(dto => { - this.complete(); + this.complete(dto); }, error => { this.createForm.submitFailed(error); }); diff --git a/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.html b/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.html index 8e6ec7ea4..1a8305bcc 100644 --- a/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.html +++ b/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.html @@ -9,7 +9,7 @@ - @@ -46,8 +46,9 @@ - + diff --git a/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.ts b/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.ts index 5a2782667..0e7844023 100644 --- a/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.ts +++ b/src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.ts @@ -7,7 +7,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subscription } from 'rxjs'; import { @@ -48,6 +48,7 @@ export class SchemasPageComponent implements OnDestroy, OnInit { public readonly appsState: AppsState, private readonly messageBus: MessageBus, private readonly route: ActivatedRoute, + private readonly router: Router, private readonly schemasState: SchemasState ) { } @@ -75,7 +76,13 @@ export class SchemasPageComponent implements OnDestroy, OnInit { this.schemasState.loadSchemas().subscribe(); } - public createSchema(importing: any) { + public onSchemaCreated(schema: SchemaDto) { + this.router.navigate([schema.name], { relativeTo: this.route }); + + this.addSchemaDialog.hide(); + } + + public createSchema(importing: any = null) { this.import = importing; this.addSchemaDialog.show(); diff --git a/src/Squidex/app/framework/angular/pager.component.html b/src/Squidex/app/framework/angular/pager.component.html index c4b8293f3..9d6eefd27 100644 --- a/src/Squidex/app/framework/angular/pager.component.html +++ b/src/Squidex/app/framework/angular/pager.component.html @@ -1,4 +1,4 @@ -