From 0b51cb703d7c164c29e347e7aee0373ba5dcf4c4 Mon Sep 17 00:00:00 2001 From: copilaurobert Date: Tue, 7 Aug 2018 15:59:19 +0200 Subject: [PATCH] Back arrow from list view children will redirect back to parrent, changed the order content apps get added to have the ListView app added first. --- .../components/editor/umbeditorheader.directive.js | 4 ++-- src/Umbraco.Web/Models/Mapping/ContentAppResolver.cs | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js index 9275917578..ac4fce8d44 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorheader.directive.js @@ -204,7 +204,7 @@ Use this directive to construct a header inside the main editor window. (function () { 'use strict'; - function EditorHeaderDirective(iconHelper, editorService) { + function EditorHeaderDirective(iconHelper, editorService, $location, $routeParams) { function link(scope, el, attr, ctrl) { @@ -226,7 +226,7 @@ Use this directive to construct a header inside the main editor window. scope.goBack = function () { if (scope.onBack) { - scope.onBack(); + $location.path('/' + $routeParams.section + '/' + $routeParams.tree + '/' + $routeParams.method + '/' + scope.menu.currentNode.parentId); } }; diff --git a/src/Umbraco.Web/Models/Mapping/ContentAppResolver.cs b/src/Umbraco.Web/Models/Mapping/ContentAppResolver.cs index ae8089e459..e3ecacb056 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentAppResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentAppResolver.cs @@ -38,11 +38,7 @@ namespace Umbraco.Web.Models.Mapping public IEnumerable Resolve(IContent source, ContentItemDisplay destination, IEnumerable destMember, ResolutionContext context) { - var apps = new List - { - _contentApp, - _infoApp - }; + var apps = new List(); if (source.ContentType.IsContainer) { @@ -50,8 +46,11 @@ namespace Umbraco.Web.Models.Mapping apps.AppendListViewApp(_dataTypeService, _propertyEditorCollection, source.ContentType.Alias, "content"); } + apps.Add(_contentApp); + apps.Add(_infoApp); + return apps; } - } +} }