got legacy tree icons showing up now, added a couple of filters for this to work.

This commit is contained in:
Shannon Deminick
2013-06-02 17:09:16 -10:00
parent c60cc5d10d
commit 575b5b71ab
9 changed files with 120 additions and 41 deletions

View File

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

View File

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