diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbappheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbappheader.directive.js
index 8efaf0c024..b52b0a5763 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbappheader.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbappheader.directive.js
@@ -1,7 +1,7 @@
(function () {
"use strict";
- function AppHeaderDirective(eventsService, appState, userService, focusService, backdropService) {
+ function AppHeaderDirective(eventsService, appState, userService, focusService, backdropService, overlayService) {
function link(scope, el, attr, ctrl) {
@@ -71,21 +71,17 @@
};
scope.avatarClick = function () {
- if (!scope.userDialog) {
- backdropService.open();
- scope.userDialog = {
- view: "user",
- show: true,
- close: function (oldModel) {
- scope.userDialog.show = false;
- scope.userDialog = null;
- backdropService.close();
- }
- };
- } else {
- scope.userDialog.show = false;
- scope.userDialog = null;
- }
+
+ const dialog = {
+ view: "user",
+ position: "right",
+ name: "overlay-user",
+ close: function () {
+ overlayService.close();
+ }
+ };
+
+ overlayService.open(dialog);
};
}
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlay.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlay.directive.js
index ad396e7a9a..5a06edf617 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlay.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/overlays/umboverlay.directive.js
@@ -221,6 +221,10 @@ Opens an overlay to show a custom YSOD.
$timeout(function () {
+ if (!scope.name) {
+ scope.name = 'overlay';
+ }
+
if (scope.position === "target" && scope.model.event) {
setTargetPosition();
@@ -530,6 +534,7 @@ Opens an overlay to show a custom YSOD.
view: "=",
position: "@",
size: "=?",
+ name: "=?",
parentScope: "=?"
},
link: link
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/overlay.service.js b/src/Umbraco.Web.UI.Client/src/common/services/overlay.service.js
index 119f40e114..5e11d44bda 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/overlay.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/overlay.service.js
@@ -15,7 +15,7 @@
function open(newOverlay) {
// prevent two open overlays at the same time
- if(currentOverlay) {
+ if (currentOverlay) {
close();
}
@@ -23,22 +23,22 @@
var overlay = newOverlay;
// set the default overlay position to center
- if(!overlay.position) {
+ if (!overlay.position) {
overlay.position = "center";
}
// set the default overlay size to small
- if(!overlay.size) {
+ if (!overlay.size) {
overlay.size = "small";
}
// use a default empty view if nothing is set
- if(!overlay.view) {
+ if (!overlay.view) {
overlay.view = "views/common/overlays/default/default.html";
}
// option to disable backdrop clicks
- if(overlay.disableBackdropClick) {
+ if (overlay.disableBackdropClick) {
backdropOptions.disableEventsOnClick = true;
}
@@ -85,7 +85,6 @@
}
open(overlay);
-
}
function confirmDelete(overlay) {
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-app-header.html b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-app-header.html
index c6c4f98e25..984ac9337a 100644
--- a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-app-header.html
+++ b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-app-header.html
@@ -45,12 +45,4 @@
-