working on U4-5648 Remove legacy razor macro's entirely

This commit is contained in:
Shannon
2014-11-14 14:05:46 +11:00
parent b7bc98fccc
commit 5aeecf7701
22 changed files with 10 additions and 448 deletions

View File

@@ -1,32 +0,0 @@
using System;
namespace Umbraco.Core.Configuration
{
//NOTE: This is used in the old DynamicNode for performing value conversions/mappings for certain data types.
// it has been obsoleted because we've replaced this with the PropertyEditorValueConvertersResolver which can
// have converters registered in code so we don't have to rely on even more config sections.
// These things probably won't need to be created all that often and in code is much easier to do.
internal class RazorDataTypeModelStaticMappingItem
{
[Obsolete("This is not used whatsoever")]
public string Raw { get; set; }
//if all of the set (non null) properties match the property data currently being evaluated
public string PropertyTypeAlias { get; set; }
public string NodeTypeAlias { get; set; }
public Guid? DataTypeGuid { get; set; }
public string TypeName { get; set; }
public bool Applies(Guid dataTypeGuid, string nodeTypeAlias, string propertyTypeAlias)
{
return
(
(this.NodeTypeAlias != null || this.PropertyTypeAlias != null || this.DataTypeGuid != null) &&
((this.DataTypeGuid != null && this.DataTypeGuid == dataTypeGuid) || this.DataTypeGuid == null) &&
((this.PropertyTypeAlias != null && this.PropertyTypeAlias == propertyTypeAlias) || this.PropertyTypeAlias == null) &&
((this.NodeTypeAlias != null && this.NodeTypeAlias == nodeTypeAlias) || this.NodeTypeAlias == null)
);
}
}
}

View File

@@ -19,10 +19,6 @@ namespace Umbraco.Core.Models
[EnumMember]
Unknown = 4,
[EnumMember]
Python = 5,
[EnumMember]
Script = 6,
[EnumMember]
PartialView = 7
}
}

View File

@@ -47,14 +47,8 @@ namespace Umbraco.Core.Services
return MacroTypes.Xslt;
if (string.IsNullOrEmpty(macro.ScriptPath) == false)
{
//we need to check if the file path saved is a virtual path starting with ~/Views/MacroPartials, if so then this is
//a partial view macro, not a script macro
//we also check if the file exists in ~/App_Plugins/[Packagename]/Views/MacroPartials, if so then it is also a partial view.
return (macro.ScriptPath.InvariantStartsWith(SystemDirectories.MvcViews + "/MacroPartials/")
|| (Regex.IsMatch(macro.ScriptPath, "~/App_Plugins/.+?/Views/MacroPartials", RegexOptions.Compiled | RegexOptions.IgnoreCase)))
? MacroTypes.PartialView
: MacroTypes.Script;
{
return MacroTypes.PartialView;
}
if (string.IsNullOrEmpty(macro.ControlType) == false && macro.ControlType.InvariantContains(".ascx"))

View File

@@ -1167,7 +1167,6 @@
<Compile Include="IO\SystemFiles.cs" />
<Compile Include="Media\IThumbnailProvider.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Configuration\RazorDataTypeModelStaticMappingItem.cs" />
<Compile Include="StringAliasCaseType.cs" />
<Compile Include="StringExtensions.cs" />
<Compile Include="UriExtensions.cs" />

View File

@@ -14,7 +14,6 @@ using Umbraco.Core.IO;
using Umbraco.Core.PropertyEditors;
using umbraco.DataLayer;
using umbraco.editorControls;
using umbraco.MacroEngines;
using Umbraco.Tests.TestHelpers;
using umbraco.uicontrols;
using Umbraco.Web;
@@ -53,7 +52,6 @@ namespace Umbraco.Tests.Plugins
typeof(System.Web.Mvc.ActionResult).Assembly,
typeof(TypeFinder).Assembly,
typeof(ISqlHelper).Assembly,
typeof(ICultureDictionary).Assembly,
typeof(UmbracoContext).Assembly,
typeof(BaseDataType).Assembly
};
@@ -312,13 +310,6 @@ namespace Umbraco.Tests.Plugins
Assert.AreEqual(35, types.Count());
}
[Test]
public void Resolves_RazorDataTypeModels()
{
var types = PluginManager.Current.ResolveRazorDataTypeModels();
Assert.AreEqual(2, types.Count());
}
[Test]
public void Resolves_RestExtensions()
{

View File

@@ -20,7 +20,6 @@ using Umbraco.Core.IO;
using umbraco.DataLayer;
using umbraco.editorControls.tags;
using umbraco.interfaces;
using umbraco.MacroEngines;
using Umbraco.Tests.TestHelpers;
using umbraco.uicontrols;
using Umbraco.Web.BaseRest;
@@ -60,7 +59,6 @@ namespace Umbraco.Tests.Plugins
typeof(System.Web.Mvc.ActionResult).Assembly,
typeof(TypeFinder).Assembly,
typeof(ISqlHelper).Assembly,
typeof(ICultureDictionary).Assembly,
typeof(Tag).Assembly,
typeof(global::UmbracoExamine.BaseUmbracoIndexer).Assembly
};

