diff --git a/src/Umbraco.Web/UI/JavaScript/AssetInitialization.cs b/src/Umbraco.Web/UI/JavaScript/AssetInitialization.cs index 7b5716bb20..651f6bde07 100644 --- a/src/Umbraco.Web/UI/JavaScript/AssetInitialization.cs +++ b/src/Umbraco.Web/UI/JavaScript/AssetInitialization.cs @@ -6,56 +6,12 @@ using System.Text; using System.Web; using ClientDependency.Core; using ClientDependency.Core.Config; -using ClientDependency.Core.FileRegistration.Providers; using Newtonsoft.Json.Linq; using Umbraco.Core.PropertyEditors; using Umbraco.Web.PropertyEditors; namespace Umbraco.Web.UI.JavaScript { - /// - /// A custom renderer that only outputs a dependency path instead of script tags - for use with the js loader with yepnope - /// - public class DependencyPathRenderer : StandardRenderer - { - public override string Name - { - get { return "Umbraco.DependencyPathRenderer"; } - } - - /// - /// Used to delimit each dependency so we can split later - /// - public const string Delimiter = "||||"; - - /// - /// Override because the StandardRenderer replaces & with & but we don't want that so we'll reverse it - /// - /// - /// - /// - /// - /// - public override void RegisterDependencies(List allDependencies, HashSet paths, out string jsOutput, out string cssOutput, HttpContextBase http) - { - base.RegisterDependencies(allDependencies, paths, out jsOutput, out cssOutput, http); - - jsOutput = jsOutput.Replace("&", "&"); - cssOutput = cssOutput.Replace("&", "&"); - } - - protected override string RenderSingleJsFile(string js, IDictionary htmlAttributes) - { - return js + Delimiter; - } - - protected override string RenderSingleCssFile(string css, IDictionary htmlAttributes) - { - return css + Delimiter; - } - - } - internal abstract class AssetInitialization { /// diff --git a/src/Umbraco.Web/UI/JavaScript/DependencyPathRenderer.cs b/src/Umbraco.Web/UI/JavaScript/DependencyPathRenderer.cs new file mode 100644 index 0000000000..221f5f8f29 --- /dev/null +++ b/src/Umbraco.Web/UI/JavaScript/DependencyPathRenderer.cs @@ -0,0 +1,50 @@ +using System.Collections.Generic; +using System.Web; +using ClientDependency.Core; +using ClientDependency.Core.FileRegistration.Providers; + +namespace Umbraco.Web.UI.JavaScript +{ + /// + /// A custom renderer that only outputs a dependency path instead of script tags - for use with the js loader with yepnope + /// + public class DependencyPathRenderer : StandardRenderer + { + public override string Name + { + get { return "Umbraco.DependencyPathRenderer"; } + } + + /// + /// Used to delimit each dependency so we can split later + /// + public const string Delimiter = "||||"; + + /// + /// Override because the StandardRenderer replaces & with & but we don't want that so we'll reverse it + /// + /// + /// + /// + /// + /// + public override void RegisterDependencies(List allDependencies, HashSet paths, out string jsOutput, out string cssOutput, HttpContextBase http) + { + base.RegisterDependencies(allDependencies, paths, out jsOutput, out cssOutput, http); + + jsOutput = jsOutput.Replace("&", "&"); + cssOutput = cssOutput.Replace("&", "&"); + } + + protected override string RenderSingleJsFile(string js, IDictionary htmlAttributes) + { + return js + Delimiter; + } + + protected override string RenderSingleCssFile(string css, IDictionary htmlAttributes) + { + return css + Delimiter; + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 080495bada..cf344f6de0 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -418,6 +418,7 @@ + ASPXCodeBehind