diff --git a/src/SQLCE4Umbraco/Sql/Total.sql b/src/SQLCE4Umbraco/Sql/Total.sql
index 6b7fe6ee87..6a57d2f8dc 100644
--- a/src/SQLCE4Umbraco/Sql/Total.sql
+++ b/src/SQLCE4Umbraco/Sql/Total.sql
@@ -10,7 +10,7 @@
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
- Database version: 4.10.0.0
+ Database version: 4.8.0.2
Please increment this version number if ANY change is made to this script,
so compatibility with scripts for other database systems can be verified easily.
@@ -146,18 +146,12 @@ CREATE TABLE [cmsContentType]
[pk] [int] NOT NULL IDENTITY(1, 1),
[nodeId] [int] NOT NULL,
[alias] [nvarchar] (255) NULL,
-[icon] [nvarchar] (255) NULL,
-[isContainer] bit NOT NULL CONSTRAINT [DF_cmsContentType_isContainer] DEFAULT (0),
-[allowAtRoot] bit NOT NULL CONSTRAINT [DF_cmsContentType_allowAtRoot] DEFAULT (0)
+[icon] [nvarchar] (255) NULL
)
;
ALTER TABLE [cmsContentType] ADD CONSTRAINT [PK_cmsContentType] PRIMARY KEY ([pk])
;
-CREATE TABLE [cmsContentType2ContentType] ([parentContentTypeId] int NOT NULL,[childContentTypeId] int NOT NULL)
-;
-ALTER TABLE [cmsContentType2ContentType] ADD CONSTRAINT [cmsContentType2ContentType_PK] PRIMARY KEY ([parentContentTypeId],[childContentTypeId])
-;
CREATE TABLE [cmsMacroPropertyType]
(
[id] [int] NOT NULL IDENTITY(1, 1),
@@ -189,19 +183,16 @@ ALTER TABLE [umbracoStylesheetProperty] ADD CONSTRAINT [PK_stylesheetProperty] P
*/
-CREATE TABLE [cmsPropertyTypeGroup]
+CREATE TABLE [cmsTab]
(
[id] [int] NOT NULL IDENTITY(1, 1),
[contenttypeNodeId] [int] NOT NULL,
[text] [nvarchar] (255) NOT NULL,
-[sortorder] [int] NOT NULL,
-[parentGroupId] int NULL CONSTRAINT [DF_cmsPropertyTypeGroup_parentGroupId] DEFAULT NULL
+[sortorder] [int] NOT NULL
)
;
-ALTER TABLE [cmsPropertyTypeGroup] ADD CONSTRAINT [PK_cmsPropertyTypeGroup] PRIMARY KEY ([id])
-;
-ALTER TABLE [cmsPropertyTypeGroup] ADD CONSTRAINT [FK_cmsPropertyTypeGroup_cmsPropertyTypeGroup] FOREIGN KEY([parentGroupId]) REFERENCES [cmsPropertyTypeGroup] ([id])
+ALTER TABLE [cmsTab] ADD CONSTRAINT [PK_cmsTab] PRIMARY KEY ([id])
;
CREATE TABLE [cmsTemplate]
(
@@ -309,7 +300,7 @@ CREATE TABLE [cmsPropertyType]
[id] [int] NOT NULL IDENTITY(1, 1),
[dataTypeId] [int] NOT NULL,
[contentTypeId] [int] NOT NULL,
-[propertyTypeGroupId] int,
+[tabId] [int] NULL,
[Alias] [nvarchar] (255) NOT NULL,
[Name] [nvarchar] (255) NULL,
[helpText] [nvarchar] (1000) NULL,
@@ -386,8 +377,7 @@ ALTER TABLE [umbracoAppTree] ADD CONSTRAINT [PK_umbracoAppTree] PRIMARY KEY ([a
CREATE TABLE [cmsContentTypeAllowedContentType]
(
[Id] [int] NOT NULL,
-[AllowedId] [int] NOT NULL,
-[sortOrder] int NOT NULL CONSTRAINT [DF_cmsContentTypeAllowedContentType_sortOrder] DEFAULT (1)
+[AllowedId] [int] NOT NULL
)
;
@@ -587,6 +577,9 @@ CONSTRAINT [FK_cmsTemplate_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbra
ALTER TABLE [cmsContentType] ADD
CONSTRAINT [FK_cmsContentType_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
;
+ALTER TABLE [cmsPropertyType] ADD
+CONSTRAINT [FK_cmsPropertyType_cmsTab] FOREIGN KEY ([tabId]) REFERENCES [cmsTab] ([id])
+;
ALTER TABLE [cmsContent] ADD
CONSTRAINT [FK_cmsContent_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
;
@@ -600,6 +593,8 @@ CONSTRAINT [FK_umbracoUser2app_umbracoApp] FOREIGN KEY ([app]) REFERENCES [umbra
ALTER TABLE [cmsTemplate] DROP CONSTRAINT [FK_cmsTemplate_umbracoNode]
;
+ALTER TABLE [cmsPropertyType] DROP CONSTRAINT [FK_cmsPropertyType_cmsTab]
+;
ALTER TABLE [cmsContent] DROP CONSTRAINT [FK_cmsContent_umbracoNode]
;
ALTER TABLE [cmsMacroProperty] DROP CONSTRAINT [FK_umbracoMacroProperty_umbracoMacroPropertyType]
@@ -731,22 +726,22 @@ ALTER TABLE [umbracoNode] DROP CONSTRAINT [FK_umbracoNode_umbracoNode]
|INSERT INTO [cmsMacroPropertyType] ([id], [macroPropertyTypeAlias], [macroPropertyTypeRenderAssembly], [macroPropertyTypeRenderType], [macroPropertyTypeBaseType]) VALUES (25, N'textMultiLine', N'umbraco.macroRenderings', N'textMultiple', N'String')
|SET IDENTITY_INSERT [cmsMacroPropertyType] OFF
;
-!!!SET IDENTITY_INSERT [cmsPropertyTypeGroup] ON
-|INSERT INTO [cmsPropertyTypeGroup] ([id], [contenttypeNodeId], [text], [sortorder]) VALUES (3, 1032, N'Image', 1)
-|INSERT INTO [cmsPropertyTypeGroup] ([id], [contenttypeNodeId], [text], [sortorder]) VALUES (4, 1033, N'File', 1)
-|INSERT INTO [cmsPropertyTypeGroup] ([id], [contenttypeNodeId], [text], [sortorder]) VALUES (5, 1031, N'Contents', 1)
-|SET IDENTITY_INSERT [cmsPropertyTypeGroup] OFF
+!!!SET IDENTITY_INSERT [cmsTab] ON
+|INSERT INTO [cmsTab] ([id], [contenttypeNodeId], [text], [sortorder]) VALUES (3, 1032, N'Image', 1)
+|INSERT INTO [cmsTab] ([id], [contenttypeNodeId], [text], [sortorder]) VALUES (4, 1033, N'File', 1)
+|INSERT INTO [cmsTab] ([id], [contenttypeNodeId], [text], [sortorder]) VALUES (5, 1031, N'Contents', 1)
+|SET IDENTITY_INSERT [cmsTab] OFF
;
!!!SET IDENTITY_INSERT [cmsPropertyType] ON
-|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [propertyTypeGroupId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (6, -90, 1032, 3, N'umbracoFile', N'Upload image', NULL, 0, 0, NULL, NULL)
-|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [propertyTypeGroupId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (7, -92, 1032, 3, N'umbracoWidth', N'Width', NULL, 0, 0, NULL, NULL)
-|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [propertyTypeGroupId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (8, -92, 1032, 3, N'umbracoHeight', N'Height', NULL, 0, 0, NULL, NULL)
-|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [propertyTypeGroupId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (9, -92, 1032, 3, N'umbracoBytes', N'Size', NULL, 0, 0, NULL, NULL)
-|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [propertyTypeGroupId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (10, -92, 1032, 3, N'umbracoExtension', N'Type', NULL, 0, 0, NULL, NULL)
-|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [propertyTypeGroupId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (24, -90, 1033, 4, N'umbracoFile', N'Upload file', NULL, 0, 0, NULL, NULL)
-|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [propertyTypeGroupId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (25, -92, 1033, 4, N'umbracoExtension', N'Type', NULL, 0, 0, NULL, NULL)
-|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [propertyTypeGroupId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (26, -92, 1033, 4, N'umbracoBytes', N'Size', NULL, 0, 0, NULL, NULL)
-|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [propertyTypeGroupId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (27, -38, 1031, 5, N'contents', N'Contents:', NULL, 0, 0, NULL, NULL)
+|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (6, -90, 1032, 3, N'umbracoFile', N'Upload image', NULL, 0, 0, NULL, NULL)
+|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (7, -92, 1032, 3, N'umbracoWidth', N'Width', NULL, 0, 0, NULL, NULL)
+|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (8, -92, 1032, 3, N'umbracoHeight', N'Height', NULL, 0, 0, NULL, NULL)
+|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (9, -92, 1032, 3, N'umbracoBytes', N'Size', NULL, 0, 0, NULL, NULL)
+|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (10, -92, 1032, 3, N'umbracoExtension', N'Type', NULL, 0, 0, NULL, NULL)
+|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (24, -90, 1033, 4, N'umbracoFile', N'Upload file', NULL, 0, 0, NULL, NULL)
+|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (25, -92, 1033, 4, N'umbracoExtension', N'Type', NULL, 0, 0, NULL, NULL)
+|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (26, -92, 1033, 4, N'umbracoBytes', N'Size', NULL, 0, 0, NULL, NULL)
+|INSERT INTO [cmsPropertyType] ([id], [dataTypeId], [contentTypeId], [tabId], [Alias], [Name], [helpText], [sortOrder], [mandatory], [validationRegExp], [Description]) VALUES (27, -38, 1031, 5, N'contents', N'Contents:', NULL, 0, 0, NULL, NULL)
|SET IDENTITY_INSERT [cmsPropertyType] OFF
;
!!!SET IDENTITY_INSERT [umbracoLanguage] ON
@@ -796,6 +791,8 @@ INSERT INTO [cmsContentTypeAllowedContentType] ([Id], [AllowedId]) VALUES (1031,
;
ALTER TABLE [cmsTemplate] ADD CONSTRAINT [FK_cmsTemplate_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
;
+ALTER TABLE [cmsPropertyType] ADD CONSTRAINT [FK_cmsPropertyType_cmsTab] FOREIGN KEY ([tabId]) REFERENCES [cmsTab] ([id])
+;
ALTER TABLE [cmsContent] ADD CONSTRAINT [FK_cmsContent_umbracoNode] FOREIGN KEY ([nodeId]) REFERENCES [umbracoNode] ([id])
;
ALTER TABLE [cmsMacroProperty] ADD CONSTRAINT [FK_umbracoMacroProperty_umbracoMacroPropertyType] FOREIGN KEY ([macroPropertyType]) REFERENCES [cmsMacroPropertyType] ([id])
@@ -928,6 +925,10 @@ INSERT INTO umbracoAppTree (treeSilent, treeInitialize, treeSortOrder, appAlias,
VALUES (0, 1, 2, 'translation','yourTasks', 'Tasks created by you', '.sprTreeFolder', '.sprTreeFolder_o', 'umbraco', 'loadYourTasks');
;
*/
+alter TABLE [cmsContentType]
+add [masterContentType] int NULL CONSTRAINT
+[DF_cmsContentType_masterContentType] DEFAULT (0)
+;
CREATE TABLE [cmsTagRelationship](
[nodeId] [int] NOT NULL,
[tagId] [int] NOT NULL)
@@ -961,10 +962,11 @@ CREATE TABLE [cmsPreviewXml](
[versionId] [uniqueidentifier] NOT NULL,
[timestamp] [datetime] NOT NULL,
[xml] [ntext] NOT NULL)
-
;
+
+
/***********************************************************************************************************************
ADD NEW PRIMARY KEYS, FOREIGN KEYS AND INDEXES FOR VERSION 4.1
@@ -989,7 +991,7 @@ ALTER TABLE [umbracoUserType] ALTER COLUMN id IDENTITY(5,1)
;
ALTER TABLE [cmsMacroPropertyType] ALTER COLUMN id IDENTITY(26,1)
;
-ALTER TABLE [cmsPropertyTypeGroup] ALTER COLUMN id IDENTITY(6,1)
+ALTER TABLE [cmsTab] ALTER COLUMN id IDENTITY(6,1)
;
ALTER TABLE [cmsPropertyType] ALTER COLUMN id IDENTITY(28,1)
;
diff --git a/src/SQLCE4Umbraco/Sql/Version4_8_Upgrade.sql b/src/SQLCE4Umbraco/Sql/Version4_8_Upgrade.sql
deleted file mode 100644
index 3295f407ae..0000000000
--- a/src/SQLCE4Umbraco/Sql/Version4_8_Upgrade.sql
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************************
-
- Umbraco database installation script for SQL Server (upgrade from Umbraco 4.0.x)
-
- IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
-
- Database version: 4.10.0.0
-
- Please increment this version number if ANY change is made to this script,
- so compatibility with scripts for other database systems can be verified easily.
- The first 3 digits depict the Umbraco version, the last digit is the database version.
- (e.g. version 4.0.0.3 means "Umbraco version 4.0.0, database version 3")
-
- Check-in policy: only commit this script if
- * you ran the Umbraco installer completely;
- * you ran it on the targetted database system;
- * you ran the Runway and Module installations;
- * you were able to browse the Boost site;
- * you were able to open the Umbraco administration panel;
- * you have documented the code change in this script;
- * you have incremented the version number in this script.
-
- IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
-
-********************************************************************************************/
--- rename cmsTab
-SP_RENAME 'cmsTab', 'cmsPropertyTypeGroup'
-;
--- add parent Group to new cmsPropertyTypeGroup
-ALTER TABLE [cmsPropertyTypeGroup]
-ADD [parentGroupId] int NULL
-CONSTRAINT [DF_cmsPropertyTypeGroup_parentGroupId] DEFAULT NULL
-;
-ALTER TABLE [cmsPropertyTypeGroup]
-ADD CONSTRAINT [FK_cmsPropertyTypeGroup_cmsPropertyTypeGroup] FOREIGN KEY([parentGroupId])
-REFERENCES [cmsPropertyTypeGroup] ([id])
-;
--- add sortOrder to cmsContentTypeAllowedContentType
-ALTER TABLE [cmsContentTypeAllowedContentType]
-ADD [sortOrder] int NOT NULL
-CONSTRAINT [DF_cmsContentTypeAllowedContentType_sortOrder] DEFAULT 1
-;
--- add container and allowAtRoot to cmsContentType
-ALTER TABLE [cmsContentType]
-ADD [isContainer] bit NOT NULL
-CONSTRAINT [DF_cmsContentType_isContainer] DEFAULT 0
-;
-ALTER TABLE [cmsContentType]
-ADD [allowAtRoot] bit NOT NULL
-CONSTRAINT [DF_cmsContentType_allowAtRoot] DEFAULT 0
-;
-CREATE TABLE [cmsContentType2ContentType] ([parentContentTypeId] int NOT NULL,[childContentTypeId] int NOT NULL)
-;
-ALTER TABLE [cmsContentType2ContentType] ADD CONSTRAINT [cmsContentType2ContentType_PK] PRIMARY KEY ([parentContentTypeId],[childContentTypeId])
-;
--- move all masterContentType information to new cmsContentType2ContentType table
-INSERT INTO [cmsContentType2ContentType] (parentContentTypeId, childContentTypeId)
-select masterContentType, nodeId from [cmsContentType] WHERE not [masterContentType] is null and [masterContentType] != 0
-;
-ALTER TABLE [cmsContentType] DROP COLUMN [masterContentType]
-;
--- rename tab to propertyGroup on propertyType
-ALTER TABLE [cmsPropertyType] ADD [propertyTypeGroupId] int
-;
-UPDATE [cmsPropertyType] SET [propertyTypeGroupId] = [tabId]
-;
-ALTER TABLE [cmsPropertyType] DROP CONSTRAINT [FK_cmsPropertyType_cmsTab]
-;
-ALTER TABLE [cmsPropertyType] DROP COLUMN [tabId]
-;
diff --git a/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj b/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj
index 442f9497c3..58e0f3fff4 100644
--- a/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj
+++ b/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj
@@ -73,7 +73,6 @@
-
diff --git a/src/SQLCE4Umbraco/SqlCEInstaller.cs b/src/SQLCE4Umbraco/SqlCEInstaller.cs
index 24184578cd..0d60c20288 100644
--- a/src/SQLCE4Umbraco/SqlCEInstaller.cs
+++ b/src/SQLCE4Umbraco/SqlCEInstaller.cs
@@ -22,14 +22,11 @@ namespace SqlCE4Umbraco
#region Private Constants
/// The latest database version this installer supports.
- private const DatabaseVersion LatestVersionSupported = DatabaseVersion.Version4_9;
+ private const DatabaseVersion LatestVersionSupported = DatabaseVersion.Version4_8;
/// The specifications to determine the database version.
private static readonly VersionSpecs[] m_VersionSpecs = new VersionSpecs[] {
- new VersionSpecs("SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'cmsContentType2ContentType'", 1, DatabaseVersion.Version4_9),
- //This will throw an exception and will only ever have one row if it is installed, on exception the database version returned is unkown so will still work.
- //NOTE: before this was set to zero and only worked by fluke!
- new VersionSpecs("SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS LEFT OUTER JOIN umbracoApp ON appAlias = appAlias WHERE CONSTRAINT_NAME = 'FK_umbracoUser2app_umbracoApp'", 1, DatabaseVersion.Version4_8),
+ new VersionSpecs("SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS LEFT OUTER JOIN umbracoApp ON appAlias = appAlias WHERE CONSTRAINT_NAME = 'FK_umbracoUser2app_umbracoApp'", 0, DatabaseVersion.Version4_8),
new VersionSpecs("SELECT id FROM umbracoNode WHERE id = -21", 1, DatabaseVersion.Version4_1),
new VersionSpecs("SELECT action FROM umbracoAppTree",DatabaseVersion.Version4),
new VersionSpecs("SELECT description FROM cmsContentType",DatabaseVersion.Version3),
diff --git a/src/SQLCE4Umbraco/SqlCEResources.resx b/src/SQLCE4Umbraco/SqlCEResources.resx
index 479fca991b..cb62be9b84 100644
--- a/src/SQLCE4Umbraco/SqlCEResources.resx
+++ b/src/SQLCE4Umbraco/SqlCEResources.resx
@@ -124,7 +124,4 @@
sql\version4_1_upgrade.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8
-
- sql\version4_8_upgrade.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8
-
\ No newline at end of file
diff --git a/src/SQLCE4Umbraco/SqlCEResources1.Designer.cs b/src/SQLCE4Umbraco/SqlCEResources1.Designer.cs
index 5fa612bc71..7c443f7c2b 100644
--- a/src/SQLCE4Umbraco/SqlCEResources1.Designer.cs
+++ b/src/SQLCE4Umbraco/SqlCEResources1.Designer.cs
@@ -103,24 +103,5 @@ namespace SQLCE4Umbraco {
return ResourceManager.GetString("Version4_1_Upgrade", resourceCulture);
}
}
-
- ///
- /// Looks up a localized string similar to /*******************************************************************************************
- ///
- /// Umbraco database installation script for SQL Server (upgrade from Umbraco 4.0.x)
- ///
- /// IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
- ///
- /// Database version: 4.8.0.0
- ///
- /// Please increment this version number if ANY change is made to this script,
- /// so compatibility with scripts for other database systems can be verified easily.
- /// The first 3 digits depict [rest of string was truncated]";.
- ///
- internal static string Version4_8_Upgrade {
- get {
- return ResourceManager.GetString("Version4_8_Upgrade", resourceCulture);
- }
- }
}
}
diff --git a/src/Umbraco.Web.UI/umbraco/controls/ContentTypeControlNew.ascx b/src/Umbraco.Web.UI/umbraco/controls/ContentTypeControlNew.ascx
index 6ace3a8cd4..e6119df965 100644
--- a/src/Umbraco.Web.UI/umbraco/controls/ContentTypeControlNew.ascx
+++ b/src/Umbraco.Web.UI/umbraco/controls/ContentTypeControlNew.ascx
@@ -1,5 +1,5 @@
-<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="ContentTypeControlNew.ascx.cs"
- Inherits="umbraco.controls.ContentTypeControlNew" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
+<%@ Control Language="c#" AutoEventWireup="True" Codebehind="ContentTypeControlNew.ascx.cs"
+ Inherits="umbraco.controls.ContentTypeControlNew" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="cc2" Namespace="umbraco.uicontrols" Assembly="controls" %>
@@ -9,107 +9,92 @@
-
-
Master Content Type enabled
- This Content Type uses
- as Master Content Type(s). Tabs from Master Content Types are not shown and can only be edited on the Master Content Type itself
Master Content Type enabled This Content Type uses as a Master Content Type. Tabs from Master Content Types are not shown and can only be edited on the Master Content Type itself
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A Container Content Type hides it's children in the tree, and instead injects a list based overview of children to the editing pane
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- Only Content Types with this checked can be created at the root level of Content and Media trees
-
-
-
-
-
-
+
+
+
+
+
+
-
-
Master Content Type enabled
- This Content Type uses
- as a Master Content Type. Properties from Master Content Types are not shown and can only be edited on the Master Content Type itself
-
-
-
-
+
+
Master Content Type enabled This Content Type uses as a Master Content Type. Properties from Master Content Types are not shown and can only be edited on the Master Content Type itself
+
+
+
+
-
+
+
\ No newline at end of file
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs
index 66cdc47845..f343f4adbe 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs
@@ -241,7 +241,7 @@ function openContent(id) {
}
protected void SetSourcesAttributes(ref XmlTreeNode treeElement, Document dd)
{
- treeElement.HasChildren = !dd.ContentType.IsContainerContentType && dd.HasChildren;
+ treeElement.HasChildren = dd.HasChildren;
if (!IsDialog)
treeElement.Source = GetTreeServiceUrl(dd.Id);
else
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadNodeTypes.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadNodeTypes.cs
index 0041bf4c29..3937f8642a 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadNodeTypes.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadNodeTypes.cs
@@ -78,7 +78,7 @@ function openNodeType(id) {
if (base.m_id == -1)
docTypes = DocumentType.GetAllAsList().FindAll(delegate(DocumentType dt) { return dt.MasterContentType == 0; });
else
- docTypes = DocumentType.GetAllAsList().FindAll(delegate(DocumentType dt) { return dt.MasterContentTypes.Contains(base.m_id); });
+ docTypes = DocumentType.GetAllAsList().FindAll(delegate(DocumentType dt) { return dt.MasterContentType == base.m_id; });
foreach (DocumentType dt in docTypes)
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs
index ab54690965..ccc43040aa 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs
@@ -29,7 +29,6 @@ namespace umbraco.controls
///
public class ContentControl : TabView
{
- private bool _hasContainer = false;
private Content _content;
private ArrayList _dataFields = new ArrayList();
private UmbracoEnsuredPage prntpage;
@@ -94,14 +93,6 @@ namespace umbraco.controls
if (virtualTabs == null)
virtualTabs = _content.ContentType.getVirtualTabs.ToList();
- // Check for container
- if (_content.ContentType.IsContainerContentType)
- {
- _hasContainer = true;
- TabPage tp = NewTabPage("Children");
- addSaveAndPublishButtons(ref tp);
- }
-
foreach (ContentType.TabI t in virtualTabs)
{
TabPage tp = NewTabPage(t.Caption);
@@ -128,7 +119,7 @@ namespace umbraco.controls
foreach (ContentType.TabI tab in virtualTabs)
{
- var tabPage = _hasContainer ? this.Panels[i+1] as TabPage : this.Panels[i] as TabPage;
+ var tabPage = this.Panels[i] as TabPage;
if (tabPage == null)
{
throw new ArgumentException("Unable to load tab \"" + tab.Caption + "\"");
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx
index 6ace3a8cd4..e6119df965 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx
@@ -1,5 +1,5 @@
-<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="ContentTypeControlNew.ascx.cs"
- Inherits="umbraco.controls.ContentTypeControlNew" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
+<%@ Control Language="c#" AutoEventWireup="True" Codebehind="ContentTypeControlNew.ascx.cs"
+ Inherits="umbraco.controls.ContentTypeControlNew" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="cc2" Namespace="umbraco.uicontrols" Assembly="controls" %>
@@ -9,107 +9,92 @@
-
-
Master Content Type enabled
- This Content Type uses
- as Master Content Type(s). Tabs from Master Content Types are not shown and can only be edited on the Master Content Type itself
Master Content Type enabled This Content Type uses as a Master Content Type. Tabs from Master Content Types are not shown and can only be edited on the Master Content Type itself
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A Container Content Type hides it's children in the tree, and instead injects a list based overview of children to the editing pane
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- Only Content Types with this checked can be created at the root level of Content and Media trees
-
-
-
-
-
-
+
+
+
+
+
+
-
-
Master Content Type enabled
- This Content Type uses
- as a Master Content Type. Properties from Master Content Types are not shown and can only be edited on the Master Content Type itself
-
-
-
-
+
+
Master Content Type enabled This Content Type uses as a Master Content Type. Properties from Master Content Types are not shown and can only be edited on the Master Content Type itself
+
+
+
+
-
+
+
\ No newline at end of file
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs
index 3c5bd64e01..123ef70263 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs
@@ -66,10 +66,6 @@ namespace umbraco.controls
if (!HideStructure)
{
setupStructurePane();
- } else
- {
- // When we hide the structure, we'll also hide the container option (as we're on a member type)
- pp_container.Visible = false;
}
setupGenericPropertiesPane();
setupTabPane();
@@ -93,23 +89,11 @@ namespace umbraco.controls
pp_icon.Text = umbraco.ui.Text("icon", umbraco.BasePages.UmbracoEnsuredPage.CurrentUser);
pp_thumbnail.Text = umbraco.ui.Text("editcontenttype", "thumbnail");
- // we'll disable this...
- if (!Page.IsPostBack && cType.MasterContentTypes.Count > 0)
- {
- string masterName = String.Empty;
- for(int i=0; i{1}",
- cType.MasterContentTypes[i],
- cms.businesslogic.ContentType.GetContentType(cType.MasterContentTypes[i]).Text);
- if (i == cType.MasterContentTypes.Count-2)
- masterName += " and ";
- else if (cType.MasterContentTypes.Count > 1 && i < cType.MasterContentTypes.Count-1)
- {
- masterName += ", ";
- }
- }
+ // we'll disable this...
+ if (!Page.IsPostBack && cType.MasterContentType != 0)
+ {
+ string masterName = cms.businesslogic.ContentType.GetContentType(cType.MasterContentType).Text;
tabsMasterContentTypeName.Text = masterName;
propertiesMasterContentTypeName.Text = masterName;
PaneTabsInherited.Visible = true;
@@ -134,7 +118,6 @@ namespace umbraco.controls
cType.IconUrl = ddlIcons.SelectedValue;
cType.Description = description.Text;
cType.Thumbnail = ddlThumbnails.SelectedValue;
- cType.IsContainerContentType = isContainer.Checked;
SaveClickEventArgs ea = new SaveClickEventArgs("Saved");
ea.IconType = umbraco.BasePages.BasePage.speechBubbleIcon.success;
@@ -252,7 +235,6 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
txtName.Text = cType.GetRawText();
txtAlias.Text = cType.Alias;
description.Text = cType.GetRawDescription();
- isContainer.Checked = cType.IsContainerContentType;
}
#endregion
@@ -292,8 +274,6 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
}
dualAllowedContentTypes.Value = chosenContentTypeIDs;
}
-
- allowAtRoot.Checked = cType.AllowAtRoot;
}
private void SaveAllowedChildTypes()
@@ -307,7 +287,6 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
int[] ids = new int[tmp.Count];
for (int i = 0; i < tmp.Count; i++) ids[i] = (int)tmp[i];
cType.AllowedChildContentTypeIDs = ids;
- cType.AllowAtRoot = allowAtRoot.Checked;
}
#endregion
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.designer.cs
index 91480b9dcf..bc732a166a 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.designer.cs
@@ -183,24 +183,6 @@ namespace umbraco.controls {
///
protected global::System.Web.UI.WebControls.TextBox txtAlias;
- ///
- /// pp_container control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel pp_container;
-
- ///
- /// isContainer control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.CheckBox isContainer;
-
///
/// pp_icon control.
///
@@ -273,24 +255,6 @@ namespace umbraco.controls {
///
protected global::umbraco.uicontrols.Pane Pane5;
- ///
- /// pp_Root control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel pp_Root;
-
- ///
- /// allowAtRoot control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.CheckBox allowAtRoot;
-
///
/// pp_allowedChildren control.
///
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/content.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/content.ascx.cs
index 68427d341d..e39bef550f 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/content.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/content.ascx.cs
@@ -4,7 +4,7 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using umbraco.cms.businesslogic.web;
using umbraco.presentation.create;
-using Content = umbraco.cms.businesslogic.Content;
+using Content=umbraco.cms.businesslogic.Content;
using umbraco.cms.helpers;
using umbraco.BasePages;
using umbraco.IO;
@@ -37,7 +37,6 @@ namespace umbraco.cms.presentation.create.controls
StringBuilder js = new StringBuilder();
foreach (DocumentType dt in DocumentType.GetAllAsList())
{
- // if we're at root, we'll only allow root types
string docDescription = "No description available...";
if (dt.Description != null && dt.Description != "")
docDescription = dt.Description;
@@ -45,7 +44,7 @@ namespace umbraco.cms.presentation.create.controls
docDescription = docDescription.Replace("'", "\\'");
string docImage = (dt.Thumbnail != "") ? dt.Thumbnail : "../nada.gif";
- docImage = IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/images/thumbnails/" + docImage;
+ docImage = IOHelper.ResolveUrl( SystemDirectories.Umbraco ) + "/images/thumbnails/" + docImage;
ListItem li = new ListItem();
li.Text = dt.Text;
@@ -54,30 +53,29 @@ namespace umbraco.cms.presentation.create.controls
if (NodeId > 0)
{
foreach (int i in allowedIds) if (i == dt.Id)
+ {
+ nodeType.Items.Add(li);
+ js.Append("typeInfo[" + counter + "] = '