View File

@@ -235,7 +235,7 @@ namespace Umbraco.Tests.PublishedContent
.FirstOrDefault();
Assert.IsNotNull(result);
Assert.IsTrue(result.GetType() == typeof(DynamicNull) || result.GetType() == typeof(umbraco.MacroEngines.DynamicNull));
Assert.IsTrue(result.GetType() == typeof(DynamicNull));
//Assert.AreEqual(typeof(DynamicNull), result.GetType());
}
@@ -259,7 +259,7 @@ namespace Umbraco.Tests.PublishedContent
.FirstOrDefault();
Assert.IsNotNull(result);
Assert.IsTrue(result.GetType() == typeof (DynamicNull) || result.GetType() == typeof (umbraco.MacroEngines.DynamicNull));
Assert.IsTrue(result.GetType() == typeof (DynamicNull));
//Assert.AreEqual(typeof (DynamicNull), result.GetType());
}

View File

@@ -1,76 +0,0 @@
using System;
using System.IO;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Tests.TestHelpers;
using Umbraco.Web;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.PublishedCache.XmlPublishedCache;
using umbraco.MacroEngines;
using umbraco.NodeFactory;
using System.Linq;
namespace Umbraco.Tests.PublishedContent
{
[DatabaseTestBehavior(DatabaseBehavior.NewDbFileAndSchemaPerFixture)]
[TestFixture]
public class DynamicNodeTests : DynamicDocumentTestsBase<DynamicNode, DynamicNodeList>
{
public override void Initialize()
{
base.Initialize();
//need to specify a custom callback for unit tests
DynamicNode.GetDataTypeCallback = (docTypeAlias, propertyAlias) =>
{
if (propertyAlias == "content")
{
//return the rte type id
return Guid.Parse(Constants.PropertyEditors.TinyMCEv3);
}
return Guid.Empty;
};
}
[Test]
[Ignore("This test will never work unless DynamicNode is refactored a lot in order to get a list of root nodes since root nodes don't have a parent to look up")]
public override void Is_First_Root_Nodes()
{
base.Is_First_Root_Nodes();
}
[Test]
[Ignore("This test will never work unless DynamicNode is refactored a lot in order to get a list of root nodes since root nodes don't have a parent to look up")]
public override void Is_Not_First_Root_Nodes()
{
base.Is_Not_First_Root_Nodes();
}
[Test]
[Ignore("This test will never work unless DynamicNode is refactored a lot in order to get a list of root nodes since root nodes don't have a parent to look up")]
public override void Is_Position_Root_Nodes()
{
base.Is_Position_Root_Nodes();
}
protected override dynamic GetDynamicNode(int id)
{
//var template = Template.MakeNew("test", new User(0));
//var ctx = GetUmbracoContext("/test", template.Id);
var ctx = GetUmbracoContext("/test", 1234);
var cache = ctx.ContentCache.InnerCache as PublishedContentCache;
if (cache == null) throw new Exception("Unsupported IPublishedContentCache, only the Xml one is supported.");
var node = new DynamicNode(
new DynamicBackingItem(
new Node(cache.GetXml(ctx, ctx.InPreviewMode).SelectSingleNode("//*[@id='" + id + "' and @isDoc]"))));
Assert.IsNotNull(node);
return (dynamic)node;
}
}
}

