Merge branch '7.0.0' of https://github.com/umbraco/Umbraco-CMS into 7.0.0

This commit is contained in:
perploug
2013-11-04 14:58:42 +01:00
14 changed files with 80 additions and 40 deletions

View File

@@ -0,0 +1,32 @@
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
namespace Umbraco.Core.Configuration.Dashboard
{
internal class AreaCollection : ConfigurationElementCollection, IEnumerable<IArea>
{
protected override ConfigurationElement CreateNewElement()
{
return new AreaElement();
}
protected override object GetElementKey(ConfigurationElement element)
{
return ((AreaElement) element).Value;
}
IEnumerator<IArea> IEnumerable<IArea>.GetEnumerator()
{
for (var i = 0; i < Count; i++)
{
yield return BaseGet(i) as IArea;
}
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}

View File

@@ -0,0 +1,12 @@
using System.Configuration;
namespace Umbraco.Core.Configuration.Dashboard
{
internal class AreaElement : InnerTextConfigurationElement<string>, IArea
{
string IArea.AreaName
{
get { return Value; }
}
}
}

View File

@@ -2,17 +2,14 @@
namespace Umbraco.Core.Configuration.Dashboard
{
internal class AreasElement : ConfigurationElement, IArea
internal class AreasElement : ConfigurationElement
{
[ConfigurationProperty("area", IsRequired = true)]
public InnerTextConfigurationElement<string> AreaName
[ConfigurationCollection(typeof(SectionCollection), AddItemName = "area")]
[ConfigurationProperty("", IsDefaultCollection = true)]
public AreaCollection AreaCollection
{
get { return (InnerTextConfigurationElement<string>)this["area"]; }
}
string IArea.AreaName
{
get { return AreaName; }
get { return (AreaCollection)base[""]; }
set { base[""] = value; }
}
}
}

View File

@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration.Dashboard
{
string Alias { get; }
string Area { get; }
IEnumerable<string> Areas { get; }
IEnumerable<IDashboardTab> Tabs { get; }

View File

@@ -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<string> ISection.Areas
{
get { return Area.AreaName; }
get { return Areas.AreaCollection.Cast<AreaElement>().Select(x => x.Value); }
}
IAccess ISection.AccessRights

View File

@@ -159,6 +159,8 @@
<Compile Include="Configuration\Dashboard\AccessElement.cs" />
<Compile Include="Configuration\Dashboard\AccessItem.cs" />
<Compile Include="Configuration\Dashboard\AccessType.cs" />
<Compile Include="Configuration\Dashboard\AreaCollection.cs" />
<Compile Include="Configuration\Dashboard\AreaElement.cs" />
<Compile Include="Configuration\Dashboard\AreasElement.cs" />
<Compile Include="Configuration\Dashboard\ControlCollection.cs" />
<Compile Include="Configuration\Dashboard\ControlElement.cs" />

View File

@@ -96,6 +96,7 @@
<section alias="StartupMemberDashboardSection">
<areas>
<area>default</area>
<area>member</area>
</areas>
<tab caption="Get Started">

View File

@@ -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]

View File

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

View File

@@ -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 {

View File

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

View File

@@ -88,7 +88,7 @@
// Buttons
// -------------------------
@btnBackground: #f2f2f2;
@btnBackgroundHighlight: #f2f2f2;
@btnBackgroundHighlight: #e4e4e4;
@btnBorder: #ccc;
//@btnPrimaryBackground: #297aff;

View File

@@ -21,7 +21,7 @@ namespace Umbraco.Web.Editors
var tabs = new List<Tab<DashboardControl>>();
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)

View File

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