From 0380b04b03565eaef338b0f1ad54f4a2f2d0d39a Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 30 Jan 2015 11:07:47 +1100 Subject: [PATCH] fixes breadcrumb on content/media, ensures a request to load it doesn't happen if there is no parent, ensures that the full breadcrumb is shown and in the right order and ensures that the breadcrumb class is not added if there isn't one so the margins on the buttons work better. --- .../views/content/content.edit.controller.js | 13 +++--- .../src/views/content/edit.html | 40 +++++++++---------- .../src/views/media/edit.html | 28 ++++++------- .../src/views/media/media.edit.controller.js | 17 ++++---- 4 files changed, 48 insertions(+), 50 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js index c74c7c90b9..fee0df5745 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js @@ -32,13 +32,14 @@ function ContentEditController($scope, $rootScope, $routeParams, $q, $timeout, $ editorState.set($scope.content); - //We fetch all ancestors of the node to generate the footer breadcrump navigation + //We fetch all ancestors of the node to generate the footer breadcrumb navigation if (!$routeParams.create) { - entityResource.getAncestors(content.id, "document") - .then(function (anc) { - anc.pop(); - $scope.ancestors = anc; - }); + if (content.parentId && content.parentId != -1) { + entityResource.getAncestors(content.id, "document") + .then(function (anc) { + $scope.ancestors = anc.reverse(); + }); + } } } diff --git a/src/Umbraco.Web.UI.Client/src/views/content/edit.html b/src/Umbraco.Web.UI.Client/src/views/content/edit.html index 29c646a092..b6ad9cb934 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/edit.html @@ -4,42 +4,40 @@ ng-submit="save()" val-form-manager> - +
- +
-
+
- + + current-node="currentNode" + current-section="{{currentSection}}"> -
-
+
+
-