diff --git a/Gruntfile.js b/Gruntfile.js index 4c1340c..2f8b117 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,8 +18,7 @@ module.exports = function(grunt) { "app/views/archetype.config.fieldset.dialog_versioned.html": "app/views/archetype.config.fieldset.dialog.html", "app/views/archetype.config_versioned.html": "app/views/archetype.config.html", "app/views/archetype_versioned.html": "app/views/archetype.html", - "app/views/archetype.default_versioned.html": "app/views/archetype.default.html", - + "app/views/archetype.default_versioned.html": "app/views/archetype.default.html" }, options: { replacements: [{ @@ -126,7 +125,7 @@ module.exports = function(grunt) { expand: true }, dll: { - cwd: 'app/Umbraco/Umbraco.Archetype/bin/Debug/', + cwd: 'app/Umbraco/Umbraco.Archetype/bin/Release/', src: 'Archetype.dll', dest: '<%= dest %>/bin/', expand: true @@ -152,7 +151,13 @@ module.exports = function(grunt) { { cwd: '<%= dest %>/bin', src: ['*.dll'], - dest: 'tmp/nuget/lib/net40', + dest: 'tmp/nuget_binaries/lib/net40', + expand: true + }, + { + cwd: 'app/Umbraco/Archetype.Courier/bin/Release/', + src: ['Archetype.Courier.dll'], + dest: 'tmp/nuget_courier/lib/net40', expand: true } ] @@ -169,6 +174,14 @@ module.exports = function(grunt) { dist: { src: 'tmp/nuget/package.nuspec', dest: 'pkg' + }, + dist_binaries: { + src: 'tmp/nuget_binaries/package_binaries.nuspec', + dest: 'pkg' + }, + dist_courier: { + src: 'tmp/nuget_courier/package_courier.nuspec', + dest: 'pkg' } }, @@ -182,29 +195,61 @@ module.exports = function(grunt) { license: '<%= pkgMeta.license %>', licenseUrl: '<%= pkgMeta.licenseUrl %>', author: '<%= pkgMeta.author %>', - authorUrl: '<%= pkgMeta.authorUrl %>', - files: [{ path: 'tmp/nuget/**', target: 'content/App_Plugins/Archetype'}] + authorUrl: '<%= pkgMeta.authorUrl %>' } }, 'files': { 'tmp/nuget/package.nuspec': ['config/package.nuspec'] } + }, + 'nuspec_binaries': { + 'options': { + 'data': { + name: '<%= pkgMeta.name %>.Binaries', + version: '<%= pkgMeta.version %>', + url: '<%= pkgMeta.url %>', + license: '<%= pkgMeta.license %>', + licenseUrl: '<%= pkgMeta.licenseUrl %>', + author: '<%= pkgMeta.author %>', + authorUrl: '<%= pkgMeta.authorUrl %>' + } + }, + 'files': { + 'tmp/nuget_binaries/package_binaries.nuspec': ['config/package_binaries.nuspec'] + } + }, + 'nuspec_courier': { + 'options': { + 'data': { + name: '<%= pkgMeta.name %>.Courier', + version: '<%= pkgMeta.version %>', + url: '<%= pkgMeta.url %>', + license: '<%= pkgMeta.license %>', + licenseUrl: '<%= pkgMeta.licenseUrl %>', + author: '<%= pkgMeta.author %>', + authorUrl: '<%= pkgMeta.authorUrl %>' + } + }, + 'files': { + 'tmp/nuget_courier/package_courier.nuspec': ['config/package_courier.nuspec'] + } } }, umbracoPackage: { - options: { - name: "<%= pkgMeta.name %>", - version: '<%= pkgMeta.version %>', - url: '<%= pkgMeta.url %>', - license: '<%= pkgMeta.license %>', - licenseUrl: '<%= pkgMeta.licenseUrl %>', - author: '<%= pkgMeta.author %>', - authorUrl: '<%= pkgMeta.authorUrl %>', - manifest: 'config/package.xml', - readme: 'config/readme.txt', - sourceDir: 'tmp/umbraco', - outputDir: 'pkg', + dist: { + src: 'tmp/umbraco', + dest: 'pkg', + options: { + name: "<%= pkgMeta.name %>", + version: '<%= pkgMeta.version %>', + url: '<%= pkgMeta.url %>', + license: '<%= pkgMeta.license %>', + licenseUrl: '<%= pkgMeta.licenseUrl %>', + author: '<%= pkgMeta.author %>', + authorUrl: '<%= pkgMeta.authorUrl %>', + readme: '<%= grunt.file.read("config/readme.txt") %>' + } } }, @@ -248,15 +293,6 @@ module.exports = function(grunt) { src: ['<%= grunt.option("target") %>\\Web.config'] } }, - - jshint: { - options: { - jshintrc: '.jshintrc' - }, - src: { - src: ['app/**/*.js', 'lib/**/*.js'] - } - }, msbuild: { options: { @@ -272,7 +308,7 @@ module.exports = function(grunt) { dist: { src: ['app/Umbraco/Umbraco.Archetype/Archetype.Umbraco.csproj','app/Umbraco/Archetype.Courier/Archetype.Courier.csproj'], options: { - projectConfiguration: 'Debug', + projectConfiguration: 'Release', targets: ['Clean', 'Rebuild'], } } @@ -280,8 +316,7 @@ module.exports = function(grunt) { }); grunt.registerTask('default', ['clean', 'string-replace', 'less', 'concat', 'assemblyinfo', 'msbuild:dist', 'copy:dll', 'copy:assets', 'copy:html', 'copy:config', 'clean:html', 'clean:js', 'clean:less']); - - grunt.registerTask('nuget', ['clean:tmp', 'default', 'copy:nuget', 'template:nuspec', 'nugetpack', 'clean:tmp']); - grunt.registerTask('umbraco', ['clean:tmp', 'default', 'copy:umbraco', 'umbracoPackage', 'clean:tmp']); - grunt.registerTask('package', ['clean:tmp', 'default', 'copy:nuget', 'template:nuspec', 'nugetpack', 'copy:umbraco', 'umbracoPackage', 'clean:tmp']); + grunt.registerTask('nuget', ['copy:nuget', 'template:nuspec', 'template:nuspec_binaries', 'template:nuspec_courier', 'nugetpack']); + grunt.registerTask('umbraco', ['copy:umbraco', 'umbracoPackage']); + grunt.registerTask('package', ['clean:tmp', 'default', 'nuget', 'copy:umbraco', 'umbracoPackage', 'clean:tmp']); }; \ No newline at end of file diff --git a/app/Umbraco/DatabaseSizer/Application.cs b/app/Umbraco/DatabaseSizer/Application.cs deleted file mode 100644 index 5261a0f..0000000 --- a/app/Umbraco/DatabaseSizer/Application.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using Umbraco.Core; -using Umbraco.Core.Logging; - -namespace DatabaseSizer -{ - /// - /// A now obsolete project that handled an Umbraco core limitation. - /// - [Obsolete("This project is now obsolete with 7.2.2+")] - public class Application : ApplicationEventHandler - { - protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) - { - base.ApplicationStarted(umbracoApplication, applicationContext); - - ExpandPrevalueValueColumnSize(); - } - - protected void ExpandPrevalueValueColumnSize() - { - try - { - var dbContext = ApplicationContext.Current.DatabaseContext; - var colCount = - dbContext.Database.ExecuteScalar( - "SELECT COUNT(1) FROM INFORMATION_SCHEMA.COLUMNS WHERE DATA_TYPE = 'nvarchar' AND COLUMN_NAME = 'value' AND CHARACTER_MAXIMUM_LENGTH = 2500 AND TABLE_NAME = 'cmsDataTypePreValues'"); - - // Check column - if (colCount != 0) - { - using (var trans = dbContext.Database.GetTransaction()) - { - // Change column - dbContext.Database.Execute("ALTER TABLE [cmsDataTypePreValues] ALTER COLUMN [value] ntext NULL;"); - - trans.Complete(); - } - - LogHelper.Debug(typeof(Application), "Successfully expanded Prevalue table Value column"); - } - else - { - LogHelper.Debug(typeof(Application), "Prevalue table Value column is already expanded"); - } - } - catch (Exception ex) - { - LogHelper.Error(typeof(Application), "Error expanding Prevalue table Value column", ex); - } - } - } -} \ No newline at end of file diff --git a/app/Umbraco/DatabaseSizer/DatabaseSizer.csproj b/app/Umbraco/DatabaseSizer/DatabaseSizer.csproj deleted file mode 100644 index 7337c4d..0000000 --- a/app/Umbraco/DatabaseSizer/DatabaseSizer.csproj +++ /dev/null @@ -1,250 +0,0 @@ - - - - - Debug - AnyCPU - {0114C963-C514-49C1-B7AB-DCB1825F498C} - Library - Properties - DatabaseSizer - DatabaseSizer - v4.5 - 512 - ..\ - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.dll - False - - - ..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.Net4.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\businesslogic.dll - False - - - ..\packages\ClientDependency.1.7.1.2\lib\ClientDependency.Core.dll - False - - - ..\packages\ClientDependency-Mvc.1.7.0.4\lib\ClientDependency.Core.Mvc.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\cms.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\controls.dll - False - - - ..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\Examine.dll - False - - - ..\packages\HtmlAgilityPack.1.4.6\lib\Net45\HtmlAgilityPack.dll - False - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - False - - - ..\packages\ImageProcessor.1.9.0.0\lib\ImageProcessor.dll - False - - - ..\packages\ImageProcessor.Web.3.2.3.0\lib\net45\ImageProcessor.Web.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\interfaces.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\log4net.dll - False - - - ..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\Microsoft.ApplicationBlocks.Data.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\Microsoft.Web.Helpers.dll - False - - - False - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\Microsoft.AspNet.Mvc.FixedDisplayModes.1.0.0\lib\net40\Microsoft.Web.Mvc.FixedDisplayModes.dll - False - - - ..\packages\MiniProfiler.2.1.0\lib\net40\MiniProfiler.dll - False - - - ..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll - False - - - ..\packages\Newtonsoft.Json.6.0.2\lib\net45\Newtonsoft.Json.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\SQLCE4Umbraco.dll - False - - - - - False - ..\packages\UmbracoCms.Core.7.1.2\lib\System.Data.SqlServerCe.dll - - - False - ..\packages\UmbracoCms.Core.7.1.2\lib\System.Data.SqlServerCe.Entity.dll - - - ..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll - False - - - - False - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll - - - ..\packages\Microsoft.AspNet.WebApi.Core.4.0.20710.0\lib\net40\System.Web.Http.dll - False - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.4.0.20710.0\lib\net40\System.Web.Http.WebHost.dll - False - - - False - ..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll - - - False - ..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll - - - False - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll - - - False - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll - - - False - ..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll - - - - - - - - ..\packages\UmbracoCms.Core.7.1.2\lib\TidyNet.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\Umbraco.Core.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.DataLayer.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.editorControls.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.MacroEngines.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.providers.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\Umbraco.Web.UI.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\umbraco.XmlSerializers.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\UmbracoExamine.dll - False - - - ..\packages\UmbracoCms.Core.7.1.2\lib\UrlRewritingNet.UrlRewriter.dll - False - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/app/Umbraco/DatabaseSizer/Properties/AssemblyInfo.cs b/app/Umbraco/DatabaseSizer/Properties/AssemblyInfo.cs deleted file mode 100644 index 46a4e6f..0000000 --- a/app/Umbraco/DatabaseSizer/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("DatabaseSizer.cs")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("DatabaseSizer.cs")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("28dc35d2-3dfb-40b4-9093-bc47c91127ea")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/app/Umbraco/DatabaseSizer/app.config b/app/Umbraco/DatabaseSizer/app.config deleted file mode 100644 index ccb9166..0000000 --- a/app/Umbraco/DatabaseSizer/app.config +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/Umbraco/DatabaseSizer/packages.config b/app/Umbraco/DatabaseSizer/packages.config deleted file mode 100644 index 3fc6851..0000000 --- a/app/Umbraco/DatabaseSizer/packages.config +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/Umbraco/Umbraco.Archetype.sln b/app/Umbraco/Umbraco.Archetype.sln index 342d893..000b32d 100644 --- a/app/Umbraco/Umbraco.Archetype.sln +++ b/app/Umbraco/Umbraco.Archetype.sln @@ -1,6 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Archetype.Umbraco", "Umbraco.Archetype\Archetype.Umbraco.csproj", "{7D185D41-4228-4978-ACB8-83F9A48AD94F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D84AA4ED-85A6-484F-9E72-BE7AC9835821}" @@ -12,8 +14,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D84AA4 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Archetype.Tests", "Archetype.Tests\Archetype.Tests.csproj", "{21F3E6CF-B76F-4059-9474-1AF1CE63CD6B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DatabaseSizer", "DatabaseSizer\DatabaseSizer.csproj", "{0114C963-C514-49C1-B7AB-DCB1825F498C}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Archetype.Courier", "Archetype.Courier\Archetype.Courier.csproj", "{FE8BE437-8B11-4E49-9B02-F45994E6D723}" EndProject Global @@ -30,10 +30,6 @@ Global {21F3E6CF-B76F-4059-9474-1AF1CE63CD6B}.Debug|Any CPU.Build.0 = Debug|Any CPU {21F3E6CF-B76F-4059-9474-1AF1CE63CD6B}.Release|Any CPU.ActiveCfg = Release|Any CPU {21F3E6CF-B76F-4059-9474-1AF1CE63CD6B}.Release|Any CPU.Build.0 = Release|Any CPU - {0114C963-C514-49C1-B7AB-DCB1825F498C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0114C963-C514-49C1-B7AB-DCB1825F498C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0114C963-C514-49C1-B7AB-DCB1825F498C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0114C963-C514-49C1-B7AB-DCB1825F498C}.Release|Any CPU.Build.0 = Release|Any CPU {FE8BE437-8B11-4E49-9B02-F45994E6D723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FE8BE437-8B11-4E49-9B02-F45994E6D723}.Debug|Any CPU.Build.0 = Debug|Any CPU {FE8BE437-8B11-4E49-9B02-F45994E6D723}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/app/Umbraco/Umbraco.Archetype/Models/ArchetypeModel.cs b/app/Umbraco/Umbraco.Archetype/Models/ArchetypeModel.cs index cf37c92..11a13a1 100644 --- a/app/Umbraco/Umbraco.Archetype/Models/ArchetypeModel.cs +++ b/app/Umbraco/Umbraco.Archetype/Models/ArchetypeModel.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Logging; namespace Archetype.Models { @@ -48,22 +47,6 @@ namespace Archetype.Models /// public string SerializeForPersistence() { - //clean out any properties with a null datatype - foreach (var fieldset in Fieldsets) - { - var properties = fieldset.Properties.ToList(); - - foreach (var property in fieldset.Properties) - { - if (property.DataTypeGuid == null) - { - properties.Remove(property); - } - } - - fieldset.Properties = properties; - } - var json = JObject.Parse(JsonConvert.SerializeObject(this, new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore })); var propertiesToRemove = new String[] { "propertyEditorAlias", "dataTypeId", "dataTypeGuid", "hostContentType", "editorState" }; diff --git a/app/Umbraco/Umbraco.Archetype/Properties/VersionInfo.cs b/app/Umbraco/Umbraco.Archetype/Properties/VersionInfo.cs index 08dbf8f..d1253d4 100644 --- a/app/Umbraco/Umbraco.Archetype/Properties/VersionInfo.cs +++ b/app/Umbraco/Umbraco.Archetype/Properties/VersionInfo.cs @@ -1,4 +1,4 @@ using System.Reflection; -[assembly: AssemblyVersion("1.12.0")] -[assembly: AssemblyFileVersion("1.12.0")] +[assembly: AssemblyVersion("1.12.2")] +[assembly: AssemblyFileVersion("1.12.2")] diff --git a/app/controllers/controller.js b/app/controllers/controller.js index 264ea27..d8d9270 100644 --- a/app/controllers/controller.js +++ b/app/controllers/controller.js @@ -15,6 +15,8 @@ angular.module("umbraco").controller("Imulus.ArchetypeController", function ($sc // store the umbraco property alias to help generate unique IDs. Hopefully there's a better way to get this in the future :) $scope.umbracoHostPropertyAlias = $scope.$parent.$parent.model.alias; + + $scope.isDebuggingEnabled = Umbraco.Sys.ServerVariables.isDebuggingEnabled; $scope.overlayMenu = { show: false, diff --git a/app/directives/archetypeproperty.js b/app/directives/archetypeproperty.js index 58430f3..3a9b177 100644 --- a/app/directives/archetypeproperty.js +++ b/app/directives/archetypeproperty.js @@ -93,8 +93,8 @@ angular.module("umbraco.directives").directive('archetypeProperty', function ($c } } - //upload datatype hack - if(view.indexOf('fileupload.html') != -1) { + //upload, colorpicker datatype hack + if(view.indexOf('fileupload.html') != -1 || view.indexOf('colorpicker.html') != -1) { scope.propertyForm = scope.form; scope.model.validation = {}; scope.model.validation.mandatory = 0; diff --git a/app/views/archetype.default.html b/app/views/archetype.default.html index d952cc0..1b5f3fc 100644 --- a/app/views/archetype.default.html +++ b/app/views/archetype.default.html @@ -24,7 +24,7 @@
-