Add generic section icon in section picker + clean up legacy section icon stuff
This commit is contained in:
committed by
Sebastiaan Janssen
parent
4cc68912ce
commit
1c554a8770
@@ -1,30 +0,0 @@
|
||||
angular.module("umbraco.directives")
|
||||
.directive('sectionIcon', function ($compile, iconHelper) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
|
||||
link: function (scope, element, attrs) {
|
||||
|
||||
var icon = attrs.icon;
|
||||
|
||||
if (iconHelper.isLegacyIcon(icon)) {
|
||||
//its a known legacy icon, convert to a new one
|
||||
element.html("<i class='" + iconHelper.convertFromLegacyIcon(icon) + "'></i>");
|
||||
}
|
||||
else if (iconHelper.isFileBasedIcon(icon)) {
|
||||
var convert = iconHelper.convertFromLegacyImage(icon);
|
||||
if(convert){
|
||||
element.html("<i class='icon-section " + convert + "'></i>");
|
||||
}else{
|
||||
element.html("<img class='icon-section' src='images/tray/" + icon + "'>");
|
||||
}
|
||||
//it's a file, normally legacy so look in the icon tray images
|
||||
}
|
||||
else {
|
||||
//it's normal
|
||||
element.html("<i class='icon-section " + icon + "'></i>");
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -1875,3 +1875,6 @@ i.small{
|
||||
.icon-alert-alt:before {
|
||||
content: "\e25d";
|
||||
}
|
||||
.icon-section:before {
|
||||
content: "\e24f";
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
function setSectionIcon(sections) {
|
||||
angular.forEach(sections, function(section) {
|
||||
section.icon = "icon-section " + section.cssclass;
|
||||
section.icon = "icon-section";
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
|
||||
function setSectionIcon(sections) {
|
||||
angular.forEach(sections, function (section) {
|
||||
section.icon = "icon-section " + section.cssclass;
|
||||
section.icon = "icon-section";
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user