From 0b7571afda725bc1beb2151e8e0fb307aa415e95 Mon Sep 17 00:00:00 2001 From: slace Date: Tue, 13 Oct 2009 11:55:25 +0000 Subject: [PATCH] DO NOT DOWNLOAD, WAIT FOR THE RELEASE! :P SQL to insert app designer when doing a clean install/ upgrade fixing the packege & membership trees [TFS Changeset #60003] --- umbraco/datalayer/SqlHelpers/SqlServer/Sql/Total.sql | 7 ++++++- .../SqlHelpers/SqlServer/Sql/Version4_Upgrade.sql | 7 ++++++- umbraco/presentation/umbraco.presentation.csproj | 2 +- umbraco/presentation/umbraco/Trees/loadMembers.cs | 8 ++++++-- umbraco/presentation/umbraco/Trees/loadPackager.cs | 6 +++++- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/umbraco/datalayer/SqlHelpers/SqlServer/Sql/Total.sql b/umbraco/datalayer/SqlHelpers/SqlServer/Sql/Total.sql index e748d35c89..595f6bc53c 100644 --- a/umbraco/datalayer/SqlHelpers/SqlServer/Sql/Total.sql +++ b/umbraco/datalayer/SqlHelpers/SqlServer/Sql/Total.sql @@ -991,4 +991,9 @@ SET IDENTITY_INSERT [umbracoNode] OFF IF NOT EXISTS (SELECT treeAlias FROM umbracoAppTree WHERE treeAlias='mediaRecycleBin') INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias, treeAlias, treeTitle, treeIconClosed, treeIconOpen, treeHandlerAssembly, treeHandlerType) VALUES (0, 0, 0, 'media', 'mediaRecycleBin', 'RecycleBin', 'folder.gif', 'folder_o.gif', 'umbraco', 'cms.presentation.Trees.MediaRecycleBin') -; \ No newline at end of file +; +/* Dynamic Tree - AKA Application Designer Tree */ +IF NOT EXISTS (SELECT treeAlias from umbracoAppTree WHERE treeAlias='dynamicTree') +INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias, treeAlias, treeTitle, treeIconClosed, treeIconOpen, treeHandlerAssembly, treeHandlerType) +VALUES (0, 0, 0, 'content', 'dynamicTree', 'DynamicTree', 'folder.gif', 'folder_o.gif', 'umbraco', 'cms.presentation.Trees.dynamicTree') +; diff --git a/umbraco/datalayer/SqlHelpers/SqlServer/Sql/Version4_Upgrade.sql b/umbraco/datalayer/SqlHelpers/SqlServer/Sql/Version4_Upgrade.sql index 4c0ecbfcf5..0918e72915 100644 --- a/umbraco/datalayer/SqlHelpers/SqlServer/Sql/Version4_Upgrade.sql +++ b/umbraco/datalayer/SqlHelpers/SqlServer/Sql/Version4_Upgrade.sql @@ -46,4 +46,9 @@ SET IDENTITY_INSERT [umbracoNode] OFF IF NOT EXISTS (SELECT treeAlias FROM umbracoAppTree WHERE treeAlias='mediaRecycleBin') INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias, treeAlias, treeTitle, treeIconClosed, treeIconOpen, treeHandlerAssembly, treeHandlerType) VALUES (0, 0, 0, 'media', 'mediaRecycleBin', 'RecycleBin', 'folder.gif', 'folder_o.gif', 'umbraco', 'cms.presentation.Trees.MediaRecycleBin') -; \ No newline at end of file +; +/* Dynamic Tree - AKA Application Designer Tree */ +IF NOT EXISTS (SELECT treeAlias from umbracoAppTree WHERE treeAlias='dynamicTree') +INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias, treeAlias, treeTitle, treeIconClosed, treeIconOpen, treeHandlerAssembly, treeHandlerType) +VALUES (0, 0, 0, 'content', 'dynamicTree', 'DynamicTree', 'folder.gif', 'folder_o.gif', 'umbraco', 'cms.presentation.Trees.dynamicTree') +; diff --git a/umbraco/presentation/umbraco.presentation.csproj b/umbraco/presentation/umbraco.presentation.csproj index a90ce5cc09..f6bca3905a 100644 --- a/umbraco/presentation/umbraco.presentation.csproj +++ b/umbraco/presentation/umbraco.presentation.csproj @@ -2206,7 +2206,7 @@ - + diff --git a/umbraco/presentation/umbraco/Trees/loadMembers.cs b/umbraco/presentation/umbraco/Trees/loadMembers.cs index b453d794f8..22ad1fc909 100644 --- a/umbraco/presentation/umbraco/Trees/loadMembers.cs +++ b/umbraco/presentation/umbraco/Trees/loadMembers.cs @@ -126,6 +126,7 @@ function openContentItem(id) { treeElement.SetAttribute("icon", "doc.gif"); treeElement.SetAttribute("openIcon", "doc.gif"); treeElement.SetAttribute("nodeType", "contentItem"); + treeElement.SetAttribute("hasChildren", "true"); root.AppendChild(treeElement); } } @@ -145,6 +146,7 @@ function openContentItem(id) { treeElement.SetAttribute("icon", "member.gif"); treeElement.SetAttribute("openIcon", "member.gif"); treeElement.SetAttribute("nodeType", "member"); + treeElement.SetAttribute("hasChildren", "true"); root.AppendChild(treeElement); } } @@ -163,6 +165,7 @@ function openContentItem(id) { treeElement.SetAttribute("icon", "member.gif"); treeElement.SetAttribute("openIcon", "member.gif"); treeElement.SetAttribute("nodeType", "member"); + treeElement.SetAttribute("hasChildren", "true"); root.AppendChild(treeElement); } } @@ -180,6 +183,7 @@ function openContentItem(id) { treeElement.SetAttribute("icon", "member.gif"); treeElement.SetAttribute("openIcon", "member.gif"); treeElement.SetAttribute("nodeType", "member"); + treeElement.SetAttribute("hasChildren", "true"); root.AppendChild(treeElement); } } @@ -201,7 +205,7 @@ function openContentItem(id) { treeElement.SetAttribute("icon", FolderIcon); treeElement.SetAttribute("openIcon", FolderIcon); treeElement.SetAttribute("nodeType", "member"); - + treeElement.SetAttribute("hasChildren", "true"); treeElement.SetAttribute("src", "tree.aspx?letter=" + ((char)i) + "&app=" + m_app + "&treeType=" + @@ -223,7 +227,7 @@ function openContentItem(id) { treeElementOther.SetAttribute("icon", FolderIcon); treeElementOther.SetAttribute("openIcon", FolderIcon); treeElementOther.SetAttribute("nodeType", "member"); - + treeElementOther.SetAttribute("hasChildren", "true"); treeElementOther.SetAttribute("src", "tree.aspx?letter=Others&app=" + m_app + "&treeType=" + HttpContext.Current.Request.QueryString["treeType"] + "&rnd=" + diff --git a/umbraco/presentation/umbraco/Trees/loadPackager.cs b/umbraco/presentation/umbraco/Trees/loadPackager.cs index dbddd556ee..2d247533a8 100644 --- a/umbraco/presentation/umbraco/Trees/loadPackager.cs +++ b/umbraco/presentation/umbraco/Trees/loadPackager.cs @@ -24,7 +24,7 @@ using umbraco.BusinessLogic.Utils; namespace umbraco { - // + /// /// Handles loading of the packager application into the developer application tree /// public class loadPackager : ITree @@ -94,6 +94,7 @@ namespace umbraco treeElement.SetAttribute("nodeType", "installedPackages"); treeElement.SetAttribute("menu", "L"); treeElement.SetAttribute("text", ui.Text("treeHeaders", "installedPackages")); + treeElement.SetAttribute("hasChildren", "true"); } else { @@ -116,6 +117,7 @@ namespace umbraco treeElement.SetAttribute("nodeType", "packagesRepositories"); treeElement.SetAttribute("menu", "L"); treeElement.SetAttribute("text", ui.Text("treeHeaders", "repositories")); + treeElement.SetAttribute("hasChildren", "true"); } //if only one repo, then just list it directly and name it as the repository. @@ -129,6 +131,7 @@ namespace umbraco treeElement.SetAttribute("action", "javascript:openPackageCategory('BrowseRepository.aspx?repoGuid=" + repos[0].Guid + "');"); treeElement.SetAttribute("icon", "repository.gif"); treeElement.SetAttribute("openIcon", "repository.gif"); + treeElement.SetAttribute("hasChildren", "true"); } //if none registered, then remove the repo node. @@ -145,6 +148,7 @@ namespace umbraco treeElement.SetAttribute("nodeType", "createdPackages"); treeElement.SetAttribute("menu", "C,L"); treeElement.SetAttribute("text", ui.Text("treeHeaders", "createdPackages")); + treeElement.SetAttribute("hasChildren", "true"); break; case "installer.aspx":