Fixes some issues with merge changes.
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
/**
|
||||
* @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() {
|
||||
function treeIconClassFilter(treeIconHelper) {
|
||||
return function (treeNode, standardClasses) {
|
||||
if (treeNode.iconIsClass) {
|
||||
return standardClasses + " " + treeNode.icon;
|
||||
return standardClasses + " " + treeIconHelper.convertFromLegacy(treeNode);
|
||||
}
|
||||
|
||||
return standardClasses;
|
||||
//we need an 'icon-' class in there for certain styles to work so if it is image based we'll add this
|
||||
return standardClasses + " icon-custom-file";
|
||||
};
|
||||
}
|
||||
angular.module('umbraco.filters').filter("umbTreeIconClass", treeIconClassFilter);
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* @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);
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @ngdoc filter
|
||||
* @name umbraco.filters:umbTreeIconImage
|
||||
* @description This will properly render the tree icon image based on the tree icon set on the server
|
||||
**/
|
||||
function treeIconStyleFilter(treeIconHelper) {
|
||||
return function (treeNode) {
|
||||
if (treeNode.iconIsClass) {
|
||||
var converted = treeIconHelper.convertFromLegacy(treeNode);
|
||||
if (converted.startsWith('.')) {
|
||||
//its legacy so add some width/height
|
||||
return "height:16px;width:16px;";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
return "background-image: url('" + treeNode.iconFilePath + "');height:16px;background-position:2px 0px";
|
||||
};
|
||||
}
|
||||
angular.module('umbraco.filters').filter("umbTreeIconStyle", treeIconStyleFilter);
|
||||
Reference in New Issue
Block a user