got legacy tree icons showing up now, added a couple of filters for this to work.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
define(['angular'], function (angular) {
|
||||
|
||||
/**
|
||||
* @ngdoc filter
|
||||
* @name umbraco.filters:umbTreeIconClass
|
||||
* @restrict E
|
||||
* @description This will properly render the tree icon class based on the tree icon set on the server
|
||||
**/
|
||||
function treeIconClassFilter() {
|
||||
return function (treeNode, standardClasses) {
|
||||
if (treeNode.iconIsClass) {
|
||||
return standardClasses + " " + treeNode.icon;
|
||||
}
|
||||
return standardClasses;
|
||||
};
|
||||
};
|
||||
angular.module('umbraco.filters').filter("umbTreeIconClass", treeIconClassFilter);
|
||||
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
define(['angular'], function (angular) {
|
||||
|
||||
/**
|
||||
* @ngdoc filter
|
||||
* @name umbraco.filters:umbTreeIconImage
|
||||
* @restrict E
|
||||
* @description This will properly render the tree icon image based on the tree icon set on the server
|
||||
**/
|
||||
function treeIconImageFilter() {
|
||||
return function (treeNode) {
|
||||
if (treeNode.iconIsClass) {
|
||||
return "";
|
||||
}
|
||||
return "<img src='" + treeNode.iconFilePath + "'></img>";
|
||||
};
|
||||
};
|
||||
angular.module('umbraco.filters').filter("umbTreeIconImage", treeIconImageFilter);
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user