Browse Source

Notification when field updated.

pull/381/head
Sebastian Stehle 7 years ago
parent
commit
b6847bbda8
  1. 2
      src/Squidex/app/features/rules/pages/events/rule-events-page.component.html
  2. 4
      src/Squidex/app/features/schemas/pages/schema/field.component.ts
  3. 2
      src/Squidex/app/framework/angular/forms/tag-editor.component.html

2
src/Squidex/app/features/rules/pages/events/rule-events-page.component.html

@ -70,7 +70,7 @@
Next: <ng-container *ngIf="event.nextAttempt">{{event.nextAttempt | sqxFromNow}}</ng-container> Next: <ng-container *ngIf="event.nextAttempt">{{event.nextAttempt | sqxFromNow}}</ng-container>
</div> </div>
<div class="col-3 text-right"> <div class="col-3 text-right">
<button type="button" class="btn btn-danger btn-sm mr-1" (click)="cancel(event)" [class.hidden]="!event.nextAttempt"> <button type="button" class="btn btn-outline-danger btn-sm mr-1" (click)="cancel(event)" [class.hidden]="!event.nextAttempt">
Cancel Cancel
</button> </button>

4
src/Squidex/app/features/schemas/pages/schema/field.component.ts

@ -11,6 +11,7 @@ import { FormBuilder } from '@angular/forms';
import { import {
createProperties, createProperties,
DialogModel, DialogModel,
DialogService,
EditFieldForm, EditFieldForm,
fadeAnimation, fadeAnimation,
ImmutableArray, ImmutableArray,
@ -53,6 +54,7 @@ export class FieldComponent implements OnChanges {
public addFieldDialog = new DialogModel(); public addFieldDialog = new DialogModel();
constructor( constructor(
private readonly dialogs: DialogService,
private readonly formBuilder: FormBuilder, private readonly formBuilder: FormBuilder,
private readonly schemasState: SchemasState private readonly schemasState: SchemasState
) { ) {
@ -115,6 +117,8 @@ export class FieldComponent implements OnChanges {
this.schemasState.updateField(this.schema, this.field, { properties }) this.schemasState.updateField(this.schema, this.field, { properties })
.subscribe(() => { .subscribe(() => {
this.editForm.submitCompleted(); this.editForm.submitCompleted();
this.dialogs.notifyInfo('Field saved successfully.');
}, error => { }, error => {
this.editForm.submitFailed(error); this.editForm.submitFailed(error);
}); });

2
src/Squidex/app/framework/angular/forms/tag-editor.component.html

@ -3,7 +3,7 @@
[class.focus]="snapshot.hasFocus" [class.focus]="snapshot.hasFocus"
[class.disabled]="addInput.disabled"> [class.disabled]="addInput.disabled">
<span class="item" *ngFor="let item of snapshot.items; let i = index" [class.disabled]="addInput.disabled"> <span class="item" *ngFor="let item of snapshot.items; let i = index" [class.disabled]="addInput.disabled">
{{item}} <i class="icon-close" *ngIf="!addInput.disabled" (click)="remove(i)"></i> {{item}} <i class="icon-close" (click)="remove(i)"></i>
</span> </span>
<input type="text" class="blank" #input <input type="text" class="blank" #input

Loading…
Cancel
Save