diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6e421da5d7a5..51f9b1dd6892 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,4 +1,4 @@ -_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/blob/temp8/docs/CONTRIBUTING.md) to go to the v8 branch_ +_Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco-CMS/blob/temp8/.github/V8_GETTING_STARTED.md) to go to the v8 branch_ # Contributing to Umbraco CMS 👍🎉 First off, thanks for taking the time to contribute! 🎉👍 @@ -72,7 +72,6 @@ The pull request team consists of a member of Umbraco HQ, [Sebastiaan](https://g - [Anders Bjerner](https://github.com/abjerner) - [Dave Woestenborghs](https://github.com/dawoe) - [Emma Burstow](https://github.com/emmaburstow) -- [Kyle Weems](https://github.com/cssquirrel) - [Poornima Nayar](https://github.com/poornimanayar) These wonderful volunteers will provide you with a first reply to your PR, review and test out your changes and might ask more questions. After that they'll let Umbraco HQ know if everything seems okay. diff --git a/.github/README.md b/.github/README.md index 6c3476ac7750..e84f499c72c1 100644 --- a/.github/README.md +++ b/.github/README.md @@ -30,7 +30,7 @@ As an Open Source platform, Umbraco is more than just a CMS. We are transparent ## Trying out Umbraco CMS -[Umbraco Cloud](https://umbraco.com/cloud) is the easiest and fastest way to use Umbraco yet with full support for all your custom .NET code and integrations. You're up and running in less than a minute and your life will be made easier with automated upgrades and a built-in deployment engine. We offer a free 14 day trial, no credit card needed. +[Umbraco Cloud](https://umbraco.com/cloud) is the easiest and fastest way to use Umbraco yet with full support for all your custom .NET code and integrations. You're up and running in less than a minute and your life will be made easier with automated upgrades and a built-in deployment engine. We offer a free 14-day trial, no credit card needed. If you want to DIY you can [download Umbraco](https://our.umbraco.com/download) either as a ZIP file or via NuGet. It's the same version of Umbraco CMS that powers Umbraco Cloud, but you'll need to find a place to host yourself and handling deployments and upgrades is all down to you. @@ -47,4 +47,4 @@ Umbraco is contribution focused and community driven. If you want to contribute Another way you can contribute to Umbraco is by providing issue reports. For information on how to submit an issue report refer to our [online guide for reporting issues](https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/.github/CONTRIBUTING.md). You can comment and report issues on the [github issue tracker](https://github.com/umbraco/Umbraco-CMS/issues). -Since [September 2018](https://umbraco.com/blog/a-second-take-on-umbraco-issue-tracker-hello-github-issues/) the old issue tracker is in read only mode, but can still be found at [http://issues.umbraco.org](http://issues.umbraco.org). +Since [September 2018](https://umbraco.com/blog/a-second-take-on-umbraco-issue-tracker-hello-github-issues/) the old issue tracker is in read-only mode, but can still be found at [http://issues.umbraco.org](http://issues.umbraco.org). diff --git a/build.bat b/build.bat index 29a5e07a5a68..3cab9283cfb7 100644 --- a/build.bat +++ b/build.bat @@ -9,6 +9,6 @@ IF ERRORLEVEL 1 ( :error ECHO. -ECHO Can not run build\build.ps1. +ECHO Cannot run build\build.ps1. ECHO If this is due to a SecurityError then please refer to BUILD.md for help! ECHO. diff --git a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs index e3c35e01b48b..5b38533c2b7f 100644 --- a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs +++ b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs @@ -158,9 +158,7 @@ public static IndexDefinition GetIndexDefinition(Type modelType, PropertyInfo pr Name = indexName, IndexType = attribute.IndexType, ColumnName = columnName, - TableName = tableName, - IsClustered = attribute.IndexType == IndexTypes.Clustered, - IsUnique = attribute.IndexType == IndexTypes.UniqueNonClustered + TableName = tableName, }; if (string.IsNullOrEmpty(attribute.ForColumns) == false) @@ -174,4 +172,4 @@ public static IndexDefinition GetIndexDefinition(Type modelType, PropertyInfo pr return definition; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/IndexDefinition.cs b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/IndexDefinition.cs index ec46d35780a2..963e0a8ad69e 100644 --- a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/IndexDefinition.cs +++ b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/IndexDefinition.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using Umbraco.Core.Persistence.DatabaseAnnotations; @@ -14,9 +15,13 @@ public IndexDefinition() public virtual string SchemaName { get; set; } public virtual string TableName { get; set; } public virtual string ColumnName { get; set; } + + [Obsolete("Use the IndexType property instead and set it to IndexTypes.UniqueNonClustered")] public virtual bool IsUnique { get; set; } + + [Obsolete("Use the IndexType property instead and set it to IndexTypes.Clustered")] public bool IsClustered { get; set; } public virtual ICollection Columns { get; set; } public IndexTypes IndexType { get; set; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Persistence/Migrations/Syntax/Alter/Column/AlterColumnBuilder.cs b/src/Umbraco.Core/Persistence/Migrations/Syntax/Alter/Column/AlterColumnBuilder.cs index a7077f2d35ca..b2b2dfd17f38 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Syntax/Alter/Column/AlterColumnBuilder.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Syntax/Alter/Column/AlterColumnBuilder.cs @@ -1,4 +1,5 @@ using System.Data; +using Umbraco.Core.Persistence.DatabaseAnnotations; using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.Migrations.Syntax.Alter.Expressions; using Umbraco.Core.Persistence.Migrations.Syntax.Expressions; @@ -139,10 +140,12 @@ public IAlterColumnOptionSyntax Unique(string indexName) { Name = indexName, SchemaName = Expression.SchemaName, - TableName = Expression.TableName, - IsUnique = true + TableName = Expression.TableName, + IndexType = IndexTypes.UniqueNonClustered }); + + index.Index.Columns.Add(new IndexColumnDefinition { Name = Expression.Column.Name @@ -242,4 +245,4 @@ public IAlterColumnOptionSyntax OnDeleteOrUpdate(Rule rule) return this; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Persistence/Migrations/Syntax/Alter/Table/AlterTableBuilder.cs b/src/Umbraco.Core/Persistence/Migrations/Syntax/Alter/Table/AlterTableBuilder.cs index 7a6ab8d47ab3..ad72176089d9 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Syntax/Alter/Table/AlterTableBuilder.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Syntax/Alter/Table/AlterTableBuilder.cs @@ -1,4 +1,5 @@ using System.Data; +using Umbraco.Core.Persistence.DatabaseAnnotations; using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.Migrations.Syntax.Alter.Expressions; using Umbraco.Core.Persistence.Migrations.Syntax.Expressions; @@ -124,8 +125,8 @@ public IAlterTableColumnOptionSyntax Unique(string indexName) { Name = indexName, SchemaName = Expression.SchemaName, - TableName = Expression.TableName, - IsUnique = true + TableName = Expression.TableName, + IndexType = IndexTypes.UniqueNonClustered }); index.Index.Columns.Add(new IndexColumnDefinition @@ -259,4 +260,4 @@ public IAlterTableColumnOptionSyntax OnDeleteOrUpdate(Rule rule) return this; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Column/CreateColumnBuilder.cs b/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Column/CreateColumnBuilder.cs index d004cd1176fd..dad72c54efb0 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Column/CreateColumnBuilder.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Column/CreateColumnBuilder.cs @@ -1,4 +1,5 @@ using System.Data; +using Umbraco.Core.Persistence.DatabaseAnnotations; using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.Migrations.Syntax.Expressions; using Umbraco.Core.Persistence.SqlSyntax; @@ -114,8 +115,8 @@ public ICreateColumnOptionSyntax Unique(string indexName) { Name = indexName, SchemaName = Expression.SchemaName, - TableName = Expression.TableName, - IsUnique = true + TableName = Expression.TableName, + IndexType = IndexTypes.UniqueNonClustered }); index.Index.Columns.Add(new IndexColumnDefinition @@ -217,4 +218,4 @@ public ICreateColumnOptionSyntax OnDeleteOrUpdate(Rule rule) return this; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Index/CreateIndexBuilder.cs b/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Index/CreateIndexBuilder.cs index 4d1396ff7972..2740014150db 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Index/CreateIndexBuilder.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Index/CreateIndexBuilder.cs @@ -47,39 +47,27 @@ public ICreateIndexOnColumnSyntax Descending() } ICreateIndexOnColumnSyntax ICreateIndexColumnOptionsSyntax.Unique() - { - Expression.Index.IsUnique = true; - //if it is Unique then it must be unique nonclustered and set the other flags - Expression.Index.IndexType = IndexTypes.UniqueNonClustered; - Expression.Index.IsClustered = false; + { + Expression.Index.IndexType = IndexTypes.UniqueNonClustered; return this; } public ICreateIndexOnColumnSyntax NonClustered() { - Expression.Index.IndexType = IndexTypes.NonClustered; - Expression.Index.IsClustered = false; - Expression.Index.IndexType = IndexTypes.NonClustered; - Expression.Index.IsUnique = false; + Expression.Index.IndexType = IndexTypes.NonClustered; return this; } public ICreateIndexOnColumnSyntax Clustered() - { - Expression.Index.IndexType = IndexTypes.Clustered; - Expression.Index.IsClustered = true; - //if it is clustered then we have to change the index type set the other flags - Expression.Index.IndexType = IndexTypes.Clustered; - Expression.Index.IsClustered = true; - Expression.Index.IsUnique = false; - return this; + { + Expression.Index.IndexType = IndexTypes.Clustered; + return this; } ICreateIndexOnColumnSyntax ICreateIndexOptionsSyntax.Unique() { - Expression.Index.IndexType = IndexTypes.UniqueNonClustered; - Expression.Index.IsUnique = true; + Expression.Index.IndexType = IndexTypes.UniqueNonClustered; return this; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Table/CreateTableBuilder.cs b/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Table/CreateTableBuilder.cs index 86760b71bcf2..5c196343214a 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Table/CreateTableBuilder.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Syntax/Create/Table/CreateTableBuilder.cs @@ -1,4 +1,5 @@ using System.Data; +using Umbraco.Core.Persistence.DatabaseAnnotations; using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.Migrations.Syntax.Create.Expressions; using Umbraco.Core.Persistence.Migrations.Syntax.Expressions; @@ -164,8 +165,8 @@ public ICreateTableColumnOptionSyntax Unique(string indexName) { Name = indexName, SchemaName = Expression.SchemaName, - TableName = Expression.TableName, - IsUnique = true + TableName = Expression.TableName, + IndexType = IndexTypes.UniqueNonClustered }); index.Index.Columns.Add(new IndexColumnDefinition @@ -267,4 +268,4 @@ public ICreateTableColumnOptionSyntax OnDeleteOrUpdate(Rule rule) return this; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Tests/Persistence/SyntaxProvider/SqlCeSyntaxProviderTests.cs b/src/Umbraco.Tests/Persistence/SyntaxProvider/SqlCeSyntaxProviderTests.cs index 105b3d0c11ac..2043feafc4b2 100644 --- a/src/Umbraco.Tests/Persistence/SyntaxProvider/SqlCeSyntaxProviderTests.cs +++ b/src/Umbraco.Tests/Persistence/SyntaxProvider/SqlCeSyntaxProviderTests.cs @@ -89,7 +89,7 @@ public void Format_SqlServer_NonClusteredIndexDefinition_UsingIsClusteredFalse_A var sqlSyntax = new SqlServerSyntaxProvider(); var indexDefinition = CreateIndexDefinition(); - indexDefinition.IsClustered = false; + indexDefinition.IndexType = IndexTypes.Clustered; var actual = sqlSyntax.Format(indexDefinition); Assert.AreEqual("CREATE CLUSTERED INDEX [IX_A] ON [TheTable] ([A])", actual); @@ -159,4 +159,4 @@ private static IndexDefinition CreateIndexDefinition() } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Client/bower.json b/src/Umbraco.Web.UI.Client/bower.json index 5f94ecf6299b..6521ec301c14 100644 --- a/src/Umbraco.Web.UI.Client/bower.json +++ b/src/Umbraco.Web.UI.Client/bower.json @@ -33,6 +33,9 @@ "clipboard": "1.7.1", "font-awesome": "~4.7" }, + "resolutions": { + "font-awesome": "~4.7" + }, "install": { "path": "lib-bower", "ignore": [ diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js index e18137085b83..5a68d36bc1e5 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js @@ -1,5 +1,5 @@ angular.module("umbraco.directives") - .directive('gridRte', function (tinyMceService, stylesheetResource, angularHelper, assetsService, $q, $timeout) { + .directive('gridRte', function (tinyMceService, stylesheetResource, angularHelper, assetsService, $q, $timeout, eventsService) { return { scope: { uniqueId: '=', @@ -362,8 +362,16 @@ angular.module("umbraco.directives") // tinyMceEditor.fire('LoadContent', null); //}; + + var tabShownListener = eventsService.on("valTab.tabShown", function (e, args) { + //the tab has been shown, trigger the mceAutoResize (as it could have timed out before the tab was shown) + if (tinyMceEditor !== undefined && tinyMceEditor != null) { + tinyMceEditor.execCommand('mceAutoResize', false, null, null); + } + }); + //listen for formSubmitting event (the result is callback used to remove the event subscription) - var unsubscribe = scope.$on("formSubmitting", function () { + var formSubmittingListener = scope.$on("formSubmitting", function () { //TODO: Here we should parse out the macro rendered content so we can save on a lot of bytes in data xfer // we do parse it out on the server side but would be nice to do that on the client side before as well. scope.value = tinyMceEditor ? tinyMceEditor.getContent() : null; @@ -373,7 +381,8 @@ angular.module("umbraco.directives") // NOTE: this is very important otherwise if this is part of a modal, the listener still exists because the dom // element might still be there even after the modal has been hidden. scope.$on('$destroy', function () { - unsubscribe(); + formSubmittingListener(); + eventsService.unsubscribe(tabShownListener); if (tinyMceEditor !== undefined && tinyMceEditor != null) { tinyMceEditor.destroy() } diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valtab.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valtab.directive.js index 8d1fc60083f2..c5d7cb6e5808 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valtab.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valtab.directive.js @@ -6,15 +6,15 @@ * @description Used to show validation warnings for a tab to indicate that the tab content has validations errors in its data. * In order for this directive to work, the valFormManager directive must be placed on the containing form. **/ -function valTab() { +function valTab(eventsService) { return { require: ['^form', '^valFormManager'], restrict: "A", link: function (scope, element, attr, ctrs) { var valFormManager = ctrs[1]; - var tabId = "tab" + scope.tab.id; - scope.tabHasError = false; + var tabId = "tab" + scope.tab.id; + scope.tabHasError = false; //listen for form validation changes valFormManager.onValidationStatusChanged(function (evt, args) { @@ -31,8 +31,17 @@ function valTab() { scope.tabHasError = false; } }); + var tabShownFunc = function (e) { + var tabContent = element.closest(".umb-panel").find("#" + tabId); + eventsService.emit('valTab.tabShown', { originalEvent: e, tab: scope.tab, content: tabContent }); + }; + var anchorElement = element.find("a[data-toggle='tab']"); + anchorElement.on('shown.bs.tab', tabShownFunc); + scope.$on('$destroy', function () { + anchorElement.off('shown.bs.tab', tabShownFunc); + }); } }; } -angular.module('umbraco.directives.validation').directive("valTab", valTab); \ No newline at end of file +angular.module('umbraco.directives.validation').directive("valTab", valTab); diff --git a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js index e617f62ed484..5b0706150c59 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js @@ -463,7 +463,7 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo //if it is not two parts long then this most likely means that it's a legacy action var js = action.metaData["jsAction"].replace("javascript:", ""); - //there's not really a different way to acheive this except for eval + //there's not really a different way to achieve this except for eval eval(js); } else { diff --git a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js index 0c6bcf941ac2..e0330bd555fd 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js @@ -11,7 +11,7 @@ */ function NavigationController($scope, $rootScope, $location, $log, $routeParams, $timeout, appState, navigationService, keyboardService, dialogService, historyService, eventsService, sectionResource, angularHelper) { - //TODO: Need to think about this and an nicer way to acheive what this is doing. + //TODO: Need to think about this and an nicer way to achieve what this is doing. //the tree event handler i used to subscribe to the main tree click events $scope.treeEventHandler = $({}); navigationService.setupTreeEvents($scope.treeEventHandler); diff --git a/src/Umbraco.Web.UI.Client/src/less/belle.less b/src/Umbraco.Web.UI.Client/src/less/belle.less index 7f10c3d4d754..9b9be85053e7 100644 --- a/src/Umbraco.Web.UI.Client/src/less/belle.less +++ b/src/Umbraco.Web.UI.Client/src/less/belle.less @@ -101,6 +101,7 @@ @import "components/umb-confirm-action.less"; @import "components/umb-keyboard-shortcuts-overview.less"; @import "components/umb-checkbox-list.less"; +@import "components/umb-radiobuttons-list.less"; @import "components/umb-locked-field.less"; @import "components/umb-tabs.less"; @import "components/umb-load-indicator.less"; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/prevalues/multivalues.less b/src/Umbraco.Web.UI.Client/src/less/components/prevalues/multivalues.less index 43f6697eb1d0..0dbc4c381cea 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/prevalues/multivalues.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/prevalues/multivalues.less @@ -5,6 +5,10 @@ .umb-overlay & { width: 500px; } + + p{ + margin: 7px 0; + } } .umb-prevalues-multivalues__left { diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-color-swatches.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-color-swatches.less index 43e62780a3d3..26a735508e8d 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-color-swatches.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-color-swatches.less @@ -42,8 +42,8 @@ &.with-labels { .umb-color-box { - width: 120px; - height: 100%; + width: 130px; + height: auto; display: flex; flex-flow: row wrap; @@ -53,15 +53,21 @@ flex: 0 0 100%; max-width: 100%; min-height: 80px; - padding-top: 10px; + padding: 0; + + .check_circle { + margin: 15px auto; + } .umb-color-box__label { background: @white; font-size: 14px; display: flex; flex-flow: column wrap; - flex: 0 0 100%; + flex: 1 0 100%; + justify-content: flex-end; padding: 1px 5px; + min-height: 45px; max-width: 100%; margin-top: auto; margin-bottom: -3px; diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-radiobuttons-list.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-radiobuttons-list.less new file mode 100644 index 000000000000..2fe3487a8ff7 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-radiobuttons-list.less @@ -0,0 +1,80 @@ +.umb-radiobuttons{ + &__label{ + position: relative; + padding: 0; + + &-text{ + margin: 0 0 0 32px; + position: relative; + top: 1px; + } + } + + &__input{ + position: absolute; + top: 0; + left: 0; + opacity: 0; + + &:focus ~ .umb-radiobuttons__state{ + box-shadow: 0 1px 3px fade(@black, 12%), 0 1px 2px fade(@black, 24%); + } + + &:focus:checked ~ .umb-radiobuttons__state{ + box-shadow: none; + } + + &:checked ~ .umb-radiobuttons__state{ + &:before{ + width: 100%; + height: 100%; + } + } + + &:checked ~ .umb-radiobuttons__state .umb-radiobuttons__icon{ + opacity: 1; + } + } + + &__state{ + display: flex; + flex-wrap: wrap; + border: 1px solid @gray-8; + border-radius: 100%; + width: 22px; + height: 22px; + position: relative; + + &:before{ + content: ""; + background: @green; + width: 0; + height: 0; + transition: .1s ease-out; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + margin: auto; + border-radius: 100%; + } + } + + &__icon{ + color: @white; + text-align: center; + font-size: 15px; + opacity: 0; + transition: .3s ease-out; + + &:before{ + position: absolute; + top: 2px; + right: 0; + left: 0; + bottom: 0; + margin: auto; + } + } +} diff --git a/src/Umbraco.Web.UI.Client/src/less/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less index b16e437cc2f8..46f0f86d8db8 100644 --- a/src/Umbraco.Web.UI.Client/src/less/main.less +++ b/src/Umbraco.Web.UI.Client/src/less/main.less @@ -23,7 +23,7 @@ margin-top: 0px; margin-bottom: 15px; font-size: 14px; - color: @gray-7; + color: @gray-7; } h5{ @@ -134,7 +134,7 @@ h5.-black { padding-bottom: 0; } -.block-form .umb-control-group label .help-block, +.block-form .umb-control-group label .help-block, .block-form .umb-control-group label small { font-size: 13px; padding-top: 2px; @@ -243,9 +243,9 @@ label:not([for]) { } .umb-version { - color: @gray-7; - position: absolute; - bottom: 5px; + color: @gray-7; + position: absolute; + bottom: 5px; right: 20px; } @@ -653,3 +653,14 @@ input[type=checkbox]:checked + .input-label--small { .bootstrap-datetimepicker-widget td span { border-radius: 0 !important; } + +.visuallyhidden{ + position: absolute !important; + clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ + clip: rect(1px, 1px, 1px, 1px); + padding:0 !important; + border:0 !important; + height: 1px !important; + width: 1px !important; + overflow: hidden; +} diff --git a/src/Umbraco.Web.UI.Client/src/less/property-editors.less b/src/Umbraco.Web.UI.Client/src/less/property-editors.less index 412a87d9090b..0a3807e7e60d 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -102,11 +102,11 @@ div.umb-codeeditor { border: 1px solid @gray-8; } div.umb-codeeditor .umb-el-wrap { - padding: 0px; + padding: 0; } div.umb-codeeditor .umb-btn-toolbar { - padding: 0px; - margin: 0px; + padding: 0; + margin: 0; border-bottom: @gray-8 1px solid; background: @gray-10; } @@ -122,7 +122,7 @@ div.umb-codeeditor .umb-btn-toolbar { position: absolute; } } -.mce-tinymce{border: 1px solid @gray-8 !important; border-radius: 0px !important;} +.mce-tinymce{border: 1px solid @gray-8 !important; border-radius: 0 !important;} .mce-panel{background: @gray-10 !important; border-color: @gray-8 !important;} .mce-btn-group, .mce-btn{border: none !important; background: none !important;} .mce-ico{font-size: 12px !important; color: @gray-1 !important;} @@ -203,7 +203,7 @@ div.umb-codeeditor .umb-btn-toolbar { } label { - border: 1px solid #fff; + border: 1px solid @white; padding: 6px 10px; font-family: monospace; border: 1px solid #dfdfe1; @@ -213,6 +213,99 @@ div.umb-codeeditor .umb-btn-toolbar { } } +// +// Image Cropper +// -------------------------------------------------- + +.umb-prevalues-multivalues.umb-cropsizes{ + max-width: none; + width: 100%; + + .umb-overlay__form &{ + width: 100%; + } +} + +.umb-cropsizes{ + float: left; + + .control-group{ + label{ + display: block; + } + } + + &__add{ + display: flex; + align-items: center; + flex-wrap: wrap; + } + + &__sortable{ + max-width: 500px; + width: 100%; + min-width: 66.6%; + + @media (min-width: 1101px) and (max-width: 1300px), (max-width: 930px){ + max-width: none; + } + } + + &__controls{ + margin: 24px 0 0; + } + + &__input{ + margin: 0 15px 0 0; + width: ~"calc(100% - 15px)"; + + @media (min-width: 1101px) and (max-width: 1300px), (max-width: 930px){ + margin: 0; + width: 100%; + max-width: 220px; + } + + &--narrow{ + max-width: 95px; + width: 100%; + } + + &-wrap{ + position: relative; + max-width: 206px; + width: 100%; + + @media (min-width: 1101px) and (max-width: 1300px), (max-width: 930px){ + max-width: none; + flex: 1 1 100%; + margin: 0 0 20px; + } + + &--narrow{ + margin: 0 15px 0 0; + max-width: 95px; + width: 100%; + } + + &--icon{ + padding: 0 15px 0 0; + width: ~"calc(100% + 15px)"; // Use an escape string in order to make use of CSS native calc function instead of the one built into less + + &:after{ + content:"\00D7"; + position: absolute; + bottom: -9px; + top: 0; + margin: auto; + right: 0; + width: 5px; + height: 5px; + } + } + } + } +} + // // Media picker @@ -235,6 +328,18 @@ div.umb-codeeditor .umb-btn-toolbar { } } +.umb-mediapicker .label{ + &__trashed{ + background-color: @red; + position: absolute; + top: 50%; + left: 50%; + z-index: 1; + transform: translate3d(-50%,-50%,0); + margin: 0; + } +} + .umb-mediapicker .picked-image { position: absolute; bottom: 10px; @@ -333,7 +438,7 @@ div.umb-codeeditor .umb-btn-toolbar { background-image: url(../img/checkered-background.png); } -.umb-sortable-thumbnails li img.trashed { +.umb-sortable-thumbnails li .trashed { opacity:0.3; } @@ -707,8 +812,8 @@ div.umb-codeeditor .umb-btn-toolbar { .umb-photo-folder .picrow div, .umb-photo-preview{ - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; border: none; display: inline-block; vertical-align: top; @@ -745,9 +850,9 @@ div.umb-codeeditor .umb-btn-toolbar { //this is a temp hack, to provide selectors in the dialog: .umb-photo-folder .pic:hover .selector-overlay { position: absolute; - bottom: 0px; - left: 0px; - right: 0px; + bottom: 0; + left: 0; + right: 0; padding: 5px; background: @black; z-index: 100; @@ -827,7 +932,7 @@ div.umb-codeeditor .umb-btn-toolbar { .umb-fileupload ul { list-style: none; vertical-align: middle; - margin-bottom: 0px; + margin-bottom: 0; } .umb-fileupload label { diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html index 2bc7ce9622d4..3e92f5c18c90 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html @@ -6,7 +6,7 @@
-
{{ color.label }}
+
{{ color.label || color.value }}
#{{ color.value }}
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/copy.html b/src/Umbraco.Web.UI.Client/src/views/content/copy.html index e02855ea8fd3..62116a3e6e10 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/copy.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/copy.html @@ -83,10 +83,10 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/content/move.html b/src/Umbraco.Web.UI.Client/src/views/content/move.html index f7978e01a57c..09116a2a6db8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/move.html @@ -73,11 +73,11 @@ - \ No newline at end of file + diff --git a/src/Umbraco.Web.UI.Client/src/views/datatypes/move.html b/src/Umbraco.Web.UI.Client/src/views/datatypes/move.html index 0546cbff4413..77746a5f42e7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/datatypes/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/datatypes/move.html @@ -44,10 +44,10 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/copy.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/copy.html index 97de82190959..c9c4962da735 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/copy.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/copy.html @@ -44,10 +44,10 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html index 0af4cbfda7e8..58d897e91c03 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html @@ -44,10 +44,10 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.controller.js b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.controller.js index fe1b0f0e7e70..3ce795b01e87 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.controller.js @@ -9,7 +9,7 @@ (function() { 'use strict'; - function TemplatesController($scope, entityResource, contentTypeHelper, $routeParams) { + function TemplatesController($scope, entityResource, contentTypeHelper, templateResource, $routeParams) { /* ----------- SCOPE VARIABLES ----------- */ @@ -21,24 +21,53 @@ /* ---------- INIT ---------- */ - init(); + init(function () { - function init() { + // update placeholder template information on new doc types + if (!$routeParams.notemplate && $scope.model.id === 0) { + vm.updateTemplatePlaceholder = true; + vm.availableTemplates = contentTypeHelper.insertTemplatePlaceholder(vm.availableTemplates); + } + }); + + function init(callback) { entityResource.getAll("Template").then(function(templates){ vm.availableTemplates = templates; - // update placeholder template information on new doc types - if (!$routeParams.notemplate && $scope.model.id === 0) { - vm.updateTemplatePlaceholder = true; - vm.availableTemplates = contentTypeHelper.insertTemplatePlaceholder(vm.availableTemplates); - } + callback(); }); } + vm.createTemplate = function () { + templateResource.getScaffold(-1).then(function (template) { + + template.alias = $scope.model.alias; + template.name = $scope.model.name; + + templateResource.save(template).then(function (savedTemplate) { + + init(function () { + + var newTemplate = vm.availableTemplates.filter(function (t) { return t.id === savedTemplate.id }); + if (newTemplate.length > 0) { + $scope.model.allowedTemplates.push(newTemplate[0]); + + if ($scope.model.defaultTemplate === null) { + $scope.model.defaultTemplate = newTemplate[0]; + } + } + + }); + + }); + + }); + } + } angular.module("umbraco").controller("Umbraco.Editors.DocumentType.TemplatesController", TemplatesController); diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html index a1385102e44d..c02bb78de7fd 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/templates/templates.html @@ -16,6 +16,11 @@
alias="model.alias" update-placeholder="vm.updateTemplatePlaceholder"> + + diff --git a/src/Umbraco.Web.UI.Client/src/views/media/media.move.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.move.controller.js index 02cb3a363a31..77e59cbbfaad 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/media.move.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/media/media.move.controller.js @@ -49,8 +49,10 @@ angular.module("umbraco").controller("Umbraco.Editors.Media.MoveController", $scope.dialogTreeEventHandler.bind("treeNodeExpanded", nodeExpandedHandler); $scope.move = function () { + $scope.busy = true; mediaResource.move({ parentId: $scope.target.id, id: node.id }) .then(function (path) { + $scope.busy = false; $scope.error = false; $scope.success = true; @@ -97,4 +99,4 @@ angular.module("umbraco").controller("Umbraco.Editors.Media.MoveController", $scope.miniListView = node; } - }); \ No newline at end of file + }); diff --git a/src/Umbraco.Web.UI.Client/src/views/media/move.html b/src/Umbraco.Web.UI.Client/src/views/media/move.html index b37b71b6396b..88c64f1992f2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/move.html @@ -49,7 +49,7 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html b/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html index 77f50358c3fa..ddb2559ba2bd 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html @@ -44,10 +44,10 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html b/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html index c240925a7d9c..5dbac091478d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html @@ -44,10 +44,10 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.controller.js new file mode 100644 index 000000000000..c588893d7c7d --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.controller.js @@ -0,0 +1,64 @@ +angular.module("umbraco").controller("Umbraco.PrevalueEditors.ColorPickerController", + function ($scope) { + + //setup the default config + var config = { + useLabel: false + }; + + //map the user config + angular.extend(config, $scope.model.config); + + //map back to the model + $scope.model.config = config; + + $scope.isConfigured = $scope.model.prevalues && _.keys($scope.model.prevalues).length > 0; + + $scope.model.items = []; + + // Make an array from the dictionary + var items = []; + + if (angular.isArray($scope.model.prevalues)) { + + for (var i in $scope.model.prevalues) { + var oldValue = $scope.model.prevalues[i]; + + if (!isValidHex(oldValue.value || oldValue)) + continue; + + if (oldValue.hasOwnProperty("value")) { + var hexCode = toFullHex(oldValue.value); + items.push({ + value: hexCode.substr(1, hexCode.length), + label: oldValue.label, + id: i + }); + } else { + var hexCode = toFullHex(oldValue); + items.push({ + value: hexCode.substr(1, hexCode.length), + label: oldValue, + id: i + }); + } + } + + // Now make the editor model the array + $scope.model.items = items; + } + + function toFullHex(hex) { + if (hex.length === 4 && hex.charAt(0) === "#") { + hex = "#" + hex.charAt(1) + hex.charAt(1) + hex.charAt(2) + hex.charAt(2) + hex.charAt(3) + hex.charAt(3); + } + return hex.toLowerCase(); + } + + function isValidHex(str) { + console.log("str", str); + console.log("test", /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(str)); + return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(str); + } + + }); diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.html b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.html new file mode 100644 index 000000000000..b5f77269b8cd --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.html @@ -0,0 +1,18 @@ +
+ +
+ You haven't defined any colors +
+ + + + + {{model.items | json}} +

+ {{model.value}} + + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.controller.js index 3a99c90a5096..5a0b43d105fd 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.controller.js @@ -1,10 +1,13 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.CropSizesController", - function ($scope, $timeout) { + function ($scope) { if (!$scope.model.value) { $scope.model.value = []; } + $scope.editMode = false; + $scope.setFocus = false; + $scope.remove = function (item, evt) { evt.preventDefault(); $scope.model.value = _.reject($scope.model.value, function (x) { @@ -13,32 +16,57 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.CropSizesControlle }; $scope.edit = function (item, evt) { - evt.preventDefault(); + evt.preventDefault(); + $scope.editMode = true; + $scope.setFocus = false; + $scope.newItem = item; }; $scope.cancel = function (evt) { - evt.preventDefault(); + evt.preventDefault(); + $scope.editMode = false; + $scope.setFocus = true; + $scope.newItem = null; }; + $scope.change = function () { + // Listen to the change event and set focus 2 false + if($scope.setFocus){ + $scope.setFocus = false; + return; + } + } + $scope.add = function (evt) { - evt.preventDefault(); + evt.preventDefault(); + + $scope.editMode = false; + + $scope.setFocus = true; - if ($scope.newItem && $scope.newItem.alias && + if ($scope.newItem && $scope.newItem.alias && angular.isNumber($scope.newItem.width) && angular.isNumber($scope.newItem.height) && $scope.newItem.width > 0 && $scope.newItem.height > 0) { - var exists = _.find($scope.model.value, function (item) { return $scope.newItem.alias === item.alias; }); + var exists = _.find($scope.model.value, function (item) { return $scope.newItem.alias === item.alias; }); + if (!exists) { $scope.model.value.push($scope.newItem); $scope.newItem = {}; - $scope.hasError = false; + $scope.hasError = false; + $scope.cropAdded = false; return; - } + } + else{ + $scope.newItem = null; + $scope.hasError = false; + return; + } } //there was an error, do the highlight (will be set back by the directive) $scope.hasError = true; - }; - }); \ No newline at end of file + }; + }); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html index 62a5565d953f..0be82ff52ffa 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html @@ -1,49 +1,74 @@ -
+
+
-
-
    -
  • - - - - {{node.alias}} -
    {{node.width}}px × {{node.height}}px -
  • -
-
- -
-

Define crop

-

- Give the crop an alias and it's default width and height. -

+
+ + +
-
- - +
+ +
-
- - - × - +
+ +
-
- - Cancel +
+ + + Cancel
+
-
- +
+
+ +
+

{{item.alias}} ({{item.width}}px × {{item.height}}px)

+
+
+ Edit + Remove +
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js index 272627dc7b4f..b335354bc4c6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js @@ -58,6 +58,11 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie items: [] }; + $scope.createAllowedButtonSingle = false; + $scope.createAllowedButtonSingleWithBlueprints = false; + $scope.createAllowedButtonMultiWithBlueprints = false; + + //when this is null, we don't check permissions $scope.currentNodePermissions = null; @@ -598,7 +603,28 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie id = -1; } - $scope.listViewAllowedTypes = getContentTypesCallback(id); + //$scope.listViewAllowedTypes = getContentTypesCallback(id); + getContentTypesCallback(id).then(function (listViewAllowedTypes) { + var blueprints = false; + $scope.listViewAllowedTypes = listViewAllowedTypes; + + angular.forEach(listViewAllowedTypes, function (allowedType) { + angular.forEach(allowedType.blueprints, function (value, key) { + blueprints = true; + }); + }); + + if (listViewAllowedTypes.length === 1 && blueprints === false) { + $scope.createAllowedButtonSingle = true; + } + if (listViewAllowedTypes.length === 1 && blueprints === true) { + $scope.createAllowedButtonSingleWithBlueprints = true; + } + if (listViewAllowedTypes.length > 1) { + $scope.createAllowedButtonMultiWithBlueprints = true; + } + }); + $scope.contentId = id; $scope.isTrashed = id === "-20" || id === "-21"; @@ -650,6 +676,22 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie } } + + function createBlank(entityType,docTypeAlias) { + $location + .path("/" + entityType + "/" + entityType + "/edit/" + $scope.contentId) + .search("doctype=" + docTypeAlias + "&create=true"); + } + + function createFromBlueprint(entityType,docTypeAlias, blueprintId) { + $location + .path("/" + entityType + "/" + entityType + "/edit/" + $scope.contentId) + .search("doctype=" + docTypeAlias + "&create=true&blueprintId=" + blueprintId); + } + + $scope.createBlank = createBlank; + $scope.createFromBlueprint = createFromBlueprint; + //GO! initView(); } diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html index 2683317dc1c4..cdd7e9cab22c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html @@ -11,35 +11,85 @@ -
+ + + + -
- - - Create {{ listViewAllowedTypes[0].name }} + + + + + + + + + + - + diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js index bf7462942a4a..7b8445a4dcfa 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js @@ -16,7 +16,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl } function setupViewModel() { - $scope.images = []; + $scope.mediaItems = []; $scope.ids = []; $scope.isMultiPicker = multiPicker; @@ -41,7 +41,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl // on whether it is simply resaved or not. // This is done by remapping the int/guid ids into a new array of items, where we create "Deleted item" placeholders // when there is no match for a selected id. This will ensure that the values being set on save, are the same as before. - + medias = _.map(ids, function(id) { var found = _.find(medias, @@ -72,7 +72,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl media.thumbnail = mediaHelper.resolveFileFromEntity(media, true); } - $scope.images.push(media); + $scope.mediaItems.push(media); if ($scope.model.config.idType === "udi") { $scope.ids.push(media.udi); @@ -89,7 +89,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl setupViewModel(); $scope.remove = function(index) { - $scope.images.splice(index, 1); + $scope.mediaItems.splice(index, 1); $scope.ids.splice(index, 1); $scope.sync(); }; @@ -117,7 +117,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl media.thumbnail = mediaHelper.resolveFileFromEntity(media, true); } - $scope.images.push(media); + $scope.mediaItems.push(media); if ($scope.model.config.idType === "udi") { $scope.ids.push(media.udi); @@ -145,7 +145,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl // content picker. Then we don't have to worry about setting ids, render models, models, we just set one and let the // watch do all the rest. $timeout(function(){ - angular.forEach($scope.images, function(value, key) { + angular.forEach($scope.mediaItems, function(value, key) { r.push($scope.model.config.idType === "udi" ? value.udi : value.id); }); $scope.ids = r; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html index 2efed8b3e802..7e9568bdd274 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html @@ -1,31 +1,35 @@
-

-

- +

+

+
-
    -
  • +
      +
    • + +

      + + +

      - - + - - + + - +
      - - .{{image.extension}} + + .{{media.metaData.umbracoExtension.Value}} - {{image.name}} - + {{media.name}} +
    • - +
    • diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/radiobuttons/radiobuttons.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/radiobuttons/radiobuttons.html index cdb5a37ac8c2..7af6491641ed 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/radiobuttons/radiobuttons.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/radiobuttons/radiobuttons.html @@ -1,12 +1,17 @@ 
      • -
      -
      \ No newline at end of file +
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index af8c302affc7..5b14e03fae78 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -1304,8 +1304,6 @@ To manage your website, simply open the Umbraco back office and start adding con Reset crop - Define crop - Give the crop an alias and its default width and height Save crop Add new crop Done diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml index 5355928f17fe..791fc315ee92 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -1302,8 +1302,6 @@ To manage your website, simply open the Umbraco back office and start adding con Reset crop - Define crop - Give the crop an alias and its default width and height Save crop Add new crop Done diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/es.xml b/src/Umbraco.Web.UI/umbraco/config/lang/es.xml index fed40e2d79a7..a41d17604b4f 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/es.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/es.xml @@ -1039,8 +1039,6 @@ Reiniciar - Definir corte - Da al corte un alias y su anchura y altura por defecto Guardar corte Añadir nuevo corte diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml index b3d5edf51297..7d20714ab632 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml @@ -1286,7 +1286,6 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à Réinitialiser Définir le recadrage - Donnez un alias au recadrage ainsi que sa largeur et sa hauteur par défaut Sauvegarder le recadrage Ajouter un nouveau recadrage diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml index 98759d585161..9affa43727d8 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml @@ -1022,8 +1022,6 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Resetuj - Zdefiniuj przycięcie - Ustaw alias dla przycięcia, a także jego domyślną szerokość i długość Zapisz przycięcie Dodaj nowe przycięcie diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml index 8ebe8c0ef7e2..8e9856668745 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml @@ -879,8 +879,6 @@ Сбросить - Задать рамку - Задайте рамке имя (алиас), а также ширину и высоту по-умолчанию Сохранить рамку Добавить новую рамку diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml b/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml index d011f7dadbcb..982f31e38321 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml @@ -645,8 +645,6 @@ Återställ - Definiera beskräning - Ge beskärningen ett alias och dess standardbredd och -höjd spara beskärning Lägg till ny beskärning diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml index c2189ca92829..a918b78f95c2 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml @@ -999,8 +999,6 @@ Reset - Define crop - Give the crop an alias and its default width and height Save crop Add new crop diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index ac58b764f029..3f6df5c4b765 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -209,20 +209,6 @@ public HttpResponseMessage PostRenameContainer(int id, string name) public DocumentTypeCollectionDisplay PostCreateCollection(int parentId, string collectionName, bool collectionCreateTemplate, string collectionItemName, bool collectionItemCreateTemplate, string collectionIcon, string collectionItemIcon) { - var storeInContainer = false; - var allowUnderDocType = -1; - // check if it's a folder - if (Services.ContentTypeService.GetContentType(parentId) == null) - { - storeInContainer = true; - } else - { - // if it's not a container, we'll change the parentid to the root, - // and use the parent id as the doc type the collection should be allowed under - allowUnderDocType = parentId; - parentId = -1; - } - // create item doctype var itemDocType = new ContentType(parentId); itemDocType.Name = collectionItemName; @@ -260,20 +246,16 @@ public DocumentTypeCollectionDisplay PostCreateCollection(int parentId, string c // save collection doctype Services.ContentTypeService.Save(collectionDocType); - // test if the parent id exist and then allow the collection underneath - if (storeInContainer == false && allowUnderDocType != -1) + // test if the parent exist and then allow the collection underneath + var parentCt = Services.ContentTypeService.GetContentType(parentId); + if (parentCt != null) { - var parentCt = Services.ContentTypeService.GetContentType(allowUnderDocType); - if (parentCt != null) - { - var allowedCts = parentCt.AllowedContentTypes.ToList(); - allowedCts.Add(new ContentTypeSort(collectionDocType.Id, allowedCts.Count())); - parentCt.AllowedContentTypes = allowedCts; - Services.ContentTypeService.Save(parentCt); - } + var allowedCts = parentCt.AllowedContentTypes.ToList(); + allowedCts.Add(new ContentTypeSort(collectionDocType.Id, allowedCts.Count())); + parentCt.AllowedContentTypes = allowedCts; + Services.ContentTypeService.Save(parentCt); } - return new DocumentTypeCollectionDisplay { CollectionId = collectionDocType.Id, diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs index 5196fda0ee43..3d6a1727e401 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs @@ -229,7 +229,7 @@ static void AutoFillProperties(IContentBase content) internal class ImageCropperPreValueEditor : PreValueEditor { - [PreValueField("crops", "Crop sizes", "views/propertyeditors/imagecropper/imagecropper.prevalues.html")] + [PreValueField("crops", "Define crops", "views/propertyeditors/imagecropper/imagecropper.prevalues.html", Description = "Give the crop an alias and it's default width and height")] public string Crops { get; set; } } diff --git a/src/Umbraco.Web/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index d7d331d88775..32b06880ecce 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -169,7 +169,7 @@ private void ExecuteTemplateRendering(TextWriter sw, PublishedContentRequest con /// /// /// - /// To acheive this we temporarily change the output text writer of the current HttpResponse, then + /// To achieve this we temporarily change the output text writer of the current HttpResponse, then /// execute the controller via the handler which innevitably writes the result to the text writer /// that has been assigned to the response. Then we change the response textwriter back to the original /// before continuing . diff --git a/src/umbraco.providers/members/UmbracoMembershipProvider.cs b/src/umbraco.providers/members/UmbracoMembershipProvider.cs index 648bf5a0d565..ff6895fe20aa 100644 --- a/src/umbraco.providers/members/UmbracoMembershipProvider.cs +++ b/src/umbraco.providers/members/UmbracoMembershipProvider.cs @@ -30,7 +30,7 @@ namespace umbraco.providers.members /// /// Custom Membership Provider for Umbraco Members (User authentication for Frontend applications NOT umbraco CMS) /// - [Obsolete("This has been superceded by Umbraco.Web.Security.Providers.MembersMembershipProvider")] + [Obsolete("This has been superseded by Umbraco.Web.Security.Providers.MembersMembershipProvider")] public class UmbracoMembershipProvider : UmbracoMembershipProviderBase, IUmbracoMemberTypeMembershipProvider { public UmbracoMembershipProvider() @@ -111,7 +111,7 @@ public override bool AllowManuallyChangingPassword /// The name of the provider has a length of zero. public override void Initialize(string name, NameValueCollection config) { - // Intialize values from web.config + // Initialize values from web.config if (config == null) throw new ArgumentNullException("config"); if (string.IsNullOrEmpty(name)) name = Constants.Conventions.Member.UmbracoMemberProviderName; @@ -189,7 +189,7 @@ public override void Initialize(string name, NameValueCollection config) /// protected override bool PerformChangePassword(string username, string oldPassword, string newPassword) { - //NOTE: due to backwards compatibilty reasons, this provider doesn't care about the old password and + //NOTE: due to backwards compatibility reasons, this provider doesn't care about the old password and // allows simply setting the password manually so we don't really care about the old password. // This is allowed based on the overridden AllowManuallyChangingPassword option.