diff --git a/src/Squidex/app/framework/angular/dialog-renderer.component.scss b/src/Squidex/app/framework/angular/dialog-renderer.component.scss
index 0e88def61..e4d5246c6 100644
--- a/src/Squidex/app/framework/angular/dialog-renderer.component.scss
+++ b/src/Squidex/app/framework/angular/dialog-renderer.component.scss
@@ -10,19 +10,19 @@
z-index: 100000;
}
- &-righttop {
+ &-topright {
@include fixed(0, 0, auto, auto);
}
- &-rightbottom {
- @include fixed(auto, 0, 0, auto);
+ &-topleft {
+ @include fixed(0, auto, auto, 0);
}
- &-lefttop {
- @include fixed(0, auto, auto, 0);
+ &-bottomright {
+ @include fixed(auto, 0, 0, auto);
}
- &-leftbottom {
+ &-bottomleft {
@include fixed(auto, auto, 0, 0);
}
}
\ No newline at end of file
diff --git a/src/Squidex/app/framework/angular/dialog-renderer.component.ts b/src/Squidex/app/framework/angular/dialog-renderer.component.ts
index a9427c0bf..242f7aed4 100644
--- a/src/Squidex/app/framework/angular/dialog-renderer.component.ts
+++ b/src/Squidex/app/framework/angular/dialog-renderer.component.ts
@@ -8,8 +8,6 @@
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { Subscription } from 'rxjs';
-import { fadeAnimation } from './animations';
-
import {
DialogRequest,
DialogService,
@@ -21,12 +19,10 @@ import { ModalView } from './../utils/modal-view';
@Component({
selector: 'sqx-dialog-renderer',
styleUrls: ['./dialog-renderer.component.scss'],
- templateUrl: './dialog-renderer.component.html',
- animations: [
- fadeAnimation
- ]
+ templateUrl: './dialog-renderer.component.html'
})
export class DialogRendererComponent implements OnDestroy, OnInit {
+ private dialogSubscription: Subscription;
private dialogsSubscription: Subscription;
private notificationsSubscription: Subscription;
@@ -45,10 +41,18 @@ export class DialogRendererComponent implements OnDestroy, OnInit {
public ngOnDestroy() {
this.notificationsSubscription.unsubscribe();
+ this.dialogSubscription.unsubscribe();
this.dialogsSubscription.unsubscribe();
}
public ngOnInit() {
+ this.dialogSubscription =
+ this.dialogView.isOpen.subscribe(isOpen => {
+ if (!isOpen) {
+ this.cancel();
+ }
+ });
+
this.notificationsSubscription =
this.dialogService.notifications.subscribe(notification => {
this.notifications.push(notification);
diff --git a/src/Squidex/app/framework/angular/parent-link.directive.ts b/src/Squidex/app/framework/angular/parent-link.directive.ts
index bdd3ef643..3503a464f 100644
--- a/src/Squidex/app/framework/angular/parent-link.directive.ts
+++ b/src/Squidex/app/framework/angular/parent-link.directive.ts
@@ -12,7 +12,7 @@ import { Subscription } from 'rxjs';
@Directive({
selector: '[sqxParentLink]'
})
-export class ParentLinkDirective implements OnInit, OnDestroy {
+export class ParentLinkDirective implements OnDestroy, OnInit {
private urlSubscription: Subscription;
private url: string;
diff --git a/src/Squidex/app/framework/angular/shortcut.component.ts b/src/Squidex/app/framework/angular/shortcut.component.ts
index 183eae992..b266f5f96 100644
--- a/src/Squidex/app/framework/angular/shortcut.component.ts
+++ b/src/Squidex/app/framework/angular/shortcut.component.ts
@@ -13,7 +13,7 @@ import { ShortcutService } from './../services/shortcut.service';
selector: 'sqx-shortcut',
template: ''
})
-export class ShortcutComponent implements OnInit, OnDestroy {
+export class ShortcutComponent implements OnDestroy, OnInit {
@Input()
public keys: string;
diff --git a/src/Squidex/app/framework/angular/template-wrapper.directive.ts b/src/Squidex/app/framework/angular/template-wrapper.directive.ts
index 3f98d67f9..f9673dea4 100644
--- a/src/Squidex/app/framework/angular/template-wrapper.directive.ts
+++ b/src/Squidex/app/framework/angular/template-wrapper.directive.ts
@@ -10,7 +10,7 @@ import { Directive, EmbeddedViewRef, Input, OnChanges, OnDestroy, OnInit, Simple
@Directive({
selector: '[sqxTemplateWrapper]'
})
-export class TemplateWrapperDirective implements OnInit, OnDestroy, OnChanges {
+export class TemplateWrapperDirective implements OnDestroy, OnInit, OnChanges {
@Input()
public item: any;
diff --git a/src/Squidex/app/framework/services/dialog.service.ts b/src/Squidex/app/framework/services/dialog.service.ts
index 6e86994ff..b0d41856b 100644
--- a/src/Squidex/app/framework/services/dialog.service.ts
+++ b/src/Squidex/app/framework/services/dialog.service.ts
@@ -65,6 +65,10 @@ export class DialogService {
this.notificationsStream$.next(notification);
}
+ public confirmUnsavedChanges(): Observable {
+ return this.confirm('Unsaved changes', 'You have unsaved changes, do you want to close the current content view?');
+ }
+
public confirm(title: string, text: string): Observable {
const request = new DialogRequest(title, text);
diff --git a/src/Squidex/app/shared/components/component-base.ts b/src/Squidex/app/shared/components/component-base.ts
index 21db7fb75..8471f8488 100644
--- a/src/Squidex/app/shared/components/component-base.ts
+++ b/src/Squidex/app/shared/components/component-base.ts
@@ -13,7 +13,7 @@ import {
export abstract class ComponentBase {
constructor(
- private readonly dialogs: DialogService
+ public readonly dialogs: DialogService
) {
}
diff --git a/src/Squidex/app/shell/pages/app/left-menu.component.ts b/src/Squidex/app/shell/pages/app/left-menu.component.ts
index c7e1400ea..6ef51cc48 100644
--- a/src/Squidex/app/shell/pages/app/left-menu.component.ts
+++ b/src/Squidex/app/shell/pages/app/left-menu.component.ts
@@ -15,7 +15,7 @@ import { AppsStoreService } from 'shared';
styleUrls: ['./left-menu.component.scss'],
templateUrl: './left-menu.component.html'
})
-export class LeftMenuComponent implements OnInit, OnDestroy {
+export class LeftMenuComponent implements OnDestroy, OnInit {
private appSubscription: Subscription;
public permission: string | null = null;
diff --git a/src/Squidex/app/shell/pages/internal/apps-menu.component.ts b/src/Squidex/app/shell/pages/internal/apps-menu.component.ts
index b64e4781c..32982458a 100644
--- a/src/Squidex/app/shell/pages/internal/apps-menu.component.ts
+++ b/src/Squidex/app/shell/pages/internal/apps-menu.component.ts
@@ -25,7 +25,7 @@ const FALLBACK_NAME = 'Apps Overview';
fadeAnimation
]
})
-export class AppsMenuComponent implements OnInit, OnDestroy {
+export class AppsMenuComponent implements OnDestroy, OnInit {
private appsSubscription: Subscription;
private appSubscription: Subscription;
diff --git a/src/Squidex/app/shell/pages/internal/internal-area.component.ts b/src/Squidex/app/shell/pages/internal/internal-area.component.ts
index 8d641e6a2..a57913aa4 100644
--- a/src/Squidex/app/shell/pages/internal/internal-area.component.ts
+++ b/src/Squidex/app/shell/pages/internal/internal-area.component.ts
@@ -16,7 +16,7 @@ import { DialogService, Notification } from 'shared';
styleUrls: ['./internal-area.component.scss'],
templateUrl: './internal-area.component.html'
})
-export class InternalAreaComponent implements OnInit, OnDestroy {
+export class InternalAreaComponent implements OnDestroy, OnInit {
private queryParamsSubscription: Subscription;
public notifications: Notification[] = [];
diff --git a/src/Squidex/app/shell/pages/internal/profile-menu.component.ts b/src/Squidex/app/shell/pages/internal/profile-menu.component.ts
index d15f586e0..1f9ebbdc5 100644
--- a/src/Squidex/app/shell/pages/internal/profile-menu.component.ts
+++ b/src/Squidex/app/shell/pages/internal/profile-menu.component.ts
@@ -23,7 +23,7 @@ import {
fadeAnimation
]
})
-export class ProfileMenuComponent implements OnInit, OnDestroy {
+export class ProfileMenuComponent implements OnDestroy, OnInit {
private authenticationSubscription: Subscription;
public modalMenu = new ModalView(false, true);
diff --git a/src/Squidex/app/theme/_bootstrap-vars.scss b/src/Squidex/app/theme/_bootstrap-vars.scss
index e08f5b838..a75f33324 100644
--- a/src/Squidex/app/theme/_bootstrap-vars.scss
+++ b/src/Squidex/app/theme/_bootstrap-vars.scss
@@ -16,15 +16,19 @@ $brand-danger: $color-theme-error;
$brand-warning: $color-theme-orange;
$alert-success-bg: $color-theme-green;
+$alert-success-border: $color-theme-green;
$alert-success-text: #fff;
$alert-info-bg: $color-theme-blue;
+$alert-info-border: $color-theme-blue;
$alert-info-text: #fff;
$alert-warning-bg: $color-theme-orange;
+$alert-warning-border: $color-theme-orange;
$alert-warning-text: #fff;
$alert-danger-bg: $color-theme-error;
+$alert-danger-border: $color-theme-error;
$alert-danger-text: #fff;
$btn-secondary-bg: $color-theme-secondary;