Merge pull request #1822 from umbraco/temp-U4-9654

fixes: U4-9654 7.6.0-beta: Legacy icons are not resolved in new listv…
This commit is contained in:
Claus
2017-03-28 14:32:48 +02:00
committed by GitHub
2 changed files with 16 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
(function () {
'use strict';
function MiniListViewDirective(entityResource) {
function MiniListViewDirective(entityResource, iconHelper) {
function link(scope, el, attr, ctrl) {
@@ -19,6 +19,11 @@
function open(node) {
// convert legacy icon for node
if(node && node.icon) {
node.icon = iconHelper.convertFromLegacyIcon(node.icon);
}
goingForward = true;
var miniListView = {
@@ -58,6 +63,11 @@
// update children
miniListView.children = data.items;
_.each(miniListView.children, function(c) {
// convert legacy icon for node
if(c.icon) {
c.icon = iconHelper.convertFromLegacyIcon(c.icon);
}
// set published state for content
if (c.metaData) {
c.hasChildren = c.metaData.HasChildren;
if(scope.entityType === "Document") {

View File

@@ -1,7 +1,7 @@
(function () {
'use strict';
function TableDirective() {
function TableDirective(iconHelper) {
function link(scope, el, attr, ctrl) {
@@ -43,6 +43,10 @@
}
};
scope.getIcon = function (entry) {
return iconHelper.convertFromLegacyIcon(entry.icon);
};
}
var directive = {