From 59ec709c69168ff13116a9872fc7552764d8d40f Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 9 Sep 2015 16:32:45 +0200 Subject: [PATCH] U4-7048 - more filesystems cleanup --- src/Umbraco.Web/Trees/PartialViewMacrosTree.cs | 2 -- src/Umbraco.Web/Trees/PartialViewsTree.cs | 2 -- .../umbraco/create/PartialViewTasksBase.cs | 13 ++----------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Web/Trees/PartialViewMacrosTree.cs b/src/Umbraco.Web/Trees/PartialViewMacrosTree.cs index 70b8407e11..dfc0636804 100644 --- a/src/Umbraco.Web/Trees/PartialViewMacrosTree.cs +++ b/src/Umbraco.Web/Trees/PartialViewMacrosTree.cs @@ -23,8 +23,6 @@ namespace Umbraco.Web.Trees public override void RenderJS(ref StringBuilder javascript) { - //NOTE: Notice the MacroPartials%2f string below, this is a URLEncoded string of "MacroPartials/" so that the editor knows - // to load the file from the correct location javascript.Append( @" function openMacroPartialView(id) { diff --git a/src/Umbraco.Web/Trees/PartialViewsTree.cs b/src/Umbraco.Web/Trees/PartialViewsTree.cs index 5208dadf6f..ac937864ab 100644 --- a/src/Umbraco.Web/Trees/PartialViewsTree.cs +++ b/src/Umbraco.Web/Trees/PartialViewsTree.cs @@ -25,8 +25,6 @@ namespace Umbraco.Web.Trees public override void RenderJS(ref StringBuilder javascript) { - //NOTE: Notice the Partials%2f string below, this is a URLEncoded string of "Partials/" so that the editor knows - // to load the file from the correct location javascript.Append( @" function openPartialView(id) { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs index cd9a2fcc26..042bf312d1 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs @@ -52,12 +52,7 @@ namespace umbraco if (IsPartialViewMacro == false) { var attempt = fileService.CreatePartialView(model, snippetName, User.Id); - - //TODO: We currently need to hack this because we are using the same editor for views, partial views, partial view macros and - // the editor is using normal UI whereas the partial view repo and these classes are using IFileSystem with relative references - // so the model.Path is a relative reference to the ~/Views/Partials folder, we need to ensure it's prefixed with "Partials/" - - _returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViews&file={0}", model.Path.TrimStart('/').EnsureStartsWith("Partials/")); + _returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViews&file={0}", model.Path.TrimStart('/')); return attempt.Success; } else @@ -73,11 +68,7 @@ namespace umbraco macroService.Save(new Macro(attempt.Result.Alias, attempt.Result.Alias) { ScriptPath = virtualPath }); } - //TODO: We currently need to hack this because we are using the same editor for views, partial views, partial view macros and - // the editor is using normal UI whereas the partial view repo and these classes are using IFileSystem with relative references - // so the model.Path is a relative reference to the ~/Views/Partials folder, we need to ensure it's prefixed with "MacroPartials/" - - _returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViewMacros&file={0}", model.Path.TrimStart('/').EnsureStartsWith("MacroPartials/")); + _returnUrl = string.Format("settings/views/EditView.aspx?treeType=partialViewMacros&file={0}", model.Path.TrimStart('/')); return attempt.Success; }