Adds node styles and ensures they are set for the content tree nodes, now to get them to display styles

This commit is contained in:
Shannon
2013-10-08 12:58:11 +11:00
parent 883a662240
commit 3a33a39411
3 changed files with 85 additions and 37 deletions

View File

@@ -13,5 +13,41 @@
{
treeNode.AdditionalData[LegacyJsCallbackKey] = jsCallback;
}
/// <summary>
/// Sets the node style to show that it is currently protected publicly
/// </summary>
/// <param name="treeNode"></param>
public static void SetProtectedStyle(this TreeNode treeNode)
{
if (treeNode.CssClasses.Contains("protected") == false)
{
treeNode.CssClasses.Add("protected");
}
}
/// <summary>
/// Sets the node style to show that it is has unpublished versions (but is currently published)
/// </summary>
/// <param name="treeNode"></param>
public static void SetHasUnpublishedVersionStyle(this TreeNode treeNode)
{
if (treeNode.CssClasses.Contains("has-unpublished-version") == false)
{
treeNode.CssClasses.Add("has-unpublished-version");
}
}
/// <summary>
/// Sets the node style to show that it is is not published
/// </summary>
/// <param name="treeNode"></param>
public static void SetNotPublishedStyle(this TreeNode treeNode)
{
if (treeNode.CssClasses.Contains("not-published") == false)
{
treeNode.CssClasses.Add("not-published");
}
}
}
}