diff --git a/src/Umbraco.Core/Configuration/Dashboard/AreaCollection.cs b/src/Umbraco.Core/Configuration/Dashboard/AreaCollection.cs new file mode 100644 index 0000000000..03acce069f --- /dev/null +++ b/src/Umbraco.Core/Configuration/Dashboard/AreaCollection.cs @@ -0,0 +1,32 @@ +using System.Collections; +using System.Collections.Generic; +using System.Configuration; + +namespace Umbraco.Core.Configuration.Dashboard +{ + internal class AreaCollection : ConfigurationElementCollection, IEnumerable + { + protected override ConfigurationElement CreateNewElement() + { + return new AreaElement(); + } + + protected override object GetElementKey(ConfigurationElement element) + { + return ((AreaElement) element).Value; + } + + IEnumerator IEnumerable.GetEnumerator() + { + for (var i = 0; i < Count; i++) + { + yield return BaseGet(i) as IArea; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/Dashboard/AreaElement.cs b/src/Umbraco.Core/Configuration/Dashboard/AreaElement.cs new file mode 100644 index 0000000000..1f498f9eae --- /dev/null +++ b/src/Umbraco.Core/Configuration/Dashboard/AreaElement.cs @@ -0,0 +1,12 @@ +using System.Configuration; + +namespace Umbraco.Core.Configuration.Dashboard +{ + internal class AreaElement : InnerTextConfigurationElement, IArea + { + string IArea.AreaName + { + get { return Value; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs b/src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs index 8ab27f6387..3b63a4188f 100644 --- a/src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs +++ b/src/Umbraco.Core/Configuration/Dashboard/AreasElement.cs @@ -2,17 +2,14 @@ namespace Umbraco.Core.Configuration.Dashboard { - internal class AreasElement : ConfigurationElement, IArea + internal class AreasElement : ConfigurationElement { - [ConfigurationProperty("area", IsRequired = true)] - public InnerTextConfigurationElement AreaName + [ConfigurationCollection(typeof(SectionCollection), AddItemName = "area")] + [ConfigurationProperty("", IsDefaultCollection = true)] + public AreaCollection AreaCollection { - get { return (InnerTextConfigurationElement)this["area"]; } - } - - string IArea.AreaName - { - get { return AreaName; } + get { return (AreaCollection)base[""]; } + set { base[""] = value; } } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/Dashboard/ISection.cs b/src/Umbraco.Core/Configuration/Dashboard/ISection.cs index f841b71e40..39b86717e7 100644 --- a/src/Umbraco.Core/Configuration/Dashboard/ISection.cs +++ b/src/Umbraco.Core/Configuration/Dashboard/ISection.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration.Dashboard { string Alias { get; } - string Area { get; } + IEnumerable Areas { get; } IEnumerable Tabs { get; } diff --git a/src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs b/src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs index b2be96712b..b34d2c6293 100644 --- a/src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs +++ b/src/Umbraco.Core/Configuration/Dashboard/SectionElement.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Configuration; +using System.Linq; namespace Umbraco.Core.Configuration.Dashboard { @@ -12,7 +13,7 @@ namespace Umbraco.Core.Configuration.Dashboard } [ConfigurationProperty("areas", IsRequired = true)] - public AreasElement Area + public AreasElement Areas { get { return (AreasElement)this["areas"]; } } @@ -35,10 +36,10 @@ namespace Umbraco.Core.Configuration.Dashboard { get { return TabCollection; } } - - string ISection.Area + + IEnumerable ISection.Areas { - get { return Area.AreaName; } + get { return Areas.AreaCollection.Cast().Select(x => x.Value); } } IAccess ISection.AccessRights diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 3561009c07..6c8fdc5a54 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -159,6 +159,8 @@ + + diff --git a/src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config b/src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config index fc8750f67b..2586682fdb 100644 --- a/src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config +++ b/src/Umbraco.Tests/Configurations/DashboardSettings/Dashboard.config @@ -96,6 +96,7 @@
+ default member diff --git a/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs b/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs index 3130ec47ca..613a697c70 100644 --- a/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs +++ b/src/Umbraco.Tests/Configurations/DashboardSettings/DashboardSettingsTests.cs @@ -41,11 +41,12 @@ namespace Umbraco.Tests.Configurations.DashboardSettings [Test] public void Test_Section_Area() { - Assert.AreEqual("settings", SettingsSection.Sections.ElementAt(0).Area); - Assert.AreEqual("developer", SettingsSection.Sections.ElementAt(1).Area); - Assert.AreEqual("media", SettingsSection.Sections.ElementAt(2).Area); - Assert.AreEqual("content", SettingsSection.Sections.ElementAt(3).Area); - Assert.AreEqual("member", SettingsSection.Sections.ElementAt(4).Area); + Assert.AreEqual("settings", SettingsSection.Sections.ElementAt(0).Areas.First()); + Assert.AreEqual("developer", SettingsSection.Sections.ElementAt(1).Areas.First()); + Assert.AreEqual("media", SettingsSection.Sections.ElementAt(2).Areas.First()); + Assert.AreEqual("content", SettingsSection.Sections.ElementAt(3).Areas.First()); + Assert.AreEqual("default", SettingsSection.Sections.ElementAt(4).Areas.First()); + Assert.AreEqual("member", SettingsSection.Sections.ElementAt(4).Areas.Last()); } [Test] diff --git a/src/Umbraco.Web.UI.Client/src/less/buttons.less b/src/Umbraco.Web.UI.Client/src/less/buttons.less index 08b5d50b8f..d4cf883b2f 100644 --- a/src/Umbraco.Web.UI.Client/src/less/buttons.less +++ b/src/Umbraco.Web.UI.Client/src/less/buttons.less @@ -7,7 +7,7 @@ // -------------------------------------------------- // Core -.btn { +.btn, input[type=submit] { display: inline-block; .ie7-inline-block(); padding: 4px 12px; @@ -30,6 +30,7 @@ // Hover/focus state &:hover, &:focus { + background: @btnBackgroundHighlight; color: @grayDark; text-decoration: none; background-position: 0 -15px; diff --git a/src/Umbraco.Web.UI.Client/src/less/grid.less b/src/Umbraco.Web.UI.Client/src/less/grid.less index e9ca4dbf4a..5621323022 100644 --- a/src/Umbraco.Web.UI.Client/src/less/grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/grid.less @@ -107,7 +107,7 @@ body { z-index: 100; background: @white; height: 100%; - border-right: 1px solid @grayLight; + } .navigation-inner-container{ @@ -117,6 +117,7 @@ body { left: 0px; right: 0px; padding-top: 100px; + border-right: 1px solid @grayLight; } #dialog { diff --git a/src/Umbraco.Web.UI.Client/src/less/tree.less b/src/Umbraco.Web.UI.Client/src/less/tree.less index d43893d3cc..fd1752a45c 100644 --- a/src/Umbraco.Web.UI.Client/src/less/tree.less +++ b/src/Umbraco.Web.UI.Client/src/less/tree.less @@ -167,6 +167,10 @@ a.umb-options i { margin: 0 2px 0 0; } +a.umb-options:hover { + background: @btnBackgroundHighlight +} + li.root > div > a.umb-options { top: 13px; } @@ -266,19 +270,15 @@ div.not-allowed > i.icon,div.not-allowed > a{ white-space: nowrap; display: block; font-size: 14px; - color: #414141; + color: @black; padding: 4px 25px 4px 20px; text-decoration: none; cursor: pointer; } .umb-actions a:hover, .umb-actions a:focus, .umb-actions li.selected { - color: #fff !important; - background: #2e8aea !important; -} - -.umb-actions a:hover i { - color: #fff; + color: @black !important; + background: @grayLighter !important; } .umb-actions .menu-label { @@ -319,14 +319,6 @@ div.not-allowed > i.icon,div.not-allowed > a{ margin-left: 20px; } -.umb-actions-child li a:hover { - color: #fff; - background-color: #2E8AEA -} -.umb-actions-child li a:hover * { - color: #fff !important -} - .umb-actions-child li .menu-label small { font-size: 12px; display: block; diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index c361a1306b..3acfcb67c5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -88,7 +88,7 @@ // Buttons // ------------------------- @btnBackground: #f2f2f2; -@btnBackgroundHighlight: #f2f2f2; +@btnBackgroundHighlight: #e4e4e4; @btnBorder: #ccc; //@btnPrimaryBackground: #297aff; diff --git a/src/Umbraco.Web/Editors/DashboardController.cs b/src/Umbraco.Web/Editors/DashboardController.cs index c93fc65a17..d031c9a691 100644 --- a/src/Umbraco.Web/Editors/DashboardController.cs +++ b/src/Umbraco.Web/Editors/DashboardController.cs @@ -21,7 +21,7 @@ namespace Umbraco.Web.Editors var tabs = new List>(); var dashboardSection = UmbracoConfig.For.DashboardSettings() - .Sections.FirstOrDefault(x => x.Area.InvariantEquals(section)); + .Sections.FirstOrDefault(x => x.Areas.Contains(section)); //if we cannot find it for whatever reason just return an empty one. if (dashboardSection == null) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMemberTypes.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMemberTypes.cs index 9452b990e6..adb5bf1acd 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMemberTypes.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMemberTypes.cs @@ -96,8 +96,8 @@ function openMemberType(id) { treeElement.SetAttribute("text", MemberTypes[i].Text); treeElement.SetAttribute("action", "javascript:openMemberType(" + MemberTypes[i].Id + ");"); treeElement.SetAttribute("src", ""); - treeElement.SetAttribute("icon", "membertype.gif"); - treeElement.SetAttribute("openIcon", "membertype.gif"); + treeElement.SetAttribute("icon", "icon-users"); + treeElement.SetAttribute("openIcon", "icon-users"); treeElement.SetAttribute("nodeType", "memberType"); root.AppendChild(treeElement); }