> methodSelector)
where T : UmbracoApiControllerBase
{
diff --git a/src/Umbraco.Web.Common/Routing/EndpointRouteBuilderExtensions.cs b/src/Umbraco.Web.Common/Routing/EndpointRouteBuilderExtensions.cs
index e5ebdd177c..1349145357 100644
--- a/src/Umbraco.Web.Common/Routing/EndpointRouteBuilderExtensions.cs
+++ b/src/Umbraco.Web.Common/Routing/EndpointRouteBuilderExtensions.cs
@@ -128,7 +128,7 @@ namespace Umbraco.Web.Common.Routing
object constraints = null)
=> endpoints.MapUmbracoRoute(controllerType, rootSegment, areaName,
isBackOffice
- ? (areaName.IsNullOrWhiteSpace() ? "BackOffice/Api" : $"BackOffice/{areaName}")
+ ? (areaName.IsNullOrWhiteSpace() ? $"{Core.Constants.Web.Mvc.BackOfficePathSegment}/Api" : $"{Core.Constants.Web.Mvc.BackOfficePathSegment}/{areaName}")
: (areaName.IsNullOrWhiteSpace() ? "Api" : areaName),
defaultAction, true, constraints);
}
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js
index 6f98dbca6e..01d73568ec 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js
@@ -5,14 +5,14 @@
@scope
@description
-Added in Umbraco 7.8. The tour component is a global component and is already added to the umbraco markup.
-In the Umbraco UI the tours live in the "Help drawer" which opens when you click the Help-icon in the bottom left corner of Umbraco.
-You can easily add you own tours to the Help-drawer or show and start tours from
+Added in Umbraco 7.8. The tour component is a global component and is already added to the umbraco markup.
+In the Umbraco UI the tours live in the "Help drawer" which opens when you click the Help-icon in the bottom left corner of Umbraco.
+You can easily add you own tours to the Help-drawer or show and start tours from
anywhere in the Umbraco backoffice. To see a real world example of a custom tour implementation, install The Starter Kit in Umbraco 7.8
Extending the help drawer with custom tours
-The easiet way to add new tours to Umbraco is through the Help-drawer. All it requires is a my-tour.json file.
-Place the file in App_Plugins/{MyPackage}/backoffice/tours/{my-tour}.json and it will automatically be
+The easiet way to add new tours to Umbraco is through the Help-drawer. All it requires is a my-tour.json file.
+Place the file in App_Plugins/{MyPackage}/backoffice/tours/{my-tour}.json and it will automatically be
picked up by Umbraco and shown in the Help-drawer.
The tour object
@@ -26,7 +26,7 @@ The tour object consist of two parts - The overall tour configuration and a list
"groupOrder": 200 // Control the order of tour groups
"allowDisable": // Adds a "Don't" show this tour again"-button to the intro step
"culture" : // From v7.11+. Specifies the culture of the tour (eg. en-US), if set the tour will only be shown to users with this culture set on their profile. If omitted or left empty the tour will be visible to all users
- "requiredSections":["content", "media", "mySection"] // Sections that the tour will access while running, if the user does not have access to the required tour sections, the tour will not load.
+ "requiredSections":["content", "media", "mySection"] // Sections that the tour will access while running, if the user does not have access to the required tour sections, the tour will not load.
"steps": [] // tour steps - see next example
}
@@ -43,11 +43,12 @@ The tour object consist of two parts - The overall tour configuration and a list
"backdropOpacity": 0.4 // the backdrop opacity
"view": "" // add a custom view
"customProperties" : {} // add any custom properties needed for the custom view
+ "skipStepIfVisible": ".dashboard div [data-element='my-tour-button']" // if we can find this DOM element on the page then we will skip this step
}
Adding tours to other parts of the Umbraco backoffice
-It is also possible to add a list of custom tours to other parts of the Umbraco backoffice,
+It is also possible to add a list of custom tours to other parts of the Umbraco backoffice,
as an example on a Dashboard in a Custom section. You can then use the {@link umbraco.services.tourService tourService} to start and stop tours but you don't have to register them as part of the tour service.
Using the tour service
@@ -86,7 +87,8 @@ as an example on a Dashboard in a Custom section. You can then use the {@link um
"element": "[data-element='my-tour-button']",
"title": "Click the button",
"content": "Click the button",
- "event": "click"
+ "event": "click",
+ "skipStepIfVisible": "[data-element='my-other-tour-button']"
}
]
};
@@ -257,9 +259,26 @@ In the following example you see how to run some custom logic before a step goes
// make sure we don't go too far
if (scope.model.currentStepIndex !== scope.model.steps.length) {
+
+ var upcomingStep = scope.model.steps[scope.model.currentStepIndex];
+
+ // If the currentStep JSON object has 'skipStepIfVisible'
+ // It's a DOM selector - if we find it then we ship over this step
+ if(upcomingStep.skipStepIfVisible) {
+ let tryFindDomEl = document.querySelector(upcomingStep.element);
+ if(tryFindDomEl) {
+ // check if element is visible:
+ if( tryFindDomEl.offsetWidth || tryFindDomEl.offsetHeight || tryFindDomEl.getClientRects().length ) {
+ // if it was visible then we skip the step.
+ nextStep();
+ }
+ }
+ }
+
startStep();
- // tour completed - final step
+
} else {
+ // tour completed - final step
scope.loadingStep = true;
waitForPendingRerequests().then(function () {
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-form-check.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-form-check.less
index 9a3760444d..8a24d948ac 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/umb-form-check.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-form-check.less
@@ -48,6 +48,9 @@ label.umb-form-check--checkbox{
&:checked ~ .umb-form-check__state .umb-form-check__check {
border-color: @ui-option-type;
}
+ &[type='checkbox']:checked ~ .umb-form-check__state .umb-form-check__check {
+ background-color: @ui-option-type;
+ }
&:checked:hover ~ .umb-form-check__state .umb-form-check__check {
&::before {
background: @ui-option-type-hover;
diff --git a/src/Umbraco.Web.UI/config/BackOfficeTours/getting-started.json b/src/Umbraco.Web.UI/config/BackOfficeTours/getting-started.json
index d0aa1a1c34..3709e703d9 100644
--- a/src/Umbraco.Web.UI/config/BackOfficeTours/getting-started.json
+++ b/src/Umbraco.Web.UI/config/BackOfficeTours/getting-started.json
@@ -188,27 +188,21 @@
"event": "click"
},
{
- "element": "[data-element~='editor-data-type-picker']",
+ "element": "[ng-controller*='Umbraco.Editors.DataTypePickerController'] [data-element='editor-data-type-picker']",
"elementPreventClick": true,
"title": "Editor picker",
- "content": "In the editor picker dialog we can pick one of the many built-in editors.
You can choose from preconfigured data types (Reuse) or create a new configuration (Available editors).
"
+ "content": "In the editor picker dialog we can pick one of the many built-in editors.
"
},
{
- "element": "[data-element~='editor-data-type-picker'] [data-element='editor-Textarea']",
+ "element": "[data-element~='editor-data-type-picker'] [data-element='datatype-Textarea']",
"title": "Select editor",
"content": "Select the Textarea editor. This will add a textarea to the Welcome Text property.",
"event": "click"
},
{
- "element": "[data-element~='editor-data-type-settings']",
- "elementPreventClick": true,
+ "element": "[data-element='editor-data-type-picker'] [data-element='datatypeconfig-Textarea'] > a",
"title": "Editor settings",
- "content": "Each property editor can have individual settings. For the textarea editor you can set a character limit but in this case it is not needed."
- },
- {
- "element": "[data-element~='editor-data-type-settings'] [data-element='button-submit']",
- "title": "Save editor",
- "content": "Click Submit to save the changes.",
+ "content": "Each property editor can have individual settings. For the textarea editor you can set a character limit but in this case it is not needed.",
"event": "click"
},
{
@@ -317,7 +311,8 @@
"content": "To see all our templates click the small triangle to the left of the templates node.
",
"event": "click",
"eventElement": "#tree [data-element='tree-item-templates'] [data-element='tree-item-expand']",
- "view": "templatetree"
+ "view": "templatetree",
+ "skipStepIfVisible": "#tree [data-element='tree-item-templates'] > div > button[data-element=tree-item-expand].icon-navigation-down"
},
{
"element": "#tree [data-element='tree-item-templates'] [data-element='tree-item-Home Page']",
diff --git a/src/Umbraco.Web/Editors/AuthenticationController.cs b/src/Umbraco.Web/Editors/AuthenticationController.cs
index 8ae88b62ef..fe8a93f67a 100644
--- a/src/Umbraco.Web/Editors/AuthenticationController.cs
+++ b/src/Umbraco.Web/Editors/AuthenticationController.cs
@@ -386,30 +386,7 @@ namespace Umbraco.Web.Editors
}
- ///
- /// Logs the current user out
- ///
- ///
- [ClearAngularAntiForgeryToken]
- [ValidateAngularAntiForgeryToken]
- public HttpResponseMessage PostLogout()
- {
- var owinContext = Request.TryGetOwinContext().Result;
-
- owinContext.Authentication.SignOut(
- Core.Constants.Security.BackOfficeAuthenticationType,
- Core.Constants.Security.BackOfficeExternalAuthenticationType);
-
- Logger.Info("User {UserName} from IP address {RemoteIpAddress} has logged out", User.Identity == null ? "UNKNOWN" : User.Identity.Name, owinContext.Request.RemoteIpAddress);
-
- if (UserManager != null)
- {
- int.TryParse(User.Identity.GetUserId(), out var userId);
- UserManager.RaiseLogoutSuccessEvent(User, userId);
- }
-
- return Request.CreateResponse(HttpStatusCode.OK);
- }
+
// NOTE: This has been migrated to netcore, but in netcore we don't explicitly set the principal in this method, that's done in ConfigureUmbracoBackOfficeCookieOptions so don't worry about that
private HttpResponseMessage SetPrincipalAndReturnUserDetail(IUser user, IPrincipal principal)
diff --git a/src/Umbraco.Web/Security/AppBuilderExtensions.cs b/src/Umbraco.Web/Security/AppBuilderExtensions.cs
index f766a142d9..d95c19bedf 100644
--- a/src/Umbraco.Web/Security/AppBuilderExtensions.cs
+++ b/src/Umbraco.Web/Security/AppBuilderExtensions.cs
@@ -29,228 +29,6 @@ namespace Umbraco.Web.Security
///