View File

@@ -44,18 +44,7 @@ namespace Umbraco.Tests.PublishedContent
dynamicElementByCleanedName.someattribute);
}
[Test]
public void Custom_Extension_Method_Legacy()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var typedXml = new global::umbraco.MacroEngines.DynamicXml(xml);
dynamic dynamicXml = typedXml;
//we haven't explicitly defined ElementAt so this will dynamically invoke this method
var element = dynamicXml.ElementAt(0);
Assert.AreEqual("1057", Enumerable.First(element.BaseElement.Elements()).Attribute("id").Value);
}
[Test]
public void Custom_Extension_Method()
@@ -71,21 +60,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual("1057", Enumerable.First(element.BaseElement.Elements()).Attribute("id").Value);
}
[Test]
public void Take_Legacy()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var typedXml = new global::umbraco.MacroEngines.DynamicXml(xml);
dynamic dynamicXml = typedXml;
var typedTaken = typedXml.Take(1);
var dynamicTaken = dynamicXml.Take(1);
Assert.AreEqual(1, typedTaken.Count());
Assert.AreEqual(1, Enumerable.Count(dynamicTaken));
Assert.AreEqual("1057", typedTaken.ElementAt(0).BaseElement.Elements().First().Attribute("id").Value);
Assert.AreEqual("1057", Enumerable.First(Enumerable.ElementAt(dynamicTaken, 0).BaseElement.Elements()).Attribute("id").Value);
}
[Test]
public void Take()
@@ -103,33 +78,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual("1057", Enumerable.First(Enumerable.ElementAt(dynamicTaken, 0).BaseElement.Elements()).Attribute("id").Value);
}
[Test]
public void Ensure_Legacy_Objects_Are_Returned()
{
var xml = "<DAMP fullMedia=\"\"><mediaItem><Image id=\"1057\" version=\"d58d5c16-153e-4896-892f-a722e45a69af\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:55:29\" updateDate=\"2012-11-05T16:55:44\" nodeName=\"test12\" urlName=\"test12\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1057\"><umbracoFile>/media/54/tulips.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>620888</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:55:34\"><crop name=\"thumbCrop\" x=\"154\" y=\"1\" x2=\"922\" y2=\"768\" url=\"/media/54/tulips_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem><mediaItem><Image id=\"1055\" version=\"4df1f08a-3552-45f2-b4bf-fa980c762f4a\" parentID=\"-1\" level=\"1\" writerID=\"0\" nodeType=\"1032\" template=\"0\" sortOrder=\"1\" createDate=\"2012-11-05T16:29:58\" updateDate=\"2012-11-05T16:30:27\" nodeName=\"Test\" urlName=\"test\" writerName=\"admin\" nodeTypeAlias=\"Image\" path=\"-1,1055\"><umbracoFile>/media/41/hydrangeas.jpg</umbracoFile><umbracoWidth>1024</umbracoWidth><umbracoHeight>768</umbracoHeight><umbracoBytes>595284</umbracoBytes><umbracoExtension>jpg</umbracoExtension><newsCrops><crops date=\"2012-11-05T16:30:18\"><crop name=\"thumbCrop\" x=\"133\" y=\"0\" x2=\"902\" y2=\"768\" url=\"/media/41/hydrangeas_thumbCrop.jpg\" /></crops></newsCrops></Image></mediaItem></DAMP>";
var mediaItems = new global::umbraco.MacroEngines.DynamicXml(xml);
//Debug.WriteLine("full xml = {0}", mediaItems.ToXml());
if (mediaItems.Count() != 0)
{
foreach (dynamic item in mediaItems)
{
Type itemType = item.GetType();
Debug.WriteLine("item type = {0}", itemType);
dynamic image = item.Image;
Type imageType = image.GetType();
Debug.WriteLine("image type = {0}", imageType);
//ensure they are the same
Assert.AreEqual(itemType, imageType);
//ensure they are legacy
Assert.AreEqual(typeof(global::umbraco.MacroEngines.DynamicXml), itemType);
Assert.AreEqual(typeof(global::umbraco.MacroEngines.DynamicXml), imageType);
}
}
}
/// <summary>
/// Test the current Core class
@@ -140,14 +89,7 @@ namespace Umbraco.Tests.PublishedContent
RunFindTest(x => new DynamicXml(x));
}
/// <summary>
/// Tests the macroEngines legacy class
/// </summary>
[Test]
public void Find_Test_Legacy_Class()
{
RunFindTest(x => new global::umbraco.MacroEngines.DynamicXml(x));
}
private void RunFindTest(Func<string, dynamic> getDynamicXml)
{

View File

@@ -1,90 +0,0 @@
using System;
using System.Linq;
using Lucene.Net.Documents;
using Lucene.Net.Store;
using Moq;
using NUnit.Framework;
using Umbraco.Tests.TestHelpers;
using Umbraco.Tests.UmbracoExamine;
using umbraco.MacroEngines;
namespace Umbraco.Tests.PublishedContent
{
public class LegacyExamineBackedMediaTests : ExamineBaseTest
{
public override void TestSetup()
{
base.TestSetup();
var settings = SettingsForTests.GenerateMockSettings();
var contentMock = Mock.Get(settings.Content);
contentMock.Setup(x => x.ForceSafeAliases).Returns(true);
contentMock.Setup(x => x.UmbracoLibraryCacheDuration).Returns(1800);
SettingsForTests.ConfigureSettings(settings);
}
public override void TestTearDown()
{
SettingsForTests.Reset();
base.TestTearDown();
}
[Test]
public void Ensure_Children_Are_Sorted()
{
using (var luceneDir = new RAMDirectory())
{
var indexer = IndexInitializer.GetUmbracoIndexer(luceneDir);
indexer.RebuildIndex();
var searcher = IndexInitializer.GetUmbracoSearcher(luceneDir);
var result = searcher.Search(searcher.CreateSearchCriteria().Id(1111).Compile());
Assert.IsNotNull(result);
Assert.AreEqual(1, result.TotalItemCount);
var searchItem = result.First();
var backedMedia = new ExamineBackedMedia(searchItem, indexer, searcher);
var children = backedMedia.ChildrenAsList.Value;
var currSort = 0;
for (var i = 0; i < children.Count(); i++)
{
Assert.GreaterOrEqual(children[i].SortOrder, currSort);
currSort = children[i].SortOrder;
}
}
}
[Test]
public void Ensure_Result_Has_All_Values()
{
using (var luceneDir = new RAMDirectory())
{
var indexer = IndexInitializer.GetUmbracoIndexer(luceneDir);
indexer.RebuildIndex();
var searcher = IndexInitializer.GetUmbracoSearcher(luceneDir);
var result = searcher.Search(searcher.CreateSearchCriteria().Id(1111).Compile());
Assert.IsNotNull(result);
Assert.AreEqual(1, result.TotalItemCount);
var searchItem = result.First();
var backedMedia = new ExamineBackedMedia(searchItem, indexer, searcher);
Assert.AreEqual(searchItem.Id, backedMedia.Id);
Assert.AreEqual(searchItem.Fields["sortOrder"], backedMedia.SortOrder.ToString());
Assert.AreEqual(searchItem.Fields["urlName"], backedMedia.UrlName);
Assert.AreEqual(DateTools.StringToDate(searchItem.Fields["createDate"]), backedMedia.CreateDate);
Assert.AreEqual(DateTools.StringToDate(searchItem.Fields["updateDate"]), backedMedia.UpdateDate);
Assert.AreEqual(Guid.Parse(searchItem.Fields["version"]), backedMedia.Version);
Assert.AreEqual(searchItem.Fields["level"], backedMedia.Level.ToString());
Assert.AreEqual(searchItem.Fields["writerID"], backedMedia.WriterID.ToString());
Assert.AreEqual(searchItem.Fields["writerID"], backedMedia.CreatorID.ToString()); //there's only writerId in the xml
Assert.AreEqual(searchItem.Fields["writerName"], backedMedia.CreatorName);
Assert.AreEqual(searchItem.Fields["writerName"], backedMedia.WriterName); //tehre's only writer name in the xml
}
}
}
}

View File

@@ -1,13 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq;
using NUnit.Framework;
using umbraco;
using umbraco.MacroEngines;
using Umbraco.Web;
using Umbraco.Web.Models;
using Umbraco.Web.Security;
namespace Umbraco.Tests.PublishedContent
{
@@ -38,39 +31,5 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsNull(content);
}
[Test]
public void LegacyDynamicNodeSortOfHasRootNode()
{
// there is a node with ID -1
var node = new DynamicNode(-1);
Assert.IsNotNull(node);
Assert.AreEqual(-1, node.Id);
// content at root
node = new DynamicNode(1046);
Assert.IsNotNull(node);
Assert.AreEqual(1, node.Level);
// has no parent
// (confirmed in 4.7 and 6.1)
Assert.IsNull(node.Parent);
// has siblings etc - no idea how we're supposed to get them?
//var siblings = node.Parent.Children;
//Assert.AreEqual(2, siblings.Count());
// non-existing content is "zero node"
node = new DynamicNode(666, DynamicBackingItemType.Content); // set type to avoid Examine in tests
Assert.IsNotNull(node);
Assert.AreEqual(0, node.Id);
}
[Test]
public void Fix_U4_4374()
{
var node = new DynamicNode(-1);
var id = node.DescendantsOrSelf().First().Id;
Assert.AreEqual(-1, id);
}
}
}

