U4-7048 - more filesystems cleanup
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user