listOfIcons, ListItem li)
+ {
+ if (this.Page.IsPostBack == false && li.Value == _contentType.IconUrl)
+ li.Selected = true;
+
+ listOfIcons.Add(li);
+ }
+
+ private static string IconClassToIconFileName(string iconClass)
+ {
+ return iconClass.Substring(1, iconClass.Length - 1).ToLowerInvariant().Replace("sprTree".ToLowerInvariant(), "");
+ }
+
+ private static string FileNameToIconFileName(FileInfo file)
+ {
+ return file.Name.Substring(0, file.Name.LastIndexOf(".", StringComparison.Ordinal)).ToLowerInvariant();
+ }
+
#endregion
-
+
#region "Structure" Pane
private void SetupStructurePane()
@@ -358,7 +426,7 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
}
DualAllowedContentTypes.Value = chosenContentTypeIDs;
}
-
+
allowAtRoot.Checked = _contentType.AllowAtRoot;
}
@@ -452,7 +520,7 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
foreach (cms.businesslogic.propertytype.PropertyType pt in propertyTypes)
{
//If the PropertyType doesn't belong on this ContentType skip it and continue to the next one
- if(pt.ContentTypeId != _contentType.Id) continue;
+ if (pt.ContentTypeId != _contentType.Id) continue;
var gpw = new GenericPropertyWrapper();
gpw.ID = "gpw_" + pt.Id;
@@ -635,9 +703,9 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
//Loop through the _genericProperties ArrayList and update all existing PropertyTypes
foreach (GenericPropertyWrapper gpw in _genericProperties)
{
- if(gpw.PropertyType == null) continue;
+ if (gpw.PropertyType == null) continue;
- if(contentTypeItem.PropertyTypes == null || contentTypeItem.PropertyTypes.Any(x => x.Alias == gpw.PropertyType.Alias) == false) continue;
+ if (contentTypeItem.PropertyTypes == null || contentTypeItem.PropertyTypes.Any(x => x.Alias == gpw.PropertyType.Alias) == false) continue;
var propertyType = contentTypeItem.PropertyTypes.First(x => x.Alias == gpw.PropertyType.Alias);
if (propertyType == null) continue;
@@ -786,7 +854,7 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
{
PropertyTypes.Controls.Add(new LiteralControl("No properties defined on this tab. Click on the \"add a new property\" link at the top to create a new property.
"));
}
-
+
private bool DoesPropertyTypeAliasExist(GenericProperty gpData)
{
bool hasAlias = _contentType.getPropertyType(Casing.SafeAliasWithForcingCheck(gpData.Alias.Trim())) != null;
@@ -855,7 +923,7 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
LoadContentType(_contentType.Id);
BindDataGenericProperties(true);
}
-
+
#endregion
#region "Tab" Pane
@@ -863,7 +931,7 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
private void SetupTabPane()
{
uicontrols.TabPage tp = TabView1.NewTabPage("Tabs");
-
+
pnlTab.Style.Add("text-align", "center");
tp.Controls.Add(pnlTab);
diff --git a/src/umbraco.businesslogic/UmbracoSettings.cs b/src/umbraco.businesslogic/UmbracoSettings.cs
index c7db9fdeb1..1e206dcc16 100644
--- a/src/umbraco.businesslogic/UmbracoSettings.cs
+++ b/src/umbraco.businesslogic/UmbracoSettings.cs
@@ -562,6 +562,18 @@ namespace umbraco
get { return Umbraco.Core.Configuration.UmbracoSettings.MacroErrorBehaviour; }
}
+ ///
+ /// This configuration setting defines how to show icons in the document type editor.
+ /// - ShowDuplicates - Show duplicates in files and sprites. (default and current Umbraco 'normal' behaviour)
+ /// - HideSpriteDuplicates - Show files on disk and hide duplicates from the sprite
+ /// - HideFileDuplicates - Show files in the sprite and hide duplicates on disk
+ ///
+ /// MacroErrorBehaviour enum defining how to show icons in the document type editor.
+ public static IconPickerBehaviour IconPickerBehaviour
+ {
+ get { return Umbraco.Core.Configuration.UmbracoSettings.IconPickerBehaviour; }
+ }
+
///
/// Configuration regarding webservices
///