View File

@@ -2,11 +2,7 @@
using System.Data.SqlServerCe;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Linq.Dynamic;
using System.Runtime.InteropServices;
using System.Text;
using System.Web.Management;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;

View File

@@ -377,7 +377,6 @@
<Compile Include="Persistence\SyntaxProvider\SqlCeSyntaxProviderTests.cs" />
<Compile Include="PublishedContent\DynamicXmlConverterTests.cs" />
<Compile Include="PublishedContent\DynamicXmlTests.cs" />
<Compile Include="PublishedContent\LegacyExamineBackedMediaTests.cs" />
<Compile Include="PublishedContent\PublishedContentDataTableTests.cs" />
<Compile Include="PublishedContent\PublishedContentTestBase.cs" />
<Compile Include="PublishedContent\PublishedContentTestElements.cs" />
@@ -445,7 +444,6 @@
<Compile Include="PublishedContent\DynamicPublishedContentCustomExtensionMethods.cs" />
<Compile Include="PublishedContent\DynamicPublishedContentTests.cs" />
<Compile Include="PublishedContent\DynamicDocumentTestsBase.cs" />
<Compile Include="PublishedContent\DynamicNodeTests.cs" />
<Compile Include="ObjectExtensionsTests.cs" />
<Compile Include="PublishedCache\PublishedContentCacheTests.cs" />
<Compile Include="Resolvers\LazyManyObjectResolverTests.cs" />
@@ -610,10 +608,6 @@
<Project>{511F6D8D-7717-440A-9A57-A507E9A8B27F}</Project>
<Name>umbraco.interfaces</Name>
</ProjectReference>
<ProjectReference Include="..\umbraco.MacroEngines\umbraco.MacroEngines.csproj">
<Project>{89C09045-1064-466B-B94A-DB3AFE2A5853}</Project>
<Name>umbraco.MacroEngines</Name>
</ProjectReference>
<ProjectReference Include="..\umbraco.providers\umbraco.providers.csproj">
<Project>{d7636876-0756-43cb-a192-138c6f0d5e42}</Project>
<Name>umbraco.providers</Name>

