Cleans up legacy stylesheet code to wrap the new APIs better, creates a new OriginalPath property on IFile to track if the path has changed, updates FileRepository to deal with path's changing and automatically deal with renaming files. Adds new methods to IFileService: GetStylesheetsAtPath. Fixes up the stylesheet and stylesheet property editors to use the file names, gets tree syncing working nicely for them both even with files or properties are renamed. Updates stylesheet editors and controllers to use the new APIs

This commit is contained in:
Shannon
2015-01-15 11:49:32 +11:00
parent 5a6e63e8d4
commit 8abf6fc2b5
30 changed files with 341 additions and 464 deletions

View File

@@ -374,6 +374,11 @@ namespace Umbraco.Core
return input.EndsWith(value.ToString(CultureInfo.InvariantCulture)) ? input : input + value;
}
public static string EnsureEndsWith(this string input, string toEndWith)
{
return input.EndsWith(toEndWith.ToString(CultureInfo.InvariantCulture)) ? input : input + toEndWith;
}
public static bool IsLowerCase(this char ch)
{
return ch.ToString(CultureInfo.InvariantCulture) == ch.ToString(CultureInfo.InvariantCulture).ToLowerInvariant();