Renames Control to DashboardControl so it has some meaning.
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Umbraco.Web.Editors
|
||||
public class DashboardController : UmbracoAuthorizedJsonController
|
||||
{
|
||||
|
||||
public IEnumerable<Tab<Control>> GetDashboard(string section)
|
||||
public IEnumerable<Tab<DashboardControl>> GetDashboard(string section)
|
||||
{
|
||||
return GetDashboardFromXml(section);
|
||||
|
||||
@@ -38,13 +38,13 @@ namespace Umbraco.Web.Editors
|
||||
}
|
||||
|
||||
//TODO migrate this into a more managed class
|
||||
private IEnumerable<Tab<Control>> GetDashboardFromXml(string section)
|
||||
private IEnumerable<Tab<DashboardControl>> GetDashboardFromXml(string section)
|
||||
{
|
||||
|
||||
XmlDocument dashBoardXml = new XmlDocument();
|
||||
dashBoardXml.Load(IOHelper.MapPath(SystemFiles.DashboardConfig));
|
||||
var user = UmbracoContext.Security.CurrentUser;
|
||||
var tabs = new List<Tab<Control>>();
|
||||
var tabs = new List<Tab<DashboardControl>>();
|
||||
|
||||
// test for new tab interface
|
||||
foreach (XmlNode dashboard in dashBoardXml.DocumentElement.SelectNodes("//section [areas/area = '" + section.ToLower() + "']"))
|
||||
@@ -60,9 +60,9 @@ namespace Umbraco.Web.Editors
|
||||
{
|
||||
i++;
|
||||
|
||||
Tab<Control> tab = new Tab<Control>();
|
||||
Tab<DashboardControl> tab = new Tab<DashboardControl>();
|
||||
tab.Label = entry.Attributes.GetNamedItem("caption").Value;
|
||||
var props = new List<Control>();
|
||||
var props = new List<DashboardControl>();
|
||||
tab.Id = i;
|
||||
tab.Alias = tab.Label.ToLower().Replace(" ", "_");
|
||||
tab.IsActive = i == 1;
|
||||
@@ -71,7 +71,7 @@ namespace Umbraco.Web.Editors
|
||||
{
|
||||
if (ValidateAccess(uc, user))
|
||||
{
|
||||
Control ctrl = new Control();
|
||||
DashboardControl ctrl = new DashboardControl();
|
||||
|
||||
string control = Core.XmlHelper.GetNodeValue(uc).Trim(' ', '\r', '\n');
|
||||
ctrl.Path = IOHelper.FindFile(control);
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
[DataContract(Name = "control", Namespace = "")]
|
||||
public class Control
|
||||
{
|
||||
[DataMember(Name = "showOnce")]
|
||||
public bool ShowOnce { get; set; }
|
||||
|
||||
[DataMember(Name = "addPanel")]
|
||||
public bool AddPanel { get; set; }
|
||||
|
||||
[DataMember(Name = "serverSide")]
|
||||
public bool ServerSide { get; set; }
|
||||
|
||||
[DataMember(Name = "path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
[DataMember(Name = "caption")]
|
||||
public string Caption { get; set; }
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
[DataContract(Name = "control", Namespace = "")]
|
||||
public class DashboardControl
|
||||
{
|
||||
[DataMember(Name = "showOnce")]
|
||||
public bool ShowOnce { get; set; }
|
||||
|
||||
[DataMember(Name = "addPanel")]
|
||||
public bool AddPanel { get; set; }
|
||||
|
||||
[DataMember(Name = "serverSide")]
|
||||
public bool ServerSide { get; set; }
|
||||
|
||||
[DataMember(Name = "path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
[DataMember(Name = "caption")]
|
||||
public string Caption { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -333,7 +333,7 @@
|
||||
<Compile Include="Editors\MemberController.cs" />
|
||||
<Compile Include="Editors\UserController.cs" />
|
||||
<Compile Include="Install\Steps\MajorUpgradeReport.cs" />
|
||||
<Compile Include="Models\ContentEditing\Control.cs" />
|
||||
<Compile Include="Models\ContentEditing\DashboardControl.cs" />
|
||||
<Compile Include="Models\ContentEditing\DataTypeDisplay.cs" />
|
||||
<Compile Include="Models\ContentEditing\DataTypeSave.cs" />
|
||||
<Compile Include="Models\ContentEditing\EntityBasic.cs" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Xml;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.IO;
|
||||
|
||||
namespace umbraco.cms.businesslogic.packager.standardPackageActions
|
||||
@@ -46,11 +47,11 @@ namespace umbraco.cms.businesslogic.packager.standardPackageActions
|
||||
string dbConfig = SystemFiles.DashboardConfig;
|
||||
|
||||
XmlNode section = xmlData.SelectSingleNode("./section");
|
||||
XmlDocument dashboardFile = xmlHelper.OpenAsXmlDocument(dbConfig);
|
||||
XmlDocument dashboardFile = XmlHelper.OpenAsXmlDocument(dbConfig);
|
||||
|
||||
XmlNode importedSection = dashboardFile.ImportNode(section, true);
|
||||
|
||||
XmlAttribute alias = xmlHelper.addAttribute(dashboardFile, "alias", sectionAlias);
|
||||
XmlAttribute alias = XmlHelper.AddAttribute(dashboardFile, "alias", sectionAlias);
|
||||
importedSection.Attributes.Append(alias);
|
||||
|
||||
dashboardFile.DocumentElement.AppendChild(importedSection);
|
||||
@@ -74,7 +75,7 @@ namespace umbraco.cms.businesslogic.packager.standardPackageActions
|
||||
|
||||
string sectionAlias = xmlData.Attributes["dashboardAlias"].Value;
|
||||
string dbConfig = SystemFiles.DashboardConfig;
|
||||
XmlDocument dashboardFile = xmlHelper.OpenAsXmlDocument(dbConfig);
|
||||
XmlDocument dashboardFile = XmlHelper.OpenAsXmlDocument(dbConfig);
|
||||
|
||||
XmlNode section = dashboardFile.SelectSingleNode("//section [@alias = '" + sectionAlias + "']");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user