View File

@@ -271,10 +271,6 @@
<Project>{255F5DF1-4E43-4758-AC05-7A0B68EB021B}</Project>
<Name>umbraco.editorControls</Name>
</ProjectReference>
<ProjectReference Include="..\umbraco.MacroEngines\umbraco.MacroEngines.csproj">
<Project>{89C09045-1064-466B-B94A-DB3AFE2A5853}</Project>
<Name>umbraco.MacroEngines</Name>
</ProjectReference>
<ProjectReference Include="..\umbraco.controls\umbraco.controls.csproj">
<Project>{6EDD2061-82F2-461B-BB6E-879245A832DE}</Project>
<Name>umbraco.controls</Name>

View File

@@ -10,7 +10,7 @@ NOTES:
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
* A new version will invalidate both client and server cache and create new persisted files
-->
<clientDependency version="908669955" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<clientDependency version="1675550603" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<!--
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.

View File

@@ -37,7 +37,6 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Macros
(macro.ScriptPath.StartsWith(SystemDirectories.MvcViews + "/MacroPartials/")
|| (Regex.IsMatch(macro.ScriptPath, "~/App_Plugins/.+?/Views/MacroPartials", RegexOptions.Compiled))))
{
macroPython.Text = "";
SelectedPartialView.Text = macro.ScriptPath;
}
}

