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.

This commit is contained in:
copilaurobert
2018-08-07 15:59:19 +02:00
parent af8dc17f5e
commit 0b51cb703d
2 changed files with 7 additions and 8 deletions

View File

@@ -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);
}
};

View File

@@ -38,11 +38,7 @@ namespace Umbraco.Web.Models.Mapping
public IEnumerable<ContentApp> Resolve(IContent source, ContentItemDisplay destination, IEnumerable<ContentApp> destMember, ResolutionContext context)
{
var apps = new List<ContentApp>
{
_contentApp,
_infoApp
};
var apps = new List<ContentApp>();
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;
}
}
}
}