View File

@@ -82,12 +82,6 @@
<asp:PlaceHolder ID="assemblyBrowserUserControl" runat="server"></asp:PlaceHolder>
</cc1:PropertyPanel>
<cc1:PropertyPanel runat="server" Text="Razor script">
<asp:TextBox ID="macroPython" runat="server" CssClass="guiInputText"></asp:TextBox>
<asp:DropDownList ID="pythonFiles" runat="server">
</asp:DropDownList>
</cc1:PropertyPanel>
<asp:PlaceHolder runat="server" Visible="false">
<asp:TextBox ID="macroAssembly" runat="server" CssClass="guiInputText"></asp:TextBox>
(Assembly)<br />

View File

@@ -89,7 +89,6 @@ namespace umbraco.cms.presentation.developer
macroName.Text = macro.Name;
macroAlias.Text = macro.Alias;
macroXslt.Text = macro.XsltPath;
macroPython.Text = macro.ScriptPath;
cachePeriod.Text = macro.CacheDuration.ToInvariantString();
macroRenderContent.Checked = macro.DontRender == false;
macroEditor.Checked = macro.UseInEditor;
@@ -123,7 +122,6 @@ namespace umbraco.cms.presentation.developer
macro.ControlAssembly = macroAssemblyValue;
macro.ControlType = macroTypeValue;
macro.XsltPath = macroXslt.Text;
macro.ScriptPath = macroPython.Text;
}
private static void GetXsltFilesFromDir(string orgPath, string path, ArrayList files)
@@ -172,9 +170,6 @@ namespace umbraco.cms.presentation.developer
var razors = new ArrayList();
var razorDir = IOHelper.MapPath(SystemDirectories.MacroScripts + "/");
GetMacroScriptFilesFromDir(razorDir, razorDir, razors);
pythonFiles.DataSource = razors;
pythonFiles.DataBind();
pythonFiles.Items.Insert(0, new ListItem("Browse scripting files on server...", string.Empty));
}
public void deleteMacroProperty(object sender, EventArgs e)
@@ -493,24 +488,6 @@ namespace umbraco.cms.presentation.developer
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder assemblyBrowser;
/// <summary>
/// macroPython control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox macroPython;
/// <summary>
/// pythonFiles control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList pythonFiles;
/// <summary>
/// Pane1_3 control.
/// </summary>

View File

@@ -1,49 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace umbraco.MacroEngines
{
[Obsolete("use Umbraco.Core.RazorDataTypeModelStaticMappingItem instead")]
public class RazorDataTypeModelStaticMappingItem
{
private readonly Umbraco.Core.Configuration.RazorDataTypeModelStaticMappingItem _realMappingItem = new Umbraco.Core.Configuration.RazorDataTypeModelStaticMappingItem();
public string Raw
{
get { return _realMappingItem.Raw; }
set { _realMappingItem.Raw = value; }
}
//if all of the set (non null) properties match the property data currently being evaluated
public string PropertyTypeAlias
{
get { return _realMappingItem.PropertyTypeAlias; }
set { _realMappingItem.PropertyTypeAlias = value; }
}
public string NodeTypeAlias
{
get { return _realMappingItem.NodeTypeAlias; }
set { _realMappingItem.NodeTypeAlias = value; }
}
public Guid? DataTypeGuid
{
get { return _realMappingItem.DataTypeGuid; }
set { _realMappingItem.DataTypeGuid = value; }
}
public string TypeName
{
get { return _realMappingItem.TypeName; }
set { _realMappingItem.TypeName = value; }
}
public bool Applies(Guid dataTypeGuid, string nodeTypeAlias, string propertyTypeAlias)
{
return _realMappingItem.Applies(dataTypeGuid, nodeTypeAlias, propertyTypeAlias);
}
}
}

View File

@@ -8,7 +8,6 @@ using Umbraco.Core;
using System.Collections.Generic;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using RazorDataTypeModelStaticMappingItem = umbraco.MacroEngines.RazorDataTypeModelStaticMappingItem;
namespace umbraco
{
@@ -187,24 +186,6 @@ namespace umbraco
get { return UmbracoConfig.For.UmbracoSettings().Scripting.NotDynamicXmlDocumentElements.Select(x => x.Element).ToList(); }
}
public static List<RazorDataTypeModelStaticMappingItem> RazorDataTypeModelStaticMapping
{
get
{
var mapping = UmbracoConfig.For.UmbracoSettings().Scripting.DataTypeModelStaticMappings;
//now we need to map to the old object until we can clean all this nonsense up
return mapping.Select(x => new RazorDataTypeModelStaticMappingItem()
{
DataTypeGuid = x.DataTypeGuid,
NodeTypeAlias = x.NodeTypeAlias,
PropertyTypeAlias = x.PropertyTypeAlias,
Raw = string.Empty,
TypeName = x.MappingName
}).ToList();
}
}
/// <summary>
/// Gets a value indicating whether umbraco will clone XML cache on publish.
/// </summary>

View File

@@ -222,7 +222,6 @@
<Compile Include="MenuItemI.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Razor\RazorDataTypeModelStaticMappingItem.cs" />
<Compile Include="StateHelper.cs" />
<Compile Include="ui.cs">
<SubType>Code</SubType>

View File

@@ -75,8 +75,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "umbraco.controls", "umbraco
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlCE4Umbraco", "SQLCE4Umbraco\SqlCE4Umbraco.csproj", "{5BA5425F-27A7-4677-865E-82246498AA2E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "umbraco.MacroEngines", "umbraco.MacroEngines\umbraco.MacroEngines.csproj", "{89C09045-1064-466B-B94A-DB3AFE2A5853}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Core", "Umbraco.Core\Umbraco.Core.csproj", "{31785BC3-256C-4613-B2F5-A1B0BDDED8C1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Tests", "Umbraco.Tests\Umbraco.Tests.csproj", "{5D3B8245-ADA6-453F-A008-50ED04BFE770}"
@@ -152,10 +150,6 @@ Global
{5BA5425F-27A7-4677-865E-82246498AA2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BA5425F-27A7-4677-865E-82246498AA2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BA5425F-27A7-4677-865E-82246498AA2E}.Release|Any CPU.Build.0 = Release|Any CPU
{89C09045-1064-466B-B94A-DB3AFE2A5853}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89C09045-1064-466B-B94A-DB3AFE2A5853}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89C09045-1064-466B-B94A-DB3AFE2A5853}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89C09045-1064-466B-B94A-DB3AFE2A5853}.Release|Any CPU.Build.0 = Release|Any CPU
{31785BC3-256C-4613-B2F5-A1B0BDDED8C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{31785BC3-256C-4613-B2F5-A1B0BDDED8C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{31785BC3-256C-4613-B2F5-A1B0BDDED8C1}.Release|Any CPU.ActiveCfg = Release|Any CPU