From 4a49817322bdbfd97f9d7888098b590250d1e6a7 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Mon, 22 Oct 2018 08:31:10 +0200 Subject: [PATCH 01/75] Fixes a few oversights in image cropper --- .../directives/components/imaging/umbimagegravity.directive.js | 2 +- .../src/views/components/imaging/umb-image-gravity.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js index d0ccc4647e..bb364b79ee 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/imaging/umbimagegravity.directive.js @@ -110,7 +110,7 @@ angular.module("umbraco.directives") scope.isCroppable = true; scope.hasDimensions = true; - if (scope.src !== "undefined") { + if (scope.src) { if (scope.src.endsWith(".svg")) { scope.isCroppable = false; scope.hasDimensions = false; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/imaging/umb-image-gravity.html b/src/Umbraco.Web.UI.Client/src/views/components/imaging/umb-image-gravity.html index ddb5ed2af1..620efb9e3f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/imaging/umb-image-gravity.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/imaging/umb-image-gravity.html @@ -5,7 +5,7 @@ -
+
From 21cb0f79c34d48b13f66c8a426a50c3191fba858 Mon Sep 17 00:00:00 2001 From: emmaburstow <37150989+emmaburstow@users.noreply.github.com> Date: Mon, 22 Oct 2018 17:19:59 +0100 Subject: [PATCH 02/75] Added dictionary item for member group save message (#3379) --- src/Umbraco.Web.UI/umbraco/config/lang/en.xml | 1 + src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index ff234c71da..6f17bb4e8a 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -1400,6 +1400,7 @@ To manage your website, simply open the Umbraco back office and start adding con Sent For Approval Changes have been sent for approval Media saved + Member group saved Media saved without any errors Member saved Stylesheet Property Saved 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 ed3a261979..ba32e7f7d1 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -1400,6 +1400,7 @@ To manage your website, simply open the Umbraco back office and start adding con Media saved Media saved without any errors Member saved + Member group saved Stylesheet Property Saved Stylesheet saved Template saved From b539cc2a7ad21e0126091c6610459ab097209bfb Mon Sep 17 00:00:00 2001 From: GwanYeong Kim Date: Tue, 23 Oct 2018 13:39:23 +0900 Subject: [PATCH 03/75] Remove this commented out code --- .../Persistence/SqlSyntax/MySqlSyntaxProvider.cs | 7 +------ src/Umbraco.Web/Controllers/UmbLoginController.cs | 1 - src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs | 3 +-- src/umbraco.cms/Actions/Action.cs | 1 - 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs b/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs index c3ad8f48c4..3e17294b3f 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs @@ -333,14 +333,9 @@ ORDER BY TABLE_NAME, INDEX_NAME", switch (systemMethod) { case SystemMethods.NewGuid: - return null; // NOT SUPPORTED! - //return "NEWID()"; + return null; // NOT SUPPORTED! case SystemMethods.CurrentDateTime: return "CURRENT_TIMESTAMP"; - //case SystemMethods.NewSequentialId: - // return "NEWSEQUENTIALID()"; - //case SystemMethods.CurrentUTCDateTime: - // return "GETUTCDATE()"; } return null; diff --git a/src/Umbraco.Web/Controllers/UmbLoginController.cs b/src/Umbraco.Web/Controllers/UmbLoginController.cs index d446df5683..df67be72ce 100644 --- a/src/Umbraco.Web/Controllers/UmbLoginController.cs +++ b/src/Umbraco.Web/Controllers/UmbLoginController.cs @@ -45,7 +45,6 @@ namespace Umbraco.Web.Controllers //redirect to current page by default return RedirectToCurrentUmbracoPage(); - //return RedirectToCurrentUmbracoUrl(); } } } diff --git a/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs b/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs index 36593736d3..348655d2ba 100644 --- a/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs +++ b/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs @@ -51,7 +51,6 @@ break; } - // constraintValue = condition.Property.Type == "string" ? string.Format("\"{0}\"", condition.ConstraintValue) : condition.ConstraintValue; } switch (condition.Term.Operathor) @@ -95,4 +94,4 @@ } } -} \ No newline at end of file +} diff --git a/src/umbraco.cms/Actions/Action.cs b/src/umbraco.cms/Actions/Action.cs index c7a9a6242b..7f65145412 100644 --- a/src/umbraco.cms/Actions/Action.cs +++ b/src/umbraco.cms/Actions/Action.cs @@ -62,7 +62,6 @@ namespace umbraco.BusinessLogic.Actions return ActionsResolver.Current.Actions .Where(x => !string.IsNullOrWhiteSpace(x.JsSource)) .Select(x => x.JsSource).ToList(); - //return ActionJsReference; } /// From 1080d983396905aa995f6fdb2ea7a03d6bca1a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Kottal?= Date: Mon, 22 Oct 2018 20:17:48 +0200 Subject: [PATCH 04/75] Fixes incorrect swedish translation --- src/Umbraco.Web.UI/umbraco/config/lang/sv.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml b/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml index 0795752fad..d011f7dadb 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml @@ -1,4 +1,4 @@ - + The Umbraco community @@ -437,7 +437,7 @@ nuvarande Inbäddning Hämta - valgt + valda Bakgrundsfärg From 7df6b661c5ff38ebc77e22a5130ec07c6ba932d3 Mon Sep 17 00:00:00 2001 From: Anders Bjerner Date: Tue, 23 Oct 2018 10:23:09 +0200 Subject: [PATCH 05/75] Mediatyperesource localized (#3378) --- .../common/resources/mediatype.resource.js | 536 +++++++++--------- .../src/views/mediatypes/create.controller.js | 3 +- .../src/views/mediatypes/create.html | 7 + src/Umbraco.Web.UI/umbraco/config/lang/da.xml | 4 + src/Umbraco.Web.UI/umbraco/config/lang/en.xml | 4 + .../umbraco/config/lang/en_us.xml | 4 + 6 files changed, 292 insertions(+), 266 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/mediatype.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/mediatype.resource.js index 140995cd57..2d74676d9c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/mediatype.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/mediatype.resource.js @@ -1,264 +1,272 @@ -/** - * @ngdoc service - * @name umbraco.resources.mediaTypeResource - * @description Loads in data for media types - **/ -function mediaTypeResource($q, $http, umbRequestHelper, umbDataFormatter) { - - return { - - getCount: function () { - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "mediaTypeApiBaseUrl", - "GetCount")), - 'Failed to retrieve count'); - }, - - getAvailableCompositeContentTypes: function (contentTypeId, filterContentTypes, filterPropertyTypes) { - if (!filterContentTypes) { - filterContentTypes = []; - } - if (!filterPropertyTypes) { - filterPropertyTypes = []; - } - - var query = { - contentTypeId: contentTypeId, - filterContentTypes: filterContentTypes, - filterPropertyTypes: filterPropertyTypes - }; - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "mediaTypeApiBaseUrl", - "GetAvailableCompositeMediaTypes"), - query), - 'Failed to retrieve data for content type id ' + contentTypeId); - }, - /** - * @ngdoc method - * @name umbraco.resources.mediaTypeResource#getWhereCompositionIsUsedInContentTypes - * @methodOf umbraco.resources.mediaTypeResource - * - * @description - * Returns a list of media types which use a specific composition with a given id - * - * ##usage - *
-         * mediaTypeResource.getWhereCompositionIsUsedInContentTypes(1234)
-         *    .then(function(mediaTypeList) {
-         *        console.log(mediaTypeList);
-         *    });
-         * 
- * @param {Int} contentTypeId id of the composition content type to retrieve the list of the media types where it has been used - * @returns {Promise} resourcePromise object. - * - */ - getWhereCompositionIsUsedInContentTypes: function (contentTypeId) { - var query = { - contentTypeId: contentTypeId - }; - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "mediaTypeApiBaseUrl", - "GetWhereCompositionIsUsedInContentTypes"), - query), - 'Failed to retrieve data for content type id ' + contentTypeId); - }, - /** - * @ngdoc method - * @name umbraco.resources.mediaTypeResource#getAllowedTypes - * @methodOf umbraco.resources.mediaTypeResource - * - * @description - * Returns a list of allowed media types underneath a media item with a given ID - * - * ##usage - *
-         * mediaTypeResource.getAllowedTypes(1234)
-         *    .then(function(array) {
-         *        $scope.type = type;
-         *    });
-         * 
- * @param {Int} mediaId id of the media item to retrive allowed child types for - * @returns {Promise} resourcePromise object. - * - */ - getAllowedTypes: function (mediaId) { - - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "mediaTypeApiBaseUrl", - "GetAllowedChildren", - [{ contentId: mediaId }])), - 'Failed to retrieve allowed types for media id ' + mediaId); - }, - - getById: function (id) { - - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "mediaTypeApiBaseUrl", - "GetById", - [{ id: id }])), - 'Failed to retrieve content type'); - }, - - getAll: function () { - - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "mediaTypeApiBaseUrl", - "GetAll")), - 'Failed to retrieve all content types'); - }, - - getScaffold: function (parentId) { - - return umbRequestHelper.resourcePromise( - $http.get( - umbRequestHelper.getApiUrl( - "mediaTypeApiBaseUrl", - "GetEmpty", { parentId: parentId })), - 'Failed to retrieve content type scaffold'); - }, - - deleteById: function (id) { - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "mediaTypeApiBaseUrl", - "DeleteById", - [{ id: id }])), - 'Failed to retrieve content type'); - }, - - deleteContainerById: function (id) { - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "mediaTypeApiBaseUrl", - "DeleteContainer", - [{ id: id }])), - 'Failed to delete content type contaier'); - }, - - /** - * @ngdoc method - * @name umbraco.resources.mediaTypeResource#save - * @methodOf umbraco.resources.mediaTypeResource - * - * @description - * Saves or update a media type - * - * @param {Object} content data type object to create/update - * @returns {Promise} resourcePromise object. - * - */ - save: function (contentType) { - - var saveModel = umbDataFormatter.formatContentTypePostData(contentType); - - return umbRequestHelper.resourcePromise( - $http.post(umbRequestHelper.getApiUrl("mediaTypeApiBaseUrl", "PostSave"), saveModel), - 'Failed to save data for content type id ' + contentType.id); - }, - - /** - * @ngdoc method - * @name umbraco.resources.mediaTypeResource#move - * @methodOf umbraco.resources.mediaTypeResource - * - * @description - * Moves a node underneath a new parentId - * - * ##usage - *
-         * mediaTypeResource.move({ parentId: 1244, id: 123 })
-         *    .then(function() {
-         *        alert("node was moved");
-         *    }, function(err){
-         *      alert("node didnt move:" + err.data.Message);
-         *    });
-         * 
- * @param {Object} args arguments object - * @param {Int} args.idd the ID of the node to move - * @param {Int} args.parentId the ID of the parent node to move to - * @returns {Promise} resourcePromise object. - * - */ - move: function (args) { - if (!args) { - throw "args cannot be null"; - } - if (!args.parentId) { - throw "args.parentId cannot be null"; - } - if (!args.id) { - throw "args.id cannot be null"; - } - - return umbRequestHelper.resourcePromise( - $http.post(umbRequestHelper.getApiUrl("mediaTypeApiBaseUrl", "PostMove"), - { - parentId: args.parentId, - id: args.id - }), - 'Failed to move content'); - }, - - copy: function (args) { - if (!args) { - throw "args cannot be null"; - } - if (!args.parentId) { - throw "args.parentId cannot be null"; - } - if (!args.id) { - throw "args.id cannot be null"; - } - - return umbRequestHelper.resourcePromise( - $http.post(umbRequestHelper.getApiUrl("mediaTypeApiBaseUrl", "PostCopy"), - { - parentId: args.parentId, - id: args.id - }), - 'Failed to copy content'); - }, - - createContainer: function(parentId, name) { - - return umbRequestHelper.resourcePromise( - $http.post( - umbRequestHelper.getApiUrl( - "mediaTypeApiBaseUrl", - "PostCreateContainer", - { parentId: parentId, name: encodeURIComponent(name) })), - 'Failed to create a folder under parent id ' + parentId); - }, - - renameContainer: function (id, name) { - - return umbRequestHelper.resourcePromise( - $http.post(umbRequestHelper.getApiUrl("mediaTypeApiBaseUrl", - "PostRenameContainer", - { id: id, name: name })), - "Failed to rename the folder with id " + id - ); - - } - - }; -} -angular.module('umbraco.resources').factory('mediaTypeResource', mediaTypeResource); +/** + * @ngdoc service + * @name umbraco.resources.mediaTypeResource + * @description Loads in data for media types + **/ +function mediaTypeResource($q, $http, umbRequestHelper, umbDataFormatter, localizationService) { + + return { + + getCount: function () { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "mediaTypeApiBaseUrl", + "GetCount")), + 'Failed to retrieve count'); + }, + + getAvailableCompositeContentTypes: function (contentTypeId, filterContentTypes, filterPropertyTypes) { + if (!filterContentTypes) { + filterContentTypes = []; + } + if (!filterPropertyTypes) { + filterPropertyTypes = []; + } + + var query = { + contentTypeId: contentTypeId, + filterContentTypes: filterContentTypes, + filterPropertyTypes: filterPropertyTypes + }; + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "mediaTypeApiBaseUrl", + "GetAvailableCompositeMediaTypes"), + query), + 'Failed to retrieve data for content type id ' + contentTypeId); + }, + /** + * @ngdoc method + * @name umbraco.resources.mediaTypeResource#getWhereCompositionIsUsedInContentTypes + * @methodOf umbraco.resources.mediaTypeResource + * + * @description + * Returns a list of media types which use a specific composition with a given id + * + * ##usage + *
+         * mediaTypeResource.getWhereCompositionIsUsedInContentTypes(1234)
+         *    .then(function(mediaTypeList) {
+         *        console.log(mediaTypeList);
+         *    });
+         * 
+ * @param {Int} contentTypeId id of the composition content type to retrieve the list of the media types where it has been used + * @returns {Promise} resourcePromise object. + * + */ + getWhereCompositionIsUsedInContentTypes: function (contentTypeId) { + var query = { + contentTypeId: contentTypeId + }; + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "mediaTypeApiBaseUrl", + "GetWhereCompositionIsUsedInContentTypes"), + query), + 'Failed to retrieve data for content type id ' + contentTypeId); + }, + /** + * @ngdoc method + * @name umbraco.resources.mediaTypeResource#getAllowedTypes + * @methodOf umbraco.resources.mediaTypeResource + * + * @description + * Returns a list of allowed media types underneath a media item with a given ID + * + * ##usage + *
+         * mediaTypeResource.getAllowedTypes(1234)
+         *    .then(function(array) {
+         *        $scope.type = type;
+         *    });
+         * 
+ * @param {Int} mediaId id of the media item to retrive allowed child types for + * @returns {Promise} resourcePromise object. + * + */ + getAllowedTypes: function (mediaId) { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "mediaTypeApiBaseUrl", + "GetAllowedChildren", + [{ contentId: mediaId }])), + 'Failed to retrieve allowed types for media id ' + mediaId); + }, + + getById: function (id) { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "mediaTypeApiBaseUrl", + "GetById", + [{ id: id }])), + 'Failed to retrieve content type'); + }, + + getAll: function () { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "mediaTypeApiBaseUrl", + "GetAll")), + 'Failed to retrieve all content types'); + }, + + getScaffold: function (parentId) { + + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "mediaTypeApiBaseUrl", + "GetEmpty", { parentId: parentId })), + 'Failed to retrieve content type scaffold'); + }, + + deleteById: function (id) { + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "mediaTypeApiBaseUrl", + "DeleteById", + [{ id: id }])), + 'Failed to retrieve content type'); + }, + + deleteContainerById: function (id) { + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "mediaTypeApiBaseUrl", + "DeleteContainer", + [{ id: id }])), + 'Failed to delete content type contaier'); + }, + + /** + * @ngdoc method + * @name umbraco.resources.mediaTypeResource#save + * @methodOf umbraco.resources.mediaTypeResource + * + * @description + * Saves or update a media type + * + * @param {Object} content data type object to create/update + * @returns {Promise} resourcePromise object. + * + */ + save: function (contentType) { + + var saveModel = umbDataFormatter.formatContentTypePostData(contentType); + + return umbRequestHelper.resourcePromise( + $http.post(umbRequestHelper.getApiUrl("mediaTypeApiBaseUrl", "PostSave"), saveModel), + 'Failed to save data for content type id ' + contentType.id); + }, + + /** + * @ngdoc method + * @name umbraco.resources.mediaTypeResource#move + * @methodOf umbraco.resources.mediaTypeResource + * + * @description + * Moves a node underneath a new parentId + * + * ##usage + *
+         * mediaTypeResource.move({ parentId: 1244, id: 123 })
+         *    .then(function() {
+         *        alert("node was moved");
+         *    }, function(err){
+         *      alert("node didnt move:" + err.data.Message);
+         *    });
+         * 
+ * @param {Object} args arguments object + * @param {Int} args.idd the ID of the node to move + * @param {Int} args.parentId the ID of the parent node to move to + * @returns {Promise} resourcePromise object. + * + */ + move: function (args) { + if (!args) { + throw "args cannot be null"; + } + if (!args.parentId) { + throw "args.parentId cannot be null"; + } + if (!args.id) { + throw "args.id cannot be null"; + } + + var promise = localizationService.localize("media_moveFailed"); + + return umbRequestHelper.resourcePromise( + $http.post(umbRequestHelper.getApiUrl("mediaTypeApiBaseUrl", "PostMove"), + { + parentId: args.parentId, + id: args.id + }), + promise); + }, + + copy: function (args) { + if (!args) { + throw "args cannot be null"; + } + if (!args.parentId) { + throw "args.parentId cannot be null"; + } + if (!args.id) { + throw "args.id cannot be null"; + } + + var promise = localizationService.localize("media_copyFailed"); + + return umbRequestHelper.resourcePromise( + $http.post(umbRequestHelper.getApiUrl("mediaTypeApiBaseUrl", "PostCopy"), + { + parentId: args.parentId, + id: args.id + }), + promise); + }, + + createContainer: function(parentId, name) { + + var promise = localizationService.localize("media_createFolderFailed", [parentId]); + + return umbRequestHelper.resourcePromise( + $http.post( + umbRequestHelper.getApiUrl( + "mediaTypeApiBaseUrl", + "PostCreateContainer", + { parentId: parentId, name: encodeURIComponent(name) })), + promise); + }, + + renameContainer: function (id, name) { + + var promise = localizationService.localize("media_renameFolderFailed", [id]); + + return umbRequestHelper.resourcePromise( + $http.post(umbRequestHelper.getApiUrl("mediaTypeApiBaseUrl", + "PostRenameContainer", + { id: id, name: name })), + promise + ); + + } + + }; +} +angular.module('umbraco.resources').factory('mediaTypeResource', mediaTypeResource); diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.controller.js b/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.controller.js index bc0cf854c6..4fa96b8585 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.controller.js @@ -37,8 +37,7 @@ function MediaTypesCreateController($scope, $location, navigationService, mediaT var section = appState.getSectionState("currentSection"); }, function(err) { - - //TODO: Handle errors + $scope.error = err; }); }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.html b/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.html index afcb1ef787..9f8b2e033f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.html @@ -27,6 +27,13 @@ ng-submit="createContainer()" val-form-manager> +
+
+
{{error.errorMsg}}
+
{{error.data.message}}
+
+
+ diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml index 886662d17f..271144c7ec 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml @@ -266,6 +266,10 @@ Kan ikke uploade denne fil, den har ikke en godkendt filtype Maks filstørrelse er Medie rod + Flytning af mediet fejlede + Kopiering af mediet fejlede + Oprettelse af mappen under parent med id %0% fejlede + Omdøbning af mappen med id %0% fejlede Opret et nyt medlem diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 6f17bb4e8a..af8c302aff 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -274,6 +274,10 @@ Cannot upload this file, it does not have an approved file type Max file size is Media root + Failed to move media + Failed to copy media + Failed to create a folder under parent id %0% + Failed to rename the folder with id %0% Create a new member 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 ba32e7f7d1..5355928f17 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -275,6 +275,10 @@ Cannot upload this file, it does not have an approved file type Max file size is Media root + Failed to move media + Failed to copy media + Failed to create a folder under parent id %0% + Failed to rename the folder with id %0% Create a new member From de42eaea44c24d0de01007aa9dff69da1b60cc94 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Mon, 22 Oct 2018 09:11:07 +0200 Subject: [PATCH 06/75] Move some padding around to fix unaligned labels and values --- src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx b/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx index 77deab2709..4358715836 100644 --- a/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx +++ b/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx @@ -19,7 +19,7 @@ .umb-dialog .umb-control-group .umb-el-wrap { overflow: hidden; } .umb-dialog .umb-control-group .umb-el-wrap label { float: left; width: 140px; font-weight: bold; } .umb-dialog .umb-control-group .umb-el-wrap label:after { content:":"; } - .umb-dialog .umb-control-group .umb-el-wrap .controls-row { float: left; width: 280px; padding-top: 8px; } + .umb-dialog .umb-control-group .umb-el-wrap .controls-row { float: left; width: 280px; padding-bottom: 8px; } .umb-dialog .umb-control-group .umb-el-wrap .controls-row select { width: auto; } @@ -118,4 +118,3 @@
- \ No newline at end of file From e0b44c90ff79f4e667b0c5f8d3098fe4fb87b38d Mon Sep 17 00:00:00 2001 From: angie1015 <42840450+angie1015@users.noreply.github.com> Date: Tue, 23 Oct 2018 06:55:31 -0700 Subject: [PATCH 07/75] Fixed minor typos --- .github/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/README.md b/.github/README.md index e8a9889916..6c3476ac77 100644 --- a/.github/README.md +++ b/.github/README.md @@ -19,7 +19,7 @@ Umbraco is a free open source Content Management System built on the ASP.NET pla For the first time on the Microsoft platform, there is a free user and developer friendly CMS that makes it quick and easy to create websites - or a breeze to build complex web applications. Umbraco has award-winning integration capabilities and supports ASP.NET MVC or Web Forms, including User and Custom Controls, out of the box. -Umbraco is not only loved by developers, but is a content editors dream. Enjoy intuitive editing tools, media management, responsive views and approval workflows to send your content live. +Umbraco is not only loved by developers, but is a content editor's dream. Enjoy intuitive editing tools, media management, responsive views and approval workflows to send your content live. Used by more than 443,000 active websites including Carlsberg, Segway, Amazon and Heinz and **The Official ASP.NET and IIS.NET website from Microsoft** ([https://asp.net](https://asp.net) / [https://iis.net](https://iis.net)), you can be sure that the technology is proven, stable and scales. Backed by the team at Umbraco HQ, and supported by a dedicated community of over 220,000 craftspeople globally, you can trust that Umbraco is a safe choice and is here to stay. @@ -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 intergrations. 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. From c0b713d0e4c6a8779933791709d883b79cf0e37d Mon Sep 17 00:00:00 2001 From: Jan Skovgaard Date: Tue, 23 Oct 2018 16:06:06 +0200 Subject: [PATCH 08/75] 3381 - Media picker: Trashed media warning looks weird (#3382) --- .../src/less/property-editors.less | 14 ++++++- .../mediapicker/mediapicker.controller.js | 12 +++--- .../mediapicker/mediapicker.html | 38 ++++++++++--------- 3 files changed, 40 insertions(+), 24 deletions(-) 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 412a87d909..e9f4acd120 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -235,6 +235,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 +345,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; } 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 bf7462942a..7b8445a4dc 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 2efed8b3e8..7e9568bdd2 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}} +
    • - +
    • From 39045b1edc2cfbdb7bfda2d85349d6ddb39d479d Mon Sep 17 00:00:00 2001 From: Jan Skovgaard Date: Tue, 23 Oct 2018 16:32:07 +0200 Subject: [PATCH 09/75] 3324 - Suggestion: Align image cropper property editor UI with color picker and checkbox lists (#3325) --- .../components/prevalues/multivalues.less | 4 + src/Umbraco.Web.UI.Client/src/less/main.less | 21 +++- .../src/less/property-editors.less | 115 ++++++++++++++++-- .../imagecropper.prevalues.controller.js | 50 ++++++-- .../imagecropper/imagecropper.prevalues.html | 105 ++++++++++------ src/Umbraco.Web.UI/umbraco/config/lang/en.xml | 2 - .../umbraco/config/lang/en_us.xml | 2 - src/Umbraco.Web.UI/umbraco/config/lang/es.xml | 2 - src/Umbraco.Web.UI/umbraco/config/lang/fr.xml | 1 - src/Umbraco.Web.UI/umbraco/config/lang/pl.xml | 2 - src/Umbraco.Web.UI/umbraco/config/lang/ru.xml | 2 - src/Umbraco.Web.UI/umbraco/config/lang/sv.xml | 2 - src/Umbraco.Web.UI/umbraco/config/lang/zh.xml | 2 - .../ImageCropperPropertyEditor.cs | 2 +- 14 files changed, 229 insertions(+), 83 deletions(-) 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 43f6697eb1..0dbc4c381c 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/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less index b16e437cc2..46f0f86d8d 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 e9f4acd120..0a3807e7e6 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 @@ -719,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; @@ -757,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; @@ -839,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/propertyeditors/imagecropper/imagecropper.prevalues.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.controller.js index 3a99c90a50..5a0b43d105 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.add = function (evt) { - evt.preventDefault(); + $scope.change = function () { + // Listen to the change event and set focus 2 false + if($scope.setFocus){ + $scope.setFocus = false; + return; + } + } - if ($scope.newItem && $scope.newItem.alias && + $scope.add = function (evt) { + evt.preventDefault(); + + $scope.editMode = false; + + $scope.setFocus = true; + + 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 62a5565d95..0be82ff52f 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 @@ -
      +
      +
      -
      -
        -
      • - - +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        + + + Cancel +
        - {{node.alias}} -
        {{node.width}}px × {{node.height}}px -
      • -
      -
      -

      Define crop

      -

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

      - -
      - - +
      +
      + +
      +

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

      +
      +
      + Edit + Remove +
      - -
      - - - × - -
      - -
      - - Cancel -
      -
      - -
      -
      diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index af8c302aff..5b14e03fae 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 5355928f17..791fc315ee 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 fed40e2d79..a41d17604b 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 b3d5edf512..7d20714ab6 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 98759d5851..9affa43727 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 8ebe8c0ef7..8e98566687 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 d011f7dadb..982f31e383 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 c2189ca928..a918b78f95 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/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs index 5196fda0ee..3d6a1727e4 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs @@ -229,7 +229,7 @@ namespace Umbraco.Web.PropertyEditors 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; } } From 1053a349f6ea2ebcd7421dbd37af9cbdc8f715f6 Mon Sep 17 00:00:00 2001 From: agrath Date: Wed, 24 Oct 2018 03:48:19 +1300 Subject: [PATCH 10/75] #3231 RTE editor in grid collapsed on tab shown (#3232) --- .../components/grid/grid.rte.directive.js | 15 ++++++++++++--- .../directives/validation/valtab.directive.js | 17 +++++++++++++---- 2 files changed, 25 insertions(+), 7 deletions(-) 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 e18137085b..5a68d36bc1 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 8d1fc60083..c5d7cb6e58 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); From 20c215ef8ca6831b94c1aae08f83e31e9fad7b30 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Tue, 23 Oct 2018 16:52:57 +0200 Subject: [PATCH 11/75] #3211 - Add colorpicker prevalue editor (#3212) --- .../less/components/umb-color-swatches.less | 14 ++-- .../views/components/umb-color-swatches.html | 2 +- .../prevalueeditors/colorpicker.controller.js | 64 +++++++++++++++++++ .../views/prevalueeditors/colorpicker.html | 18 ++++++ 4 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.controller.js create mode 100644 src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.html 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 43e62780a3..26a735508e 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/views/components/umb-color-swatches.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-color-swatches.html index 2bc7ce9622..3e92f5c18c 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/prevalueeditors/colorpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.controller.js new file mode 100644 index 0000000000..c588893d7c --- /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 0000000000..b5f77269b8 --- /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}} + + +
      From 9230de5383adc2c0bbd4af940d03abe887729c71 Mon Sep 17 00:00:00 2001 From: Jan Skovgaard Date: Tue, 23 Oct 2018 17:06:10 +0200 Subject: [PATCH 12/75] 3225 - Suggestion: Style the default browser radio button as a custom one to provide a nicer UI experience (#3226) --- src/Umbraco.Web.UI.Client/src/less/belle.less | 1 + .../components/umb-radiobuttons-list.less | 80 +++++++++++++++++++ .../radiobuttons/radiobuttons.html | 13 ++- 3 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/less/components/umb-radiobuttons-list.less diff --git a/src/Umbraco.Web.UI.Client/src/less/belle.less b/src/Umbraco.Web.UI.Client/src/less/belle.less index 7f10c3d4d7..9b9be85053 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/umb-radiobuttons-list.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-radiobuttons-list.less new file mode 100644 index 0000000000..2fe3487a8f --- /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/views/propertyeditors/radiobuttons/radiobuttons.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/radiobuttons/radiobuttons.html index cdb5a37ac8..7af6491641 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 +
      From 3e14da5e9db70b9fdf7c61209f71c94194874671 Mon Sep 17 00:00:00 2001 From: KimHolzmann Date: Tue, 23 Oct 2018 18:16:06 +0200 Subject: [PATCH 13/75] #2927 - Cannot use content templates in list views (#3173) --- .../listview/listview.controller.js | 44 +++++++++- .../propertyeditors/listview/listview.html | 82 +++++++++++++++---- 2 files changed, 109 insertions(+), 17 deletions(-) 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 272627dc7b..b335354bc4 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 2683317dc1..cdd7e9cab2 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 @@ -
      + + + + + + - + + + + + + + + - + From ee3cbf08a254dfb7111caf7d65b2b6ce68cb6663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Kottal?= Date: Tue, 23 Oct 2018 22:43:46 +0200 Subject: [PATCH 14/75] #3215 Adds ability to create template from doctype editor (#3366) ### Prerequisites - [x] I have [created an issue](https://github.com/umbraco/Umbraco-CMS/issues) for the proposed changes in this PR, the link is: #3215 - [x] I have added steps to test this contribution in the description below ### Description I added a button for creating a new template in the template view of the doctype editor. The button uses the template resource to fetch a template scaffold, and then save a new template. After saving, the template gets selected as allowed, and if there is no default template selected, the new template will also be the default. https://i.imgur.com/KQbmjGH.gifv --- .../views/templates/templates.controller.js | 45 +++++++++++++++---- .../views/templates/templates.html | 5 +++ 2 files changed, 42 insertions(+), 8 deletions(-) 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 fe1b0f0e7e..3ce795b01e 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 a1385102e4..c02bb78de7 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"> + +
      From 5f765967a6f9adf3b735c32fa8bac9f79558951d Mon Sep 17 00:00:00 2001 From: skoomasteve <43890114+skoomasteve@users.noreply.github.com> Date: Tue, 23 Oct 2018 15:47:14 -0500 Subject: [PATCH 15/75] Just a few spelling fixes. (#3405) --- build.bat | 2 +- src/umbraco.providers/members/UmbracoMembershipProvider.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.bat b/build.bat index 29a5e07a5a..3cab9283cf 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.providers/members/UmbracoMembershipProvider.cs b/src/umbraco.providers/members/UmbracoMembershipProvider.cs index 648bf5a0d5..ff6895fe20 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 @@ namespace umbraco.providers.members /// 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 @@ namespace umbraco.providers.members /// 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. From f69976852e6b8d19cfcfef44132004d7307b44df Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Tue, 23 Oct 2018 22:49:13 +0200 Subject: [PATCH 16/75] Disable move/copy button until a target node is selected (#3250) --- src/Umbraco.Web.UI.Client/src/views/content/copy.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/content/move.html | 6 +++--- src/Umbraco.Web.UI.Client/src/views/datatypes/move.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/documenttypes/copy.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/documenttypes/move.html | 4 ++-- .../src/views/media/media.move.controller.js | 4 +++- src/Umbraco.Web.UI.Client/src/views/media/move.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/mediatypes/copy.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/mediatypes/move.html | 4 ++-- 9 files changed, 20 insertions(+), 18 deletions(-) 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 e02855ea8f..62116a3e6e 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 f7978e01a5..09116a2a6d 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 0546cbff44..77746a5f42 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 97de821909..c9c4962da7 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 0af4cbfda7..58d897e91c 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/media/media.move.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.move.controller.js index 02cb3a363a..77e59cbbfa 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 b37b71b639..88c64f1992 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 77f50358c3..ddb2559ba2 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 c240925a7d..5dbac09147 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 @@ From df1c4faeb96b5538ccae8cd8dbb6d2c7b14fad37 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Wed, 24 Oct 2018 08:26:13 +0200 Subject: [PATCH 17/75] Create doctype collections under the chosen parent --- .../Editors/ContentTypeController.cs | 32 ++++--------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index ac58b764f0..3f6df5c4b7 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -209,20 +209,6 @@ namespace Umbraco.Web.Editors 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 @@ namespace Umbraco.Web.Editors // 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, From 05f5f2715baa519c6ee28ab7f7c9fe642913d3b7 Mon Sep 17 00:00:00 2001 From: Hemant Joshi Date: Wed, 24 Oct 2018 10:30:15 +0530 Subject: [PATCH 18/75] Added Correct Link of Getting Started with V8 --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6e421da5d7..6cbb764056 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! 🎉👍 From e7c55e6d702b728dc5618bb254c703f90a5dbda3 Mon Sep 17 00:00:00 2001 From: Joelvis Roman Date: Tue, 23 Oct 2018 23:07:35 +0100 Subject: [PATCH 19/75] Fix spelling mistake Fix spelling mistake --- .../src/common/services/navigation.service.js | 2 +- .../src/controllers/navigation.controller.js | 2 +- src/Umbraco.Web/Templates/TemplateRenderer.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 e617f62ed4..5b0706150c 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 0c6bcf941a..e0330bd555 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/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index d7d331d887..32b06880ec 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -169,7 +169,7 @@ namespace Umbraco.Web.Templates /// /// /// - /// 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 . From fa2bd54f77147ce8afdaeb64855aa08fd0bf7652 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 24 Oct 2018 11:05:05 +0200 Subject: [PATCH 20/75] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6cbb764056..51f9b1dd68 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -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. From 82622695928e4b8b2fb38446dee8f6e512391b12 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Wed, 24 Oct 2018 11:51:07 +0200 Subject: [PATCH 21/75] Make sure indexes are created as unique when using .Unique() syntax builder (#3319) (#3363) --- .../DefinitionFactory.cs | 6 ++-- .../IndexDefinition.cs | 7 ++++- .../Syntax/Alter/Column/AlterColumnBuilder.cs | 9 ++++-- .../Syntax/Alter/Table/AlterTableBuilder.cs | 7 +++-- .../Create/Column/CreateColumnBuilder.cs | 7 +++-- .../Syntax/Create/Index/CreateIndexBuilder.cs | 28 ++++++------------- .../Syntax/Create/Table/CreateTableBuilder.cs | 7 +++-- .../SqlCeSyntaxProviderTests.cs | 4 +-- 8 files changed, 36 insertions(+), 39 deletions(-) diff --git a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs index e3c35e01b4..5b38533c2b 100644 --- a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs +++ b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs @@ -158,9 +158,7 @@ namespace Umbraco.Core.Persistence.DatabaseModelDefinitions 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 @@ namespace Umbraco.Core.Persistence.DatabaseModelDefinitions 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 ec46d35780..963e0a8ad6 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 @@ namespace Umbraco.Core.Persistence.DatabaseModelDefinitions 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 a7077f2d35..b2b2dfd17f 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 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Column { 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 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Column 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 7a6ab8d47a..ad72176089 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 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Table { 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 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Table 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 d004cd1176..dad72c54ef 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 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Column { 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 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Column 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 4d1396ff79..2740014150 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 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Index } 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 86760b71bc..5c19634321 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 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Table { 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 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Table 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 105b3d0c11..2043feafc4 100644 --- a/src/Umbraco.Tests/Persistence/SyntaxProvider/SqlCeSyntaxProviderTests.cs +++ b/src/Umbraco.Tests/Persistence/SyntaxProvider/SqlCeSyntaxProviderTests.cs @@ -89,7 +89,7 @@ WHERE (([umbracoNode].[nodeObjectType] = @0))) x)".Replace(Environment.NewLine, 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 @@ WHERE (([umbracoNode].[nodeObjectType] = @0))) x)".Replace(Environment.NewLine, } } -} \ No newline at end of file +} From 0daf197066343212ea074ca70c6654543be6bcfe Mon Sep 17 00:00:00 2001 From: Jan van Helvoort Date: Thu, 25 Oct 2018 12:16:42 +0200 Subject: [PATCH 22/75] Unable to find suitable version for font-awesome (#3431) --- src/Umbraco.Web.UI.Client/bower.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/bower.json b/src/Umbraco.Web.UI.Client/bower.json index 5f94ecf629..6521ec301c 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": [ From c4ee9abe68b2ea7012ff565277a2faf2cdd08c3a Mon Sep 17 00:00:00 2001 From: Claus Date: Sat, 27 Oct 2018 12:51:05 +0200 Subject: [PATCH 23/75] adds internal methods for getting media entities through the entity repository/service without fetching all property data. ensures the trees use this method to avoid fetching property data in the media tree. --- .../Repositories/EntityRepository.cs | 43 +++++++++++++++---- src/Umbraco.Core/Services/EntityService.cs | 33 +++++++++++--- .../Trees/ContentTreeControllerBase.cs | 9 ++-- 3 files changed, 67 insertions(+), 18 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs b/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs index 40d35d2fee..ca6fc36e23 100644 --- a/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs @@ -331,24 +331,49 @@ namespace Umbraco.Core.Persistence.Repositories return list; } + /// + /// Gets entities by query. + /// Note that this will also fetch all property data for media items, which can cause performance problems + /// when used without paging, in sites with large amounts of data in cmsPropertyData. + /// + /// + /// + /// public virtual IEnumerable GetByQuery(IQuery query, Guid objectTypeId) { + return GetByQueryInternal(query, objectTypeId, true); + } - bool isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid; - bool isMedia = objectTypeId == Constants.ObjectTypes.MediaGuid; + /// + /// Gets entities by query without fetching property data. + /// This is supposed to be internal and can be used when getting all entities without paging, without causing + /// performance issues. + /// + /// + /// + /// + internal IEnumerable GetByQueryWithoutPropertyData(IQuery query, Guid objectTypeId) + { + return GetByQueryInternal(query, objectTypeId, false); + } + + internal IEnumerable GetByQueryInternal(IQuery query, Guid objectTypeId, bool includePropertyData) + { + var isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid; + var isMedia = objectTypeId == Constants.ObjectTypes.MediaGuid; var sqlClause = GetBaseWhere(GetBase, isContent, isMedia, null, objectTypeId); - + var translator = new SqlTranslator(sqlClause, query); var entitySql = translator.Translate(); var factory = new UmbracoEntityFactory(); - if (isMedia) + if (isMedia && includePropertyData) { var wheres = query.GetWhereClauses().ToArray(); - var mediaSql = GetFullSqlForMedia(entitySql.Append(GetGroupBy(isContent, true, false)), sql => + var mediaSql = GetFullSqlForMedia(entitySql.Append(GetGroupBy(isContent, isMedia, false)), sql => { //adds the additional filters foreach (var whereClause in wheres) @@ -365,21 +390,21 @@ namespace Umbraco.Core.Persistence.Repositories else { //use dynamic so that we can get ALL properties from the SQL so we can chuck that data into our AdditionalData - var finalSql = entitySql.Append(GetGroupBy(isContent, false)); + var finalSql = entitySql.Append(GetGroupBy(isContent, isMedia)); //query = read forward data reader, do not load everything into mem var dtos = _work.Database.Query(finalSql); var collection = new EntityDefinitionCollection(); foreach (var dto in dtos) { - collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, false)); + collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, isMedia)); } return collection.Select(x => x.BuildFromDynamic()).ToList(); } } #endregion - + #region Sql Statements @@ -851,4 +876,4 @@ namespace Umbraco.Core.Persistence.Repositories } #endregion } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Services/EntityService.cs b/src/Umbraco.Core/Services/EntityService.cs index b660927df3..ef316409a1 100644 --- a/src/Umbraco.Core/Services/EntityService.cs +++ b/src/Umbraco.Core/Services/EntityService.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; -using System.Text; -using Umbraco.Core.Cache; using Umbraco.Core.CodeAnnotations; using Umbraco.Core.Events; using Umbraco.Core.Logging; @@ -13,6 +11,7 @@ using Umbraco.Core.Models.Rdbms; using Umbraco.Core.Persistence; using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.Querying; +using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.UnitOfWork; namespace Umbraco.Core.Services @@ -285,15 +284,37 @@ namespace Umbraco.Core.Services /// UmbracoObjectType of the children to retrieve /// An enumerable list of objects public virtual IEnumerable GetChildren(int parentId, UmbracoObjectTypes umbracoObjectType) + { + return GetChildrenInternal(parentId, umbracoObjectType, true); + } + + /// + /// Gets a collection of children by the parent's Id and UmbracoObjectType without adding property data + /// + /// Id of the parent to retrieve children for + /// UmbracoObjectType of the children to retrieve + /// An enumerable list of objects + internal IEnumerable GetChildrenWithoutPropertyData(int parentId, UmbracoObjectTypes umbracoObjectType) + { + return GetChildrenInternal(parentId, umbracoObjectType, false); + } + + internal IEnumerable GetChildrenInternal(int parentId, UmbracoObjectTypes umbracoObjectType, bool includePropertyData) { var objectTypeId = umbracoObjectType.GetGuid(); - using (var uow = UowProvider.GetUnitOfWork(readOnly:true)) + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { var repository = RepositoryFactory.CreateEntityRepository(uow); var query = Query.Builder.Where(x => x.ParentId == parentId); - var contents = repository.GetByQuery(query, objectTypeId); - return contents; + if (includePropertyData) + return repository.GetByQuery(query, objectTypeId); + + // Not pretty having to cast the repository, but it is the only way to get to use an internal method that we + // do not want to make public on the interface. Unfortunately also prevents this from being unit tested. + // See this issue for details on why we need this: + // https://github.com/umbraco/Umbraco-CMS/issues/3457 + return ((EntityRepository)repository).GetByQueryWithoutPropertyData(query, objectTypeId); } } @@ -781,4 +802,4 @@ namespace Umbraco.Core.Services return node.NodeId; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index 55a430326c..ec0f0bf5aa 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using System.Net; using System.Net.Http; @@ -11,12 +10,12 @@ using Umbraco.Core; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Models.EntityBase; -using Umbraco.Core.Persistence; using Umbraco.Web.Models.Trees; using Umbraco.Web.WebApi.Filters; using umbraco; using umbraco.BusinessLogic.Actions; using System.Globalization; +using Umbraco.Core.Services; namespace Umbraco.Web.Trees { @@ -203,7 +202,11 @@ namespace Umbraco.Web.Trees entityId = entity.Id; } - return Services.EntityService.GetChildren(entityId, UmbracoObjectType).ToList(); + // Not pretty having to cast the service, but it is the only way to get to use an internal method that we + // do not want to make public on the interface. Unfortunately also prevents this from being unit tested. + // See this issue for details on why we need this: + // https://github.com/umbraco/Umbraco-CMS/issues/3457 + return ((EntityService)Services.EntityService).GetChildrenWithoutPropertyData(entityId, UmbracoObjectType).ToList(); } /// From c0109e05318c0a8672f74b1feb41c7a4a47936c6 Mon Sep 17 00:00:00 2001 From: Claus Date: Sat, 27 Oct 2018 13:02:21 +0200 Subject: [PATCH 24/75] whitespace --- src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs b/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs index ca6fc36e23..ce8c27e474 100644 --- a/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs @@ -359,7 +359,7 @@ namespace Umbraco.Core.Persistence.Repositories internal IEnumerable GetByQueryInternal(IQuery query, Guid objectTypeId, bool includePropertyData) { - var isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid; + var isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid; var isMedia = objectTypeId == Constants.ObjectTypes.MediaGuid; var sqlClause = GetBaseWhere(GetBase, isContent, isMedia, null, objectTypeId); From db3ae6c27dd2b05ef887bf36ba4025e9971babf1 Mon Sep 17 00:00:00 2001 From: Shyam Jalan Date: Sat, 27 Oct 2018 11:10:24 +0530 Subject: [PATCH 25/75] Added hyphenation to README at desired places --- .github/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/README.md b/.github/README.md index e8a9889916..fc401ecfd2 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 intergrations. 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 intergrations. 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). From 0a0dd025bfa32cf05531be3724d8e5130fa90d64 Mon Sep 17 00:00:00 2001 From: Pranjal Vyas <11768143+vyaspranjal33@users.noreply.github.com> Date: Tue, 30 Oct 2018 14:18:03 +0530 Subject: [PATCH 26/75] Update footer.tmpl.partial (#3481) --- apidocs/umbracotemplate/partials/footer.tmpl.partial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apidocs/umbracotemplate/partials/footer.tmpl.partial b/apidocs/umbracotemplate/partials/footer.tmpl.partial index 69f51a101f..7aac413bfd 100644 --- a/apidocs/umbracotemplate/partials/footer.tmpl.partial +++ b/apidocs/umbracotemplate/partials/footer.tmpl.partial @@ -7,7 +7,7 @@ Back to top - Copyright © 2016 Umbraco
Generated by DocFX
+ Copyright © 2016-present Umbraco
Generated by DocFX
From 9b6204eb7b51220fdb4b909d53edd1afad497701 Mon Sep 17 00:00:00 2001 From: sweta jena <38930598+swetajena98@users.noreply.github.com> Date: Tue, 30 Oct 2018 14:18:28 +0530 Subject: [PATCH 27/75] add a comma (#3480) --- .github/CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 51f9b1dd68..50d18ca1f9 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -16,9 +16,9 @@ This document gives you a quick overview on how to get started, we will link to ## Guidelines for contributions we welcome -Not all changes are wanted so on occassion we might close a PR without merging it. We will give you feedback why we can't accept your changes and we'll be nice about it, thanking you for spending your valueable time. +Not all changes are wanted, so on occassion we might close a PR without merging it. We will give you feedback why we can't accept your changes and we'll be nice about it, thanking you for spending your valueable time. -We have [documented what we consider small and large changes](CONTRIBUTION_GUIDELINES.md), make sure to talk to us before making large changes. +We have [documented what we consider small and large changes](CONTRIBUTION_GUIDELINES.md). Make sure to talk to us before making large changes. Remember, if an issue is in the `Up for grabs` list or you've asked for some feedback before you sent us a PR, your PR will not be closed as unwanted. From 8ed3a95a56313e2fef2ea7377032586741683ae2 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Sun, 28 Oct 2018 21:18:53 +0100 Subject: [PATCH 28/75] Fix #3204 and do some refactoring to avoid duplicate code --- .../Services/NotificationService.cs | 60 ++++--------------- 1 file changed, 10 insertions(+), 50 deletions(-) diff --git a/src/Umbraco.Core/Services/NotificationService.cs b/src/Umbraco.Core/Services/NotificationService.cs index cd94fd7ca7..07d6e4e9e5 100644 --- a/src/Umbraco.Core/Services/NotificationService.cs +++ b/src/Umbraco.Core/Services/NotificationService.cs @@ -58,54 +58,7 @@ namespace Umbraco.Core.Services if (entity is IContent == false) throw new NotSupportedException(); - var content = (IContent) entity; - - // lazily get previous version - IContentBase prevVersion = null; - - // do not load *all* users in memory at once - // do not load notifications *per user* (N+1 select) - // cannot load users & notifications in 1 query (combination btw User2AppDto and User2NodeNotifyDto) - // => get batches of users, get all their notifications in 1 query - // re. users: - // users being (dis)approved = not an issue, filtered in memory not in SQL - // users being modified or created = not an issue, ordering by ID, as long as we don't *insert* low IDs - // users being deleted = not an issue for GetNextUsers - var id = 0; - var nodeIds = content.Path.Split(',').Select(int.Parse).ToArray(); - const int pagesz = 400; // load batches of 400 users - do - { - // users are returned ordered by id, notifications are returned ordered by user id - var users = ((UserService) _userService).GetNextUsers(id, pagesz).Where(x => x.IsApproved).ToList(); - var notifications = GetUsersNotifications(users.Select(x => x.Id), action, nodeIds, Constants.ObjectTypes.DocumentGuid).ToList(); - if (notifications.Count == 0) break; - - var i = 0; - foreach (var user in users) - { - // continue if there's no notification for this user - if (notifications[i].UserId != user.Id) continue; // next user - - // lazy load prev version - if (prevVersion == null) - { - prevVersion = GetPreviousVersion(entity.Id); - } - - // queue notification - var req = CreateNotificationRequest(operatingUser, user, content, prevVersion, actionName, http, createSubject, createBody); - Enqueue(req); - - // skip other notifications for this user - while (i < notifications.Count && notifications[i++].UserId == user.Id) ; - if (i >= notifications.Count) break; // break if no more notifications - } - - // load more users if any - id = users.Count == pagesz ? users.Last().Id + 1 : -1; - - } while (id > 0); + SendNotifications(operatingUser, new[] { (IContent)entity }, action, actionName, http, createSubject, createBody); } /// @@ -154,7 +107,14 @@ namespace Umbraco.Core.Services // lazily get versions var prevVersionDictionary = new Dictionary(); - // see notes above + // do not load *all* users in memory at once + // do not load notifications *per user* (N+1 select) + // cannot load users & notifications in 1 query (combination btw User2AppDto and User2NodeNotifyDto) + // => get batches of users, get all their notifications in 1 query + // re. users: + // users being (dis)approved = not an issue, filtered in memory not in SQL + // users being modified or created = not an issue, ordering by ID, as long as we don't *insert* low IDs + // users being deleted = not an issue for GetNextUsers var id = 0; const int pagesz = 400; // load batches of 400 users do @@ -656,4 +616,4 @@ namespace Umbraco.Core.Services #endregion } -} \ No newline at end of file +} From 4e85ede436f36319b284d4bb1139201b7786545a Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Sun, 28 Oct 2018 20:36:37 +0100 Subject: [PATCH 29/75] Fix the notifications footer --- .../src/views/content/notify.html | 76 ++++++++++--------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/notify.html b/src/Umbraco.Web.UI.Client/src/views/content/notify.html index ec9b3d2b0d..cb12d92f08 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/notify.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/notify.html @@ -1,44 +1,46 @@
-
-
-
-
-
{{vm.saveError.errorMsg}}
-
{{vm.saveError.data.message}}
+
+
+ +
+
+
{{vm.saveError.errorMsg}}
+
{{vm.saveError.data.message}}
+
-
-
-
- {{currentNode.name}} +
+
+ {{currentNode.name}} +
-
-
-
-
Set your notification for {{ currentNode.name }}
- - - - +
+
+
Set your notification for {{ currentNode.name }}
+ + + + +
-
- - + +
+
+
From 5537163c9f1bf4a1ae34b787d9ef742077f11fc7 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 30 Oct 2018 15:19:48 +0100 Subject: [PATCH 30/75] remove debug data in colorpicker prevalue editor --- .../src/views/prevalueeditors/colorpicker.controller.js | 2 -- .../src/views/prevalueeditors/colorpicker.html | 4 ---- 2 files changed, 6 deletions(-) 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 index c588893d7c..b4381b699b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.controller.js @@ -56,8 +56,6 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.ColorPickerControl } 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 index b5f77269b8..7f3e6f0b05 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.html @@ -10,9 +10,5 @@ use-label="model.config.useLabel"> - {{model.items | json}} -

- {{model.value}} -
From 299af13c4208f22651dd4352c493e30e348d096e Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 30 Oct 2018 15:51:32 +0100 Subject: [PATCH 31/75] fixes the context menu node highlight bug --- .../components/tree/umbtreeitem.directive.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js index 93ea0d9ced..6d9ee31643 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtreeitem.directive.js @@ -135,11 +135,19 @@ angular.module("umbraco.directives") } //is this the current action node (this is not the same as the current selected node!) - var actionNode = appState.getMenuState("currentNode"); + var actionNode = appState.getMenuState("currentNode"); if(actionNode) { - if(actionNode.id === node.id) { + + if(actionNode.id === node.id && actionNode.id !== "-1") { css.push("active"); - } + } + + // special handling of root nodes with id -1 + // as there can be many nodes with id -1 in a tree we need to check the treeAlias instead + if(actionNode.id === "-1" && actionNode.metaData.treeAlias === node.metaData.treeAlias) { + css.push("active"); + } + } return css.join(" "); From 115de5854e5a5e88000837ea72fc523daa7f895b Mon Sep 17 00:00:00 2001 From: Anders Bjerner Date: Thu, 25 Oct 2018 19:22:56 +0200 Subject: [PATCH 32/75] Added new "CssClass" property to the "Tab" class --- src/Umbraco.Web/Models/ContentEditing/Tab.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Models/ContentEditing/Tab.cs b/src/Umbraco.Web/Models/ContentEditing/Tab.cs index dd1c73b418..bf276ec2b4 100644 --- a/src/Umbraco.Web/Models/ContentEditing/Tab.cs +++ b/src/Umbraco.Web/Models/ContentEditing/Tab.cs @@ -23,5 +23,8 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "properties")] public IEnumerable Properties { get; set; } + + [DataMember(Name = "cssClass")] + public string CssClass { get; set; } } -} \ No newline at end of file +} From 092d84a49d40bfc7557cb31d83bb2b4b04770811 Mon Sep 17 00:00:00 2001 From: Anders Bjerner Date: Thu, 25 Oct 2018 19:25:00 +0200 Subject: [PATCH 33/75] Exposed the "cssClass " property in the view --- .../src/views/components/tabs/umb-tabs-nav.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html b/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html index 96c4adf783..8a823ee69c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html @@ -1,5 +1,5 @@ From 1d87ceaacfa41acda0e93a6f7dfca6de9be3c19b Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Fri, 26 Oct 2018 19:22:50 +0200 Subject: [PATCH 34/75] Fix user email validation in IE and Edge by using ng-required instead of required on input type=email. --- .../src/views/users/views/user/details.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html b/src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html index d0acec1522..1cd81f3d1c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html +++ b/src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html @@ -19,7 +19,7 @@ name="email" id="email" val-email - required + ng-required="true" val-server-field="Email" /> Required From 44b837a9ec69960405e978f0f01a9a0fe98d0c09 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Wed, 24 Oct 2018 16:35:43 +0200 Subject: [PATCH 35/75] #3373 fixes error when going to forms section when forms is not installed --- src/Umbraco.Web/Trees/ApplicationTreeController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Trees/ApplicationTreeController.cs b/src/Umbraco.Web/Trees/ApplicationTreeController.cs index be77cc67f9..31272363ae 100644 --- a/src/Umbraco.Web/Trees/ApplicationTreeController.cs +++ b/src/Umbraco.Web/Trees/ApplicationTreeController.cs @@ -43,7 +43,7 @@ namespace Umbraco.Web.Trees //find all tree definitions that have the current application alias var appTrees = Services.ApplicationTreeService.GetApplicationTrees(application, onlyInitialized).ToArray(); - if (string.IsNullOrEmpty(tree) == false || appTrees.Length == 1 || appTrees.Any() == false) + if (string.IsNullOrEmpty(tree) == false || appTrees.Length == 1) { var apptree = string.IsNullOrEmpty(tree) == false ? appTrees.SingleOrDefault(x => x.Alias == tree) From a27cf7fb1be56befa7469e6eef936fe84080541c Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 30 Oct 2018 20:56:10 +0100 Subject: [PATCH 36/75] dont collapse color in color picker prevalues --- src/Umbraco.Web.UI.Client/src/less/property-editors.less | 1 + 1 file changed, 1 insertion(+) 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 0a3807e7e6..678db3f798 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -152,6 +152,7 @@ div.umb-codeeditor .umb-btn-toolbar { border-radius: 3px; margin-top: auto; margin-bottom: auto; + flex: 0 0 auto; } .handle { From 6b0f393a6519c49cdbffb8d4909be763b39fd4c4 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 30 Oct 2018 21:02:24 +0100 Subject: [PATCH 37/75] use opacity instead of gray to set border color for color swatches so colors don't look blurry --- .../src/less/components/umb-color-swatches.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 26a735508e..b396ebf860 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 @@ -3,7 +3,7 @@ flex-flow: row wrap; .umb-color-box { - border: 1px solid @gray-8; + border: 1px solid rgba(0,0,0,0.15); color: @white; cursor: pointer; padding: 1px; From 72f3739430fee37fcc4db220633b2ec9b7fc8ce5 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 30 Oct 2018 21:15:29 +0100 Subject: [PATCH 38/75] add pointer to list view content templates dropdown --- .../src/views/propertyeditors/listview/listview.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 cdd7e9cab2..a39228ef71 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 @@ -43,11 +43,11 @@
diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/create.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/create.html index b4818a51ab..7d373a7ace 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/create.html @@ -85,16 +85,16 @@ - - + + - - + + From 83b30809d277ad88103cc5d2fe60f126760ab212 Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 31 Oct 2018 11:20:15 +0100 Subject: [PATCH 41/75] Fixes uploading files with comma in the file name. --- .../views/propertyeditors/fileupload/fileupload.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js index 6591c30161..24813f5e73 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js @@ -118,7 +118,7 @@ function fileUploadController($scope, $element, $compile, imageHelper, fileManag for (var i = 0; i < args.files.length; i++) { //save the file object to the scope's files collection $scope.files.push({ alias: $scope.model.alias, file: args.files[i] }); - newVal += args.files[i].name.replace(',','-') + ","; + newVal += args.files[i].name.split(',').join('-') + ","; } //this is required to re-validate From ee431cdf6d1e3beb3cbaff3ca5c79f770333be81 Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 31 Oct 2018 12:44:00 +0100 Subject: [PATCH 42/75] Deleted unnecessary "drag and drop" info text. --- .../src/views/components/upload/umb-file-dropzone.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html b/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html index c5572fad27..211060c03f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html @@ -37,12 +37,6 @@
-
- - You can drag files here to upload - -
-
    From a32271f280660a0c1330507e29b0a78f50c238a4 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 31 Oct 2018 14:33:23 +0100 Subject: [PATCH 43/75] fixes position of nested content add item overlay --- .../less/components/umb-nested-content.less | 20 --------- .../nestedcontent/nestedcontent.controller.js | 42 +++++++++++-------- .../nestedcontent/nestedcontent.html | 36 ++++------------ 3 files changed, 33 insertions(+), 65 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-nested-content.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-nested-content.less index 5a11403bb3..df8977a2bf 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-nested-content.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-nested-content.less @@ -209,26 +209,6 @@ width: 99%; } -.usky-grid.umb-nested-content__node-type-picker { - .cell-tools-menu { - position: relative; - transform: translate(-50%, -25%); - } - - .elements li { - &:hover { - i { - color: @white !important; - } - } - - i { - // make sure the item icons shown are in the correct color according to their doc type icon instead of the grid editor item color - color: unset; - } - } -} - // this resolves the layout issue introduced in nested content in 7.12 with the addition of the input for link anchors // the attribute selector ensures the change only applies to the linkpicker overlay .form-horizontal .umb-nested-content--narrow [ng-controller*="Umbraco.Overlays.LinkPickerController"] .controls-row { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js index b77fe56564..9c3553e1ab 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js @@ -116,12 +116,6 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop $scope.showIcons = $scope.model.config.showIcons || true; $scope.wideMode = $scope.model.config.hideLabel == "1"; - $scope.overlayMenu = { - show: false, - style: {}, - showFilter: false - }; - // helper to force the current form into the dirty state $scope.setDirty = function () { if ($scope.propertyForm) { @@ -140,26 +134,46 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop $scope.closeNodeTypePicker(); }; - $scope.openNodeTypePicker = function (event) { + $scope.openNodeTypePicker = function ($event) { if ($scope.nodes.length >= $scope.maxItems) { return; } + $scope.overlayMenu = { + title: localizationService.localize('grid_insertControl'), + show: false, + style: {}, + filter: $scope.scaffolds.length > 15 ? true : false, + view: "itempicker", + event: $event, + submit: function(model) { + if(model && model.selectedItem) { + $scope.addNode(model.selectedItem.alias); + } + $scope.overlayMenu.show = false; + $scope.overlayMenu = null; + }, + close: function() { + $scope.overlayMenu.show = false; + $scope.overlayMenu = null; + } + }; + // this could be used for future limiting on node types - $scope.overlayMenu.scaffolds = []; + $scope.overlayMenu.availableItems = []; _.each($scope.scaffolds, function (scaffold) { - $scope.overlayMenu.scaffolds.push({ + $scope.overlayMenu.availableItems.push({ alias: scaffold.contentTypeAlias, name: scaffold.contentTypeName, icon: iconHelper.convertFromLegacyIcon(scaffold.icon) }); }); - if ($scope.overlayMenu.scaffolds.length == 0) { + if ($scope.overlayMenu.availableItems.length === 0) { return; } - if ($scope.overlayMenu.scaffolds.length == 1) { + if ($scope.overlayMenu.availableItems.length === 1) { // only one scaffold type - no need to display the picker $scope.addNode($scope.scaffolds[0].contentTypeAlias); return; @@ -168,10 +182,6 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop $scope.overlayMenu.show = true; }; - $scope.closeNodeTypePicker = function () { - $scope.overlayMenu.show = false; - }; - $scope.editNode = function (idx) { if ($scope.currentNode && $scope.currentNode.key == $scope.nodes[idx].key) { $scope.currentNode = undefined; @@ -358,8 +368,6 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop $scope.currentNode = $scope.nodes[0]; } - $scope.overlayMenu.showFilter = $scope.scaffolds.length > 15; - inited = true; } } diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.html index 9a5d75ae92..0117bac92d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.html @@ -42,33 +42,13 @@ -
    -
    -
    - -
    - - - - -
    -
    - + + + + From f73d55d49680937fe4fd57313080245dc13c4c40 Mon Sep 17 00:00:00 2001 From: bharanijayasuri <44368021+bharanijayasuri@users.noreply.github.com> Date: Wed, 31 Oct 2018 18:13:58 +0000 Subject: [PATCH 44/75] Change to "MoveToRecycleBinDo" function of the MediaService and IMediaService (#3453) --- src/Umbraco.Core/Services/IMediaService.cs | 10 ++++++ src/Umbraco.Core/Services/MediaService.cs | 32 ++++++++++++++++--- .../src/common/resources/media.resource.js | 17 ++++++++-- .../umbraco/config/lang/en_us.xml | 1 + src/Umbraco.Web/Editors/MediaController.cs | 25 +++++++++++---- 5 files changed, 71 insertions(+), 14 deletions(-) diff --git a/src/Umbraco.Core/Services/IMediaService.cs b/src/Umbraco.Core/Services/IMediaService.cs index 04683e5747..f5f136b789 100644 --- a/src/Umbraco.Core/Services/IMediaService.cs +++ b/src/Umbraco.Core/Services/IMediaService.cs @@ -26,6 +26,15 @@ namespace Umbraco.Core.Services /// Id of the User deleting the Media Attempt MoveToRecycleBin(IMedia media, int userId = 0); + /// + /// Moves an object to a new location + /// + /// The to move + /// Id of the Media's new Parent + /// Id of the User moving the Media + /// True if moving succeeded, otherwise False + Attempt Move(IMedia media, int parentId, int userId = 0); + /// /// Permanently deletes an object /// @@ -269,6 +278,7 @@ namespace Umbraco.Core.Services /// Id of the User moving the Media void Move(IMedia media, int parentId, int userId = 0); + /// /// Deletes an object by moving it to the Recycle Bin /// diff --git a/src/Umbraco.Core/Services/MediaService.cs b/src/Umbraco.Core/Services/MediaService.cs index 398cf9f1b0..3f13f18e87 100644 --- a/src/Umbraco.Core/Services/MediaService.cs +++ b/src/Umbraco.Core/Services/MediaService.cs @@ -465,7 +465,7 @@ namespace Umbraco.Core.Services return repository.GetByQuery(query); } } - + [Obsolete("Use the overload with 'long' parameter types instead")] [EditorBrowsable(EditorBrowsableState.Never)] public IEnumerable GetPagedChildren(int id, int pageIndex, int pageSize, out int totalChildren, @@ -758,19 +758,20 @@ namespace Umbraco.Core.Services /// The to move /// Id of the Media's new Parent /// Id of the User moving the Media - public void Move(IMedia media, int parentId, int userId = 0) + /// True if moving succeeded, otherwise False + public Attempt Move(IMedia media, int parentId, int userId = 0) { //TODO: This all needs to be on the repo layer in one transaction! if (media == null) throw new ArgumentNullException("media"); - + var evtMsgs = EventMessagesFactory.Get(); using (new WriteLock(Locker)) { //This ensures that the correct method is called if this method is used to Move to recycle bin. if (parentId == Constants.System.RecycleBinMedia) { MoveToRecycleBin(media, userId); - return; + return OperationStatus.Success(evtMsgs); } using (var uow = UowProvider.GetUnitOfWork()) @@ -781,8 +782,15 @@ namespace Umbraco.Core.Services var moveEventArgs = new MoveEventArgs(moveEventInfo); if (uow.Events.DispatchCancelable(Moving, this, moveEventArgs, "Moving")) { + if (moveEventArgs.Messages.Count > 0) + { + foreach (var message in moveEventArgs.Messages.GetAll()) + { + evtMsgs.Add(message); + } + } uow.Commit(); - return; + return OperationStatus.Cancelled(evtMsgs); ; } media.ParentId = parentId; @@ -816,6 +824,8 @@ namespace Umbraco.Core.Services Audit(uow, AuditType.Move, "Move Media performed by user", userId, media.Id); uow.Commit(); } + + return OperationStatus.Success(evtMsgs); } } @@ -1104,6 +1114,13 @@ namespace Umbraco.Core.Services var moveEventArgs = new MoveEventArgs(moveEventInfo); if (uow.Events.DispatchCancelable(Trashing, this, moveEventArgs, "Trashing")) { + if (moveEventArgs.Messages.Count > 0) + { + foreach (var message in moveEventArgs.Messages.GetAll()) + { + evtMsgs.Add(message); + } + } uow.Commit(); return OperationStatus.Cancelled(evtMsgs); } @@ -1468,6 +1485,11 @@ namespace Umbraco.Core.Services } } + void IMediaService.Move(IMedia media, int parentId, int userId) + { + Move(media, parentId, userId); + } + #region Event Handlers diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js index ca106cf65c..8c27f20aea 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js @@ -116,9 +116,20 @@ function mediaResource($q, $http, umbDataFormatter, umbRequestHelper) { { error: function(data){ var errorMsg = 'Failed to move media'; - - if(data.parentId === data.id){ - errorMsg = 'Media can\'t be moved into itself'; + if (data.id !== undefined && data.parentId !== undefined) { + if (data.id === data.parentId) { + errorMsg = 'Media can\'t be moved into itself'; + } + } + else if (data.notifications !== undefined) { + if (data.notifications.length > 0) { + if (data.notifications[0].header.length > 0) { + errorMsg = data.notifications[0].header; + } + if (data.notifications[0].message.length > 0) { + errorMsg = errorMsg + ": " + data.notifications[0].message; + } + } } return { 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 791fc315ee..b4c0602995 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -276,6 +276,7 @@ Max file size is Media root Failed to move media + Parent and destination folders cannot be the same Failed to copy media Failed to create a folder under parent id %0% Failed to rename the folder with id %0% diff --git a/src/Umbraco.Web/Editors/MediaController.cs b/src/Umbraco.Web/Editors/MediaController.cs index a7bc3c2707..e3f2365565 100644 --- a/src/Umbraco.Web/Editors/MediaController.cs +++ b/src/Umbraco.Web/Editors/MediaController.cs @@ -447,12 +447,25 @@ namespace Umbraco.Web.Editors public HttpResponseMessage PostMove(MoveOrCopy move) { var toMove = ValidateMoveOrCopy(move); + var destinationParentID = move.ParentId; + var sourceParentID = toMove.ParentId; + + var moveResult = Services.MediaService.WithResult().Move(toMove, move.ParentId); - Services.MediaService.Move(toMove, move.ParentId); - - var response = Request.CreateResponse(HttpStatusCode.OK); - response.Content = new StringContent(toMove.Path, Encoding.UTF8, "application/json"); - return response; + if (sourceParentID == destinationParentID) + { + return Request.CreateValidationErrorResponse(new SimpleNotificationModel(new Notification("",Services.TextService.Localize("media/moveToSameFolderFailed"),SpeechBubbleIcon.Error))); + } + if (moveResult == false) + { + return Request.CreateValidationErrorResponse(new SimpleNotificationModel()); + } + else + { + var response = Request.CreateResponse(HttpStatusCode.OK); + response.Content = new StringContent(toMove.Path, Encoding.UTF8, "application/json"); + return response; + } } /// @@ -942,4 +955,4 @@ namespace Umbraco.Web.Editors return hasPathAccess; } } -} \ No newline at end of file +} From 14e503d0e9494f905c7612dfff42736e8205c5d7 Mon Sep 17 00:00:00 2001 From: Poornima Nayar Date: Wed, 31 Oct 2018 18:19:46 +0000 Subject: [PATCH 45/75] 3492 Added a property "Tooltip" to the tabs which can then be set in the the EditorModel Events (#3493) --- .../views/components/tabs/umb-tabs-nav.html | 2 +- src/Umbraco.Web/Models/ContentEditing/Tab.cs | 63 ++++++++++--------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html b/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html index 8a823ee69c..f3e7279154 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html @@ -1,5 +1,5 @@ diff --git a/src/Umbraco.Web/Models/ContentEditing/Tab.cs b/src/Umbraco.Web/Models/ContentEditing/Tab.cs index bf276ec2b4..b87c15543b 100644 --- a/src/Umbraco.Web/Models/ContentEditing/Tab.cs +++ b/src/Umbraco.Web/Models/ContentEditing/Tab.cs @@ -1,30 +1,33 @@ -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace Umbraco.Web.Models.ContentEditing -{ - /// - /// Represents a tab in the UI - /// - [DataContract(Name = "tab", Namespace = "")] - public class Tab - { - [DataMember(Name = "id")] - public int Id { get; set; } - - [DataMember(Name = "active")] - public bool IsActive { get; set; } - - [DataMember(Name = "label")] - public string Label { get; set; } - - [DataMember(Name = "alias")] - public string Alias { get; set; } - - [DataMember(Name = "properties")] - public IEnumerable Properties { get; set; } - - [DataMember(Name = "cssClass")] - public string CssClass { get; set; } - } -} +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Represents a tab in the UI + /// + [DataContract(Name = "tab", Namespace = "")] + public class Tab + { + [DataMember(Name = "id")] + public int Id { get; set; } + + [DataMember(Name = "active")] + public bool IsActive { get; set; } + + [DataMember(Name = "label")] + public string Label { get; set; } + + [DataMember(Name = "alias")] + public string Alias { get; set; } + + [DataMember(Name = "properties")] + public IEnumerable Properties { get; set; } + + [DataMember(Name = "cssClass")] + public string CssClass { get; set; } + + [DataMember(Name = "tooltip")] + public string Tooltip { get; set; } + } +} From 4d5f952aa6b88c15e8757390a1efb65f2e811b78 Mon Sep 17 00:00:00 2001 From: Daniel Brereton Date: Tue, 30 Oct 2018 22:57:46 +0000 Subject: [PATCH 46/75] fixed typo --- .../src/controllers/navigation.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 e0330bd555..03511aa805 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js @@ -40,7 +40,7 @@ function NavigationController($scope, $rootScope, $location, $log, $routeParams, navigationService.showSearch(); }); - //trigger dialods with a hotkey: + //trigger dialogs with a hotkey: keyboardService.bind("esc", function () { eventsService.emit("app.closeDialogs"); }); @@ -112,7 +112,7 @@ function NavigationController($scope, $rootScope, $location, $log, $routeParams, $scope.authenticated = false; })); - //when the application is ready and the user is authorized setup the data + //when the application is ready and the user is authorized, setup the data evts.push(eventsService.on("app.ready", function(evt, data) { $scope.authenticated = true; })); From a09660128a90cea736dc9852293bd2907dcf80bb Mon Sep 17 00:00:00 2001 From: Warwick Buzacott Date: Mon, 15 Oct 2018 16:53:10 +1100 Subject: [PATCH 47/75] Fix for #3296. Large paged Listview sorted by custom property has blank custom properties --- .../Persistence/Repositories/VersionableRepositoryBase.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs index aa7566a4c3..12396dbbc6 100644 --- a/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs @@ -385,10 +385,12 @@ namespace Umbraco.Core.Persistence.Repositories if (orderDirection == Direction.Descending) { sortedSql.OrderByDescending("CustomPropData.CustomPropVal"); + sortedSql.OrderByDescending("umbracoNode.id"); } else { sortedSql.OrderBy("CustomPropData.CustomPropVal"); + sortedSql.OrderBy("umbracoNode.id"); } } From 557905580b1628d9e110b63c3cc0e73904aff9ba Mon Sep 17 00:00:00 2001 From: Warwick Buzacott Date: Fri, 26 Oct 2018 09:42:09 +1100 Subject: [PATCH 48/75] Fix for #3296: Adding comments --- .../Persistence/Repositories/VersionableRepositoryBase.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs index 12396dbbc6..5cbe84f780 100644 --- a/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs @@ -385,11 +385,15 @@ namespace Umbraco.Core.Persistence.Repositories if (orderDirection == Direction.Descending) { sortedSql.OrderByDescending("CustomPropData.CustomPropVal"); + // need to ensure ordering unique by using id as CustomPropVal may not be unique + // see: https://github.com/umbraco/Umbraco-CMS/issues/3296 sortedSql.OrderByDescending("umbracoNode.id"); } else { sortedSql.OrderBy("CustomPropData.CustomPropVal"); + // need to ensure ordering unique by using id as CustomPropVal may not be unique + // see: https://github.com/umbraco/Umbraco-CMS/issues/3296 sortedSql.OrderBy("umbracoNode.id"); } } From 26aec86850445254d7200c2c0850b66e2d84788a Mon Sep 17 00:00:00 2001 From: sofietoft Date: Thu, 25 Oct 2018 15:41:33 +0200 Subject: [PATCH 49/75] Update link to Our Forum --- .../src/views/dashboard/settings/settingsdashboardintro.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/settingsdashboardintro.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/settingsdashboardintro.html index 54bcf19abe..92bd96bea2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/settingsdashboardintro.html +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/settingsdashboardintro.html @@ -5,9 +5,9 @@

    Find out more:

      -
    • Read more about working with the Items in Settings in the Documentation section of Our Umbraco
    • +
    • Read more about working with the items in Settings in the Documentation section of Our Umbraco
    • Download the Editors Manual for details on working with the Umbraco UI
    • -
    • Ask a question in the Community Forum
    • +
    • Ask a question in the Community Forum
    • Watch our tutorial videos (some are free, some require a subscription)
    • Find out about our productivity boosting tools and commercial support
    • Find out about real-life training and certification opportunities
    • From 2cc440c7ffd0328b47cf3bb7811dc06dd8fe6963 Mon Sep 17 00:00:00 2001 From: Jesper Mayntzhusen Date: Thu, 25 Oct 2018 16:06:45 +0200 Subject: [PATCH 50/75] Prevent error label from moving input box --- .../src/less/forms/umb-validation-label.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/forms/umb-validation-label.less b/src/Umbraco.Web.UI.Client/src/less/forms/umb-validation-label.less index a57748c35e..d6aa183eed 100644 --- a/src/Umbraco.Web.UI.Client/src/less/forms/umb-validation-label.less +++ b/src/Umbraco.Web.UI.Client/src/less/forms/umb-validation-label.less @@ -1,5 +1,5 @@ .umb-validation-label { - position: relative; + position: absolute; padding: 1px 5px; background: @red; color: @white; From b7b24a6a3d912a4c855b98c0ecbf76d679c3a1ca Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 31 Oct 2018 19:43:30 +0100 Subject: [PATCH 51/75] #3246 - Consistency of macro page and other legacy pages (#3247) --- .../umbraco/developer/Macros/editMacro.aspx | 14 +++++++------- .../RelationTypes/EditRelationType.aspx.cs | 16 +++++++++------- .../umbraco/developer/Xslt/editXslt.aspx.cs | 4 ---- .../umbraco/settings/editLanguage.aspx.cs | 6 +++--- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx b/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx index 05bfab1115..177700d04e 100644 --- a/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx +++ b/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx @@ -113,7 +113,7 @@ -  Seconds +  Seconds @@ -158,7 +158,7 @@ Required
      - + @@ -170,10 +170,10 @@ Required
      Numbers only
      - + - + @@ -181,11 +181,11 @@ Required
      - + Required
      - + Required
      @@ -199,7 +199,7 @@ <%-- The macro parameter will automatically get sort order when created. --%> - + diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/EditRelationType.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/EditRelationType.aspx.cs index fba01a857d..b4e72082e1 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/EditRelationType.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/EditRelationType.aspx.cs @@ -4,6 +4,7 @@ using System.Web.UI; using System.Web.UI.WebControls; using umbraco.BasePages; using umbraco.BusinessLogic; +using umbraco.uicontrols; using Umbraco.Core; using Umbraco.Core.Models; using RelationType = umbraco.cms.businesslogic.relation.RelationType; @@ -191,14 +192,15 @@ namespace umbraco.cms.presentation.developer.RelationTypes relationTypeTabPage.Controls.Add(this.directionPane); relationTypeTabPage.Controls.Add(this.objectTypePane); - var saveMenuImageButton = tabControl.Menu.NewButton(); - saveMenuImageButton.ToolTip = "save relation type"; - saveMenuImageButton.Click +=saveMenuImageButton_Click; - saveMenuImageButton.CausesValidation = true; - saveMenuImageButton.Text = ui.Text("save"); - saveMenuImageButton.ValidationGroup = "RelationType"; + var save = tabControl.Menu.NewButton(); + save.Click +=saveMenuImageButton_Click; + save.CausesValidation = true; + save.Text = ui.Text("save"); + save.ButtonType = MenuButtonType.Primary; + save.ID = "save"; + save.ValidationGroup = "RelationType"; - var relationsTabPage = this.tabControl.NewTabPage("Relations"); + var relationsTabPage = this.tabControl.NewTabPage("Relations"); relationsTabPage.Controls.Add(this.relationsCountPane); relationsTabPage.Controls.Add(this.relationsPane); diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/editXslt.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/editXslt.aspx.cs index b1414ddb68..fe94628ebe 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/editXslt.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/editXslt.aspx.cs @@ -38,9 +38,6 @@ namespace umbraco.cms.presentation.developer .SetActiveTreeType(Constants.Trees.Xslt) .SyncTree(path, false); } - - - } protected override void OnInit(EventArgs e) @@ -48,7 +45,6 @@ namespace umbraco.cms.presentation.developer base.OnInit(e); SaveButton = UmbracoPanel1.Menu.NewButton(); - SaveButton.ToolTip = "Save Xslt File"; SaveButton.Text = ui.Text("save"); SaveButton.ButtonType = MenuButtonType.Primary; SaveButton.ID = "save"; diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs index bcb1a5f8db..4911e64e01 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs @@ -12,6 +12,7 @@ using System.Web.UI.HtmlControls; using umbraco.cms.presentation.Trees; using Umbraco.Core; using Umbraco.Web.Trees; +using umbraco.uicontrols; namespace umbraco.settings { @@ -83,10 +84,9 @@ namespace umbraco.settings Panel1.hasMenu = true; var save = Panel1.Menu.NewButton(); save.Click += save_click; - save.ToolTip = ui.Text("save"); save.Text = ui.Text("save"); - save.ID = "save"; - save.ButtonType = uicontrols.MenuButtonType.Primary; + save.ButtonType = MenuButtonType.Primary; + save.ID = "save"; Panel1.Text = ui.Text("language", "editLanguage"); From 1429053681f4b6852e8a331fa37af50606fa0c16 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 1 Nov 2018 13:12:47 +1100 Subject: [PATCH 52/75] Slight refactor and cleanup --- .../Persistence/Factories/MediaFactory.cs | 5 +- .../Repositories/EntityRepository.cs | 81 +++++++++++-------- src/Umbraco.Core/Services/EntityService.cs | 25 +++--- .../Trees/ContentTreeController.cs | 3 + .../Trees/ContentTreeControllerBase.cs | 13 +-- src/Umbraco.Web/Trees/MediaTreeController.cs | 9 ++- 6 files changed, 80 insertions(+), 56 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Factories/MediaFactory.cs b/src/Umbraco.Core/Persistence/Factories/MediaFactory.cs index 693aef594a..080a358657 100644 --- a/src/Umbraco.Core/Persistence/Factories/MediaFactory.cs +++ b/src/Umbraco.Core/Persistence/Factories/MediaFactory.cs @@ -140,6 +140,9 @@ namespace Umbraco.Core.Persistence.Factories /// internal static bool TryMatch(string text, out string mediaPath) { + //TODO: In v8 we should allow exposing this via the property editor in a much nicer way so that the property editor + // can tell us directly what any URL is for a given property if it contains an asset + mediaPath = null; if (string.IsNullOrWhiteSpace(text)) @@ -155,4 +158,4 @@ namespace Umbraco.Core.Persistence.Factories return true; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs b/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs index ce8c27e474..adfce25cce 100644 --- a/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs @@ -333,31 +333,15 @@ namespace Umbraco.Core.Persistence.Repositories /// /// Gets entities by query. + /// + /// + /// + /// + /// /// Note that this will also fetch all property data for media items, which can cause performance problems /// when used without paging, in sites with large amounts of data in cmsPropertyData. - ///
    - /// - /// - /// + /// public virtual IEnumerable GetByQuery(IQuery query, Guid objectTypeId) - { - return GetByQueryInternal(query, objectTypeId, true); - } - - /// - /// Gets entities by query without fetching property data. - /// This is supposed to be internal and can be used when getting all entities without paging, without causing - /// performance issues. - /// - /// - /// - /// - internal IEnumerable GetByQueryWithoutPropertyData(IQuery query, Guid objectTypeId) - { - return GetByQueryInternal(query, objectTypeId, false); - } - - internal IEnumerable GetByQueryInternal(IQuery query, Guid objectTypeId, bool includePropertyData) { var isContent = objectTypeId == Constants.ObjectTypes.DocumentGuid || objectTypeId == Constants.ObjectTypes.DocumentBlueprintGuid; var isMedia = objectTypeId == Constants.ObjectTypes.MediaGuid; @@ -369,11 +353,11 @@ namespace Umbraco.Core.Persistence.Repositories var factory = new UmbracoEntityFactory(); - if (isMedia && includePropertyData) + if (isMedia) { var wheres = query.GetWhereClauses().ToArray(); - var mediaSql = GetFullSqlForMedia(entitySql.Append(GetGroupBy(isContent, isMedia, false)), sql => + var mediaSql = GetFullSqlForMedia(entitySql.Append(GetGroupBy(isContent, true, false)), sql => { //adds the additional filters foreach (var whereClause in wheres) @@ -389,20 +373,47 @@ namespace Umbraco.Core.Persistence.Repositories } else { - //use dynamic so that we can get ALL properties from the SQL so we can chuck that data into our AdditionalData - var finalSql = entitySql.Append(GetGroupBy(isContent, isMedia)); - - //query = read forward data reader, do not load everything into mem - var dtos = _work.Database.Query(finalSql); - var collection = new EntityDefinitionCollection(); - foreach (var dto in dtos) - { - collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, isMedia)); - } - return collection.Select(x => x.BuildFromDynamic()).ToList(); + return GetByQueryInternal(entitySql, isContent, isMedia); } } + /// + /// Gets entities by query without fetching property data. + /// + /// + /// + /// + /// + /// This is supposed to be internal and can be used when getting all entities without paging, without causing + /// performance issues. + /// + internal IEnumerable GetMediaByQueryWithoutPropertyData(IQuery query) + { + var sqlClause = GetBaseWhere(GetBase, false, true, null, UmbracoObjectTypes.Media.GetGuid()); + + var translator = new SqlTranslator(sqlClause, query); + var entitySql = translator.Translate(); + + return GetByQueryInternal(entitySql, false, true); + } + + internal IEnumerable GetByQueryInternal(Sql entitySql, bool isContent, bool isMedia) + { + var factory = new UmbracoEntityFactory(); + + //use dynamic so that we can get ALL properties from the SQL so we can chuck that data into our AdditionalData + var finalSql = entitySql.Append(GetGroupBy(isContent, isMedia)); + + //query = read forward data reader, do not load everything into mem + var dtos = _work.Database.Query(finalSql); + var collection = new EntityDefinitionCollection(); + foreach (var dto in dtos) + { + collection.AddOrUpdate(new EntityDefinition(factory, dto, isContent, isMedia)); + } + return collection.Select(x => x.BuildFromDynamic()).ToList(); + } + #endregion diff --git a/src/Umbraco.Core/Services/EntityService.cs b/src/Umbraco.Core/Services/EntityService.cs index ef316409a1..1e44bec909 100644 --- a/src/Umbraco.Core/Services/EntityService.cs +++ b/src/Umbraco.Core/Services/EntityService.cs @@ -285,39 +285,36 @@ namespace Umbraco.Core.Services /// An enumerable list of objects public virtual IEnumerable GetChildren(int parentId, UmbracoObjectTypes umbracoObjectType) { - return GetChildrenInternal(parentId, umbracoObjectType, true); + var objectTypeId = umbracoObjectType.GetGuid(); + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateEntityRepository(uow); + var query = Query.Builder.Where(x => x.ParentId == parentId); + return repository.GetByQuery(query, objectTypeId); + } } /// /// Gets a collection of children by the parent's Id and UmbracoObjectType without adding property data /// /// Id of the parent to retrieve children for - /// UmbracoObjectType of the children to retrieve /// An enumerable list of objects - internal IEnumerable GetChildrenWithoutPropertyData(int parentId, UmbracoObjectTypes umbracoObjectType) + internal IEnumerable GetMediaChildrenWithoutPropertyData(int parentId) { - return GetChildrenInternal(parentId, umbracoObjectType, false); - } - - internal IEnumerable GetChildrenInternal(int parentId, UmbracoObjectTypes umbracoObjectType, bool includePropertyData) - { - var objectTypeId = umbracoObjectType.GetGuid(); + var objectTypeId = UmbracoObjectTypes.Media.GetGuid(); using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { var repository = RepositoryFactory.CreateEntityRepository(uow); var query = Query.Builder.Where(x => x.ParentId == parentId); - if (includePropertyData) - return repository.GetByQuery(query, objectTypeId); - // Not pretty having to cast the repository, but it is the only way to get to use an internal method that we // do not want to make public on the interface. Unfortunately also prevents this from being unit tested. // See this issue for details on why we need this: // https://github.com/umbraco/Umbraco-CMS/issues/3457 - return ((EntityRepository)repository).GetByQueryWithoutPropertyData(query, objectTypeId); + return ((EntityRepository)repository).GetMediaByQueryWithoutPropertyData(query); } } - + /// /// Returns a paged collection of children /// diff --git a/src/Umbraco.Web/Trees/ContentTreeController.cs b/src/Umbraco.Web/Trees/ContentTreeController.cs index 6cb13aa847..c3fe7df483 100644 --- a/src/Umbraco.Web/Trees/ContentTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTreeController.cs @@ -207,6 +207,9 @@ namespace Umbraco.Web.Trees return HasPathAccess(entity, queryStrings); } + internal override IEnumerable GetChildrenFromEntityService(int entityId) + => Services.EntityService.GetChildren(entityId, UmbracoObjectType).ToList(); + /// /// Returns a collection of all menu items that can be on a content node /// diff --git a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs index ec0f0bf5aa..006355eb35 100644 --- a/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web/Trees/ContentTreeControllerBase.cs @@ -202,13 +202,16 @@ namespace Umbraco.Web.Trees entityId = entity.Id; } - // Not pretty having to cast the service, but it is the only way to get to use an internal method that we - // do not want to make public on the interface. Unfortunately also prevents this from being unit tested. - // See this issue for details on why we need this: - // https://github.com/umbraco/Umbraco-CMS/issues/3457 - return ((EntityService)Services.EntityService).GetChildrenWithoutPropertyData(entityId, UmbracoObjectType).ToList(); + return GetChildrenFromEntityService(entityId); } + /// + /// Abstract method to fetch the entities from the entity service + /// + /// + /// + internal abstract IEnumerable GetChildrenFromEntityService(int entityId); + /// /// Returns true or false if the current user has access to the node based on the user's allowed start node (path) access /// diff --git a/src/Umbraco.Web/Trees/MediaTreeController.cs b/src/Umbraco.Web/Trees/MediaTreeController.cs index 932ced9616..708357d66d 100644 --- a/src/Umbraco.Web/Trees/MediaTreeController.cs +++ b/src/Umbraco.Web/Trees/MediaTreeController.cs @@ -173,5 +173,12 @@ namespace Umbraco.Web.Trees { return _treeSearcher.ExamineSearch(Umbraco, query, UmbracoEntityTypes.Media, pageSize, pageIndex, out totalFound, searchFrom); } + + internal override IEnumerable GetChildrenFromEntityService(int entityId) + // Not pretty having to cast the service, but it is the only way to get to use an internal method that we + // do not want to make public on the interface. Unfortunately also prevents this from being unit tested. + // See this issue for details on why we need this: + // https://github.com/umbraco/Umbraco-CMS/issues/3457 + => ((EntityService)Services.EntityService).GetMediaChildrenWithoutPropertyData(entityId).ToList(); } -} \ No newline at end of file +} From ffd08d0a2ef259f0772da32577d4a7b7232da75b Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 1 Nov 2018 14:56:55 +1100 Subject: [PATCH 53/75] Fixes unit test --- src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs index f401832020..8343aecbd0 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs @@ -19,7 +19,9 @@ namespace Umbraco.Web.Models.Mapping .ForMember(tab => tab.Label, expression => expression.MapFrom(@group => @group.Name)) .ForMember(tab => tab.IsActive, expression => expression.UseValue(true)) .ForMember(tab => tab.Properties, expression => expression.Ignore()) - .ForMember(tab => tab.Alias, expression => expression.Ignore()); + .ForMember(tab => tab.Alias, expression => expression.Ignore()) + .ForMember(tab => tab.CssClass, expression => expression.Ignore()) + .ForMember(tab => tab.Tooltip, expression => expression.Ignore()); //FROM Property TO ContentPropertyBasic config.CreateMap() From ae5e549a8e63ca4969c3264966d25de42f6d088a Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 1 Nov 2018 10:40:42 +0100 Subject: [PATCH 54/75] Only show "Add Template" button if the template does not currently exists. --- .../views/templates/templates.controller.js | 43 +++++++++++-------- .../views/templates/templates.html | 2 +- 2 files changed, 25 insertions(+), 20 deletions(-) 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 3ce795b01e..82f13dcc9f 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 @@ -6,7 +6,7 @@ * @description * The controller for the content type editor templates sub view */ -(function() { +(function () { 'use strict'; function TemplatesController($scope, entityResource, contentTypeHelper, templateResource, $routeParams) { @@ -16,6 +16,7 @@ var vm = this; vm.availableTemplates = []; + vm.canCreateTemplate = false; vm.updateTemplatePlaceholder = false; @@ -31,15 +32,9 @@ }); function init(callback) { + checkIfTemplateExists(); - entityResource.getAll("Template").then(function(templates){ - - vm.availableTemplates = templates; - - callback(); - - }); - + callback(); } vm.createTemplate = function () { @@ -50,21 +45,31 @@ templateResource.save(template).then(function (savedTemplate) { - init(function () { + vm.availableTemplates.push(savedTemplate); + vm.canCreateTemplate = false; - var newTemplate = vm.availableTemplates.filter(function (t) { return t.id === savedTemplate.id }); - if (newTemplate.length > 0) { - $scope.model.allowedTemplates.push(newTemplate[0]); + $scope.model.allowedTemplates.push(savedTemplate); - if ($scope.model.defaultTemplate === null) { - $scope.model.defaultTemplate = newTemplate[0]; - } - } - - }); + if ($scope.model.defaultTemplate === null) { + $scope.model.defaultTemplate = savedTemplate; + } }); + }); + }; + + function checkIfTemplateExists() { + entityResource.getAll("Template").then(function (templates) { + + vm.availableTemplates = templates; + + var existingTemplate = vm.availableTemplates.find(function (availableTemplate) { + return availableTemplate.name === $scope.model.name; + }); + + vm.canCreateTemplate = existingTemplate ? false : true; + }); } 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 c02bb78de7..0f7387e855 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 @@ -17,7 +17,7 @@ update-placeholder="vm.updateTemplatePlaceholder"> - From 54d6d581f165bc4e6c9bc5be5b2c0a6dcafff195 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 1 Nov 2018 11:27:08 +0100 Subject: [PATCH 55/75] removed unused function --- .../propertyeditors/nestedcontent/nestedcontent.controller.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js index 9c3553e1ab..0dcfc99238 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.controller.js @@ -130,8 +130,6 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop $scope.currentNode = newNode; $scope.setDirty(); - - $scope.closeNodeTypePicker(); }; $scope.openNodeTypePicker = function ($event) { From acd47ed143c215bf4e3deec4643511a02a3e23c4 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 1 Nov 2018 16:52:54 +0100 Subject: [PATCH 56/75] Update PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6275d161dc..8cb9017518 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,12 @@ ### Prerequisites -- [ ] I have [created an issue](https://github.com/umbraco/Umbraco-CMS/issues) for the proposed changes in this PR, the link is: - [ ] I have added steps to test this contribution in the description below +If there's an existing issue for this PR then this fixes: + ### Description - - + + From 0315e9f3384a37ece99b2a85a7daca9febcdbcec Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 1 Nov 2018 16:54:11 +0100 Subject: [PATCH 57/75] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 50d18ca1f9..96014f65b7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -36,7 +36,7 @@ Great question! The short version goes like this: * **Build** - build your fork of Umbraco locally as described in [building Umbraco from source code](BUILD.md) * **Change** - make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](#questions) - * **Commit** - done? Yay! 🎉 It is recommended to create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-U4-12345`. This means it's a temporary branch for the particular issue you're working on, in this case `U4-12345` + * **Commit** - done? Yay! 🎉 It is recommended to create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-12345`. This means it's a temporary branch for the particular issue you're working on, in this case `12345` * **Push** - great, now you can push the changes up to your fork on GitHub * **Create pull request** - exciting! You're ready to show us your changes (or not quite ready, you just need some feedback to progress). GitHub has picked up on the new branch you've pushed and will offer to create a Pull Request. Click that green button and away you go. From 1864dd8240d748d1bf9aafc1be357051159c69a9 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 1 Nov 2018 16:56:10 +0100 Subject: [PATCH 58/75] Update CONTRIBUTING_DETAILED.md --- .github/CONTRIBUTING_DETAILED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING_DETAILED.md b/.github/CONTRIBUTING_DETAILED.md index a07539da6a..b3e34ef55d 100644 --- a/.github/CONTRIBUTING_DETAILED.md +++ b/.github/CONTRIBUTING_DETAILED.md @@ -25,7 +25,7 @@ When contributing code to Umbraco there's plenty of things you'll want to know, ### Reporting Bugs This section guides you through submitting a bug report for Umbraco CMS. Following these guidelines helps maintainers and the community understand your report 📝, reproduce the behavior 💻 💻, and find related reports 🔎. -Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](http://issues.umbraco.org/issues#newissue=61-30118), the information it asks for helps us resolve issues faster. +Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](https://github.com/umbraco/Umbraco-CMS/issues/new/choose), the information it asks for helps us resolve issues faster. > **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. From 9077eac698c762344d8615d69fb0df5042308236 Mon Sep 17 00:00:00 2001 From: Stephanie Youstra Date: Sat, 3 Nov 2018 04:52:51 -0400 Subject: [PATCH 59/75] Various grammar fixes to README.md (#3496) --- .github/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/README.md b/.github/README.md index e84f499c72..463fc87450 100644 --- a/.github/README.md +++ b/.github/README.md @@ -4,7 +4,7 @@ _Looking for Umbraco version 8? [Click here](https://github.com/umbraco/Umbraco- Umbraco CMS =========== -The friendliest, most flexible and fastest growing ASP.NET CMS used by more than 443,000 websites worldwide: [https://umbraco.com](https://umbraco.com) +The friendliest, most flexible and fastest growing ASP.NET CMS, and used by more than 443,000 websites worldwide: [https://umbraco.com](https://umbraco.com) [![ScreenShot](img/vimeo.png)](https://vimeo.com/172382998/) @@ -17,34 +17,34 @@ Umbraco is a free open source Content Management System built on the ASP.NET pla ## Umbraco - The Friendly CMS -For the first time on the Microsoft platform, there is a free user and developer friendly CMS that makes it quick and easy to create websites - or a breeze to build complex web applications. Umbraco has award-winning integration capabilities and supports ASP.NET MVC or Web Forms, including User and Custom Controls, out of the box. +For the first time on the Microsoft platform, there is a free user- and developer-friendly CMS that makes it quick and easy to create websites - and a breeze to build complex web applications. Umbraco has award-winning integration capabilities and supports ASP.NET MVC or Web Forms, including User and Custom Controls, right out of the box. -Umbraco is not only loved by developers, but is a content editor's dream. Enjoy intuitive editing tools, media management, responsive views and approval workflows to send your content live. +Umbraco is not only loved by developers, but is a content editor's dream. Enjoy intuitive editing tools, media management, responsive views, and approval workflows to send your content live. -Used by more than 443,000 active websites including Carlsberg, Segway, Amazon and Heinz and **The Official ASP.NET and IIS.NET website from Microsoft** ([https://asp.net](https://asp.net) / [https://iis.net](https://iis.net)), you can be sure that the technology is proven, stable and scales. Backed by the team at Umbraco HQ, and supported by a dedicated community of over 220,000 craftspeople globally, you can trust that Umbraco is a safe choice and is here to stay. +Used by more than 443,000 active websites including Carlsberg, Segway, Amazon and Heinz and **The Official ASP.NET and IIS.NET website from Microsoft** ([https://asp.net](https://asp.net) / [https://iis.net](https://iis.net)), you can be sure that the technology is proven, stable and scalable. Backed by the team at Umbraco HQ, and supported by a dedicated community of over 220,000 craftspeople globally, you can trust that Umbraco is a safe choice and is here to stay. To view more examples, please visit [https://umbraco.com/case-studies-testimonials/](https://umbraco.com/case-studies-testimonials/) ## Why Open Source? -As an Open Source platform, Umbraco is more than just a CMS. We are transparent with our roadmap for future versions, our incremental sprint planning notes are publicly accessible and community contributions and packages are available for all to use. +As an Open Source platform, Umbraco is more than just a CMS. We are transparent with our roadmap for future versions, our incremental sprint planning notes are publicly accessible, and community contributions and packages are available for all to use. ## 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. +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 it yourself, and handling deployments and upgrades will be all up to you. ## Community -Our friendly community is available 24/7 at the community hub we call ["Our Umbraco"](https://our.umbraco.com). Our Umbraco feature forums for questions and answers, documentation, downloadable plugins for Umbraco and a rich collection of community resources. +Our friendly community is available 24/7 at the community hub we call ["Our Umbraco"](https://our.umbraco.com). Our Umbraco features forums for questions and answers, documentation, downloadable plugins for Umbraco, and a rich collection of community resources. ## Contribute to Umbraco -Umbraco is contribution focused and community driven. If you want to contribute back to Umbraco please check out our [guide to contributing](CONTRIBUTING.md). +Umbraco is contribution-focused and community-driven. If you want to contribute back to Umbraco, please check out our [guide to contributing](CONTRIBUTING.md). ## Found a bug? -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). +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). From acd067bb4e09ba2611f631ae4787fa749f61dde7 Mon Sep 17 00:00:00 2001 From: elitsa Date: Mon, 5 Nov 2018 10:07:50 +0100 Subject: [PATCH 60/75] Fixes a reflected XSS issue due to a parameter consumed directly from the request. --- .../umbraco/dialogs/editMacro.aspx | 2 +- src/Umbraco.Web/HttpRequestExtensions.cs | 113 +++++++++--------- 2 files changed, 58 insertions(+), 57 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/dialogs/editMacro.aspx b/src/Umbraco.Web.UI/umbraco/dialogs/editMacro.aspx index c9225ac7c1..75a7ef40e0 100644 --- a/src/Umbraco.Web.UI/umbraco/dialogs/editMacro.aspx +++ b/src/Umbraco.Web.UI/umbraco/dialogs/editMacro.aspx @@ -17,7 +17,7 @@ Umbraco.Dialogs.EditMacro.getInstance().init({ useAspNetMasterPages: <%=UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages.ToString().ToLower() %>, codeEditorElementId: "<%=Request.CleanForXss("objectId") %>", - renderingEngine: "<%=Request.GetItemAsString("renderingEngine", "Mvc")%>", + renderingEngine: "<%=Request.CleanForXss("renderingEngine", "Mvc")%>", macroAlias: '<%= _macroAlias %>' }); }); diff --git a/src/Umbraco.Web/HttpRequestExtensions.cs b/src/Umbraco.Web/HttpRequestExtensions.cs index d7f9e409c8..b099ce69ee 100644 --- a/src/Umbraco.Web/HttpRequestExtensions.cs +++ b/src/Umbraco.Web/HttpRequestExtensions.cs @@ -10,74 +10,75 @@ namespace Umbraco.Web /// Extension methods for the HttpRequest and HttpRequestBase objects ///
public static class HttpRequestExtensions - { + { /// /// Extracts the value from the query string and cleans it to prevent xss attacks. /// /// /// + /// /// - public static string CleanForXss(this HttpRequest request, string key) + public static string CleanForXss(this HttpRequest request, string key, string valueIfNotFound = "") { - var item = request.GetItemAsString(key); + var item = request.GetItemAsString(key, valueIfNotFound); return item.CleanForXss(); } - /// - /// Safely get a request item as string, if the item does not exist, an empty string is returned. - /// - /// - /// - /// The value to return if the key is not found in the collection - /// - public static string GetItemAsString(this HttpRequest request, string key, string valueIfNotFound = "") - { - return new HttpRequestWrapper(request).GetItemAsString(key, valueIfNotFound); - } + /// + /// Safely get a request item as string, if the item does not exist, an empty string is returned. + /// + /// + /// + /// The value to return if the key is not found in the collection + /// + public static string GetItemAsString(this HttpRequest request, string key, string valueIfNotFound = "") + { + return new HttpRequestWrapper(request).GetItemAsString(key, valueIfNotFound); + } - /// - /// Safely get a request item as string, if the item does not exist, an empty string is returned. - /// - /// - /// - /// The value to return if the key is not found in the collection - /// - public static string GetItemAsString(this HttpRequestBase request, string key, string valueIfNotFound = "") - { - var val = request[key]; - return !val.IsNullOrWhiteSpace() ? val : valueIfNotFound; - } + /// + /// Safely get a request item as string, if the item does not exist, an empty string is returned. + /// + /// + /// + /// The value to return if the key is not found in the collection + /// + public static string GetItemAsString(this HttpRequestBase request, string key, string valueIfNotFound = "") + { + var val = request[key]; + return !val.IsNullOrWhiteSpace() ? val : valueIfNotFound; + } - /// - /// Safely get the item from the query string and convert it to type 'T', otherwise will return default(T). - /// - /// - /// - /// - /// - public static T GetItemAs(this HttpRequestBase request, string key) - { - var val = request[key]; - var whitespaceCheck = !val.IsNullOrWhiteSpace() ? val : string.Empty; - if (whitespaceCheck.IsNullOrWhiteSpace()) - return (T) typeof (T).GetDefaultValue(); - var attempt = val.TryConvertTo(); - if (attempt.Success) - return attempt.Result; - return (T)typeof(T).GetDefaultValue(); - } + /// + /// Safely get the item from the query string and convert it to type 'T', otherwise will return default(T). + /// + /// + /// + /// + /// + public static T GetItemAs(this HttpRequestBase request, string key) + { + var val = request[key]; + var whitespaceCheck = !val.IsNullOrWhiteSpace() ? val : string.Empty; + if (whitespaceCheck.IsNullOrWhiteSpace()) + return (T)typeof(T).GetDefaultValue(); + var attempt = val.TryConvertTo(); + if (attempt.Success) + return attempt.Result; + return (T)typeof(T).GetDefaultValue(); + } - /// - /// Safely get the item from the query string and convert it to type 'T', otherwise will return default(T). - /// - /// - /// - /// - /// - public static T GetItemAs(this HttpRequest request, string key) - { - return new HttpRequestWrapper(request).GetItemAs(key); - } + /// + /// Safely get the item from the query string and convert it to type 'T', otherwise will return default(T). + /// + /// + /// + /// + /// + public static T GetItemAs(this HttpRequest request, string key) + { + return new HttpRequestWrapper(request).GetItemAs(key); + } - } + } } From aaa920719f5ae5ef16d75034ebb9870f696c2b46 Mon Sep 17 00:00:00 2001 From: elitsa Date: Mon, 5 Nov 2018 12:41:19 +0100 Subject: [PATCH 61/75] Adding html encoding when updating or removing Public Access of a content. --- .../umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs index 6fe22f0cd3..ef6fc53f1f 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs @@ -1,6 +1,7 @@ using System; using System.Globalization; using System.Linq; +using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; @@ -268,7 +269,7 @@ namespace umbraco.presentation.umbraco.dialogs } } - feedback_text.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text); + feedback_text.Text = HttpUtility.HtmlEncode(ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text)); p_setup.Visible = false; p_feedback.Visible = true; @@ -287,7 +288,7 @@ namespace umbraco.presentation.umbraco.dialogs Access.RemoveProtection(pageId); - feedback_text.Text = ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text); + feedback_text.Text = HttpUtility.HtmlEncode(ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text)); p_feedback.Visible = true; var content = ApplicationContext.Current.Services.ContentService.GetById(pageId); From 42bcde2c59d1a493760dfa4ca2e64b3f2ca83596 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Mon, 5 Nov 2018 15:32:07 +0100 Subject: [PATCH 62/75] rename button, use umb button directive, add icon to template + a bit of code clean up --- .../views/templates/templates.controller.js | 54 +++++++++++-------- .../views/templates/templates.html | 30 ++++++----- 2 files changed, 51 insertions(+), 33 deletions(-) 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 82f13dcc9f..e9499bedf8 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 @@ -19,25 +19,32 @@ vm.canCreateTemplate = false; vm.updateTemplatePlaceholder = false; + vm.createTemplate = createTemplate; /* ---------- INIT ---------- */ - init(function () { + function onInit() { - // update placeholder template information on new doc types - if (!$routeParams.notemplate && $scope.model.id === 0) { - vm.updateTemplatePlaceholder = true; - vm.availableTemplates = contentTypeHelper.insertTemplatePlaceholder(vm.availableTemplates); - } - }); + entityResource.getAll("Template").then(function (templates) { - function init(callback) { - checkIfTemplateExists(); + 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); + } + + checkIfTemplateExists(); + + }); - callback(); } - vm.createTemplate = function () { + function createTemplate() { + + vm.createTemplateButtonState = "busy"; + templateResource.getScaffold(-1).then(function (template) { template.alias = $scope.model.alias; @@ -45,6 +52,9 @@ templateResource.save(template).then(function (savedTemplate) { + // add icon + savedTemplate.icon = "icon-layout"; + vm.availableTemplates.push(savedTemplate); vm.canCreateTemplate = false; @@ -54,25 +64,27 @@ $scope.model.defaultTemplate = savedTemplate; } + vm.createTemplateButtonState = "success"; + + }, function() { + vm.createTemplateButtonState = "error"; }); + }, function() { + vm.createTemplateButtonState = "error"; }); }; function checkIfTemplateExists() { - entityResource.getAll("Template").then(function (templates) { - - vm.availableTemplates = templates; - - var existingTemplate = vm.availableTemplates.find(function (availableTemplate) { - return availableTemplate.name === $scope.model.name; - }); - - vm.canCreateTemplate = existingTemplate ? false : true; - + var existingTemplate = vm.availableTemplates.find(function (availableTemplate) { + return availableTemplate.name === $scope.model.name; }); + + vm.canCreateTemplate = existingTemplate ? false : true; } + onInit(); + } 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 0f7387e855..8cc1081b3e 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 @@ -7,20 +7,26 @@
- + - + + +
From 9153e4443fca96d5858bd26c9dc6173ed69fb2c8 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Mon, 5 Nov 2018 15:39:56 +0100 Subject: [PATCH 63/75] check for "fake template" when creating a new doc type with a template --- .../views/documenttypes/views/templates/templates.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e9499bedf8..33204f4a74 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 @@ -77,7 +77,7 @@ function checkIfTemplateExists() { var existingTemplate = vm.availableTemplates.find(function (availableTemplate) { - return availableTemplate.name === $scope.model.name; + return (availableTemplate.name === $scope.model.name || availableTemplate.placeholder); }); vm.canCreateTemplate = existingTemplate ? false : true; From f2feaba6046c5390de60b62692b8eaa957d34fc7 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 6 Nov 2018 10:13:15 +0100 Subject: [PATCH 64/75] fix tab styling in legacy dialogs --- src/Umbraco.Web.UI.Client/src/less/panel.less | 2 +- src/umbraco.controls/TabView.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/panel.less b/src/Umbraco.Web.UI.Client/src/less/panel.less index 3397eda6ee..85e3f83c10 100644 --- a/src/Umbraco.Web.UI.Client/src/less/panel.less +++ b/src/Umbraco.Web.UI.Client/src/less/panel.less @@ -16,7 +16,7 @@ .umb-panel-header { background: @gray-10; - border-bottom: 1px solid @gray-8; + border-bottom: 1px solid @purple-l3; position: absolute; height: 99px; top: 0px; diff --git a/src/umbraco.controls/TabView.cs b/src/umbraco.controls/TabView.cs index 334a9f4212..c424f844ae 100644 --- a/src/umbraco.controls/TabView.cs +++ b/src/umbraco.controls/TabView.cs @@ -33,7 +33,7 @@ namespace umbraco.uicontrols { base.CreateChildControls(); _tabList.TagName = "ul"; - _tabList.Attributes.Add("class", "nav nav-tabs umb-nav-tabs span12 -padding-left"); + _tabList.Attributes.Add("class", "nav nav-tabs umb-nav-tabs -padding-left"); base.row.Controls.Add(_tabList); _body.TagName = "div"; From 0f4cf0a97c6a41151dda7f491e4b469e4daf5ed6 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 6 Nov 2018 12:00:37 +0100 Subject: [PATCH 65/75] fix alignment of cropper prevalue inputs --- .../src/less/property-editors.less | 104 +++++------------- .../imagecropper/imagecropper.prevalues.html | 6 +- 2 files changed, 30 insertions(+), 80 deletions(-) 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 678db3f798..e9d598a8cf 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -219,91 +219,41 @@ div.umb-codeeditor .umb-btn-toolbar { // -------------------------------------------------- .umb-prevalues-multivalues.umb-cropsizes{ - max-width: none; - width: 100%; - .umb-overlay__form &{ + max-width: 500px; + width: 100%; + min-width: 66.6%; + + @media (min-width: 1101px) and (max-width: 1300px), (max-width: 930px) { + max-width: none; + } + + .umb-overlay__form & { width: 100%; } } -.umb-cropsizes{ - float: left; +.umb-cropsizes { - .control-group{ - label{ - display: block; - } - } + &__add { + display: inline-flex; + align-items: center; + } - &__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; + &__controls { + margin: 24px 0 0; + display: flex; + } + + &__input { + width: 100%; + &-wrap{ + flex: 1 1 auto; + margin-right: 10px; + &--narrow { + flex: 0 1 100px; } - - &--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; - } - } - } + } } } 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 0be82ff52f..6341d6f11c 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 @@ -18,7 +18,7 @@ /> -
+
Date: Wed, 7 Nov 2018 10:51:55 +0100 Subject: [PATCH 66/75] If a password is provided, then use this instead of an autogenerated one. --- src/Umbraco.Web/Editors/PasswordChanger.cs | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Web/Editors/PasswordChanger.cs b/src/Umbraco.Web/Editors/PasswordChanger.cs index 52f96934a0..ff9efbb6d4 100644 --- a/src/Umbraco.Web/Editors/PasswordChanger.cs +++ b/src/Umbraco.Web/Editors/PasswordChanger.cs @@ -43,7 +43,7 @@ namespace Umbraco.Web.Editors public async Task> ChangePasswordWithIdentityAsync( IUser currentUser, IUser savingUser, - ChangingPasswordModel passwordModel, + ChangingPasswordModel passwordModel, BackOfficeUserManager userMgr) { if (passwordModel == null) throw new ArgumentNullException("passwordModel"); @@ -101,7 +101,7 @@ namespace Umbraco.Web.Editors _logger.Warn(string.Format("Could not reset user password {0}", errors)); return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not reset password, errors: " + errors, new[] { "resetPassword" }) }); } - + return Attempt.Succeed(new PasswordChangedModel()); } @@ -110,7 +110,7 @@ namespace Umbraco.Web.Editors if (passwordModel.NewPassword.IsNullOrWhiteSpace()) { return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Cannot set an empty password", new[] { "value" }) }); - } + } //we cannot arbitrarily change the password without knowing the old one and no old password was supplied - need to return an error //TODO: What if the current user is admin? We should allow manually changing then? @@ -130,7 +130,7 @@ namespace Umbraco.Web.Editors _logger.Warn(string.Format("Could not change user password {0}", errors)); return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, errors: " + errors, new[] { "oldPassword" }) }); } - return Attempt.Succeed(new PasswordChangedModel()); + return Attempt.Succeed(new PasswordChangedModel()); } //We shouldn't really get here @@ -143,10 +143,10 @@ namespace Umbraco.Web.Editors /// The username of the user having their password changed /// /// - /// + /// public Attempt ChangePasswordWithMembershipProvider(string username, ChangingPasswordModel passwordModel, MembershipProvider membershipProvider) { - // YES! It is completely insane how many options you have to take into account based on the membership provider. yikes! + // YES! It is completely insane how many options you have to take into account based on the membership provider. yikes! if (passwordModel == null) throw new ArgumentNullException("passwordModel"); if (membershipProvider == null) throw new ArgumentNullException("membershipProvider"); @@ -181,9 +181,17 @@ namespace Umbraco.Web.Editors //ok, we should be able to reset it try { - var newPass = membershipProvider.ResetPassword( - username, - membershipProvider.RequiresQuestionAndAnswer ? passwordModel.Answer : null); + string newPass = passwordModel.NewPassword; + if (newPass.IsNullOrWhiteSpace()) + { + newPass = membershipProvider.ResetPassword( + username, + membershipProvider.RequiresQuestionAndAnswer ? passwordModel.Answer : null); + } + else + { + membershipProvider.ChangePassword(username, string.Empty, newPass); + } if (membershipProvider.IsUmbracoUsersProvider() && backofficeUserManager != null && userId >= 0) backofficeUserManager.RaisePasswordResetEvent(userId); From c01d09744fcc62dd7020c1d0841d8cfddeb9153e Mon Sep 17 00:00:00 2001 From: Laura W Date: Thu, 8 Nov 2018 10:50:18 +0000 Subject: [PATCH 67/75] Updated absolute-positioned validation error message to be readable when document types are attempting save with duplicate alias --- .../src/less/forms/umb-validation-label.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/less/forms/umb-validation-label.less b/src/Umbraco.Web.UI.Client/src/less/forms/umb-validation-label.less index d6aa183eed..417447c3dc 100644 --- a/src/Umbraco.Web.UI.Client/src/less/forms/umb-validation-label.less +++ b/src/Umbraco.Web.UI.Client/src/less/forms/umb-validation-label.less @@ -1,5 +1,7 @@ .umb-validation-label { position: absolute; + top: 27px; + width: 200px; padding: 1px 5px; background: @red; color: @white; From 8897ae18da09625313620fa2a155e133d7c21b58 Mon Sep 17 00:00:00 2001 From: Karl Tynan Date: Thu, 8 Nov 2018 14:13:53 +0000 Subject: [PATCH 68/75] Remove duplicate "?" on emptying recycle bins (#3556) --- .../src/views/content/emptyrecyclebin.html | 2 +- src/Umbraco.Web.UI.Client/src/views/media/emptyrecyclebin.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/content/emptyrecyclebin.html b/src/Umbraco.Web.UI.Client/src/views/content/emptyrecyclebin.html index 0416b25520..1208ad67c3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/emptyrecyclebin.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/emptyrecyclebin.html @@ -7,7 +7,7 @@

When items are deleted from the recycle bin, they will be gone forever. - Are you sure? + Are you sure?

diff --git a/src/Umbraco.Web.UI.Client/src/views/media/emptyrecyclebin.html b/src/Umbraco.Web.UI.Client/src/views/media/emptyrecyclebin.html index 4558a21e2a..cc7d261a95 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/emptyrecyclebin.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/emptyrecyclebin.html @@ -8,7 +8,7 @@

When items are deleted from the recycle bin, they will be gone forever. - Are you sure? + Are you sure?

From 3c74b7f1129c69009e4630336c97e55caa00fa40 Mon Sep 17 00:00:00 2001 From: Owain Williams Date: Thu, 8 Nov 2018 15:41:54 +0000 Subject: [PATCH 69/75] Turning auto complete off on Password field --- src/Umbraco.Web.UI.Client/src/installer/steps/user.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/user.html b/src/Umbraco.Web.UI.Client/src/installer/steps/user.html index 52a2fce4bc..ab3653bb63 100644 --- a/src/Umbraco.Web.UI.Client/src/installer/steps/user.html +++ b/src/Umbraco.Web.UI.Client/src/installer/steps/user.html @@ -32,6 +32,7 @@ ng-pattern="passwordPattern" autocorrect="off" autocapitalize="off" + autocomplete="off" required ng-model="installer.current.model.password" id="password" /> At least {{installer.current.model.minCharLength}} characters long From 6a1568d56283b6eef9f3fdb393b1c8f27c961213 Mon Sep 17 00:00:00 2001 From: LindaSluijter <44870175+LindaSluijter@users.noreply.github.com> Date: Thu, 8 Nov 2018 17:36:40 +0100 Subject: [PATCH 70/75] Typo/spelling/grammar fixes for Dutch translation (#3576) --- src/Umbraco.Web.UI/umbraco/config/lang/nl.xml | 140 +++++++++--------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml index 211f7f6e48..26b057e49f 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml @@ -8,7 +8,7 @@ Beheer domeinnamen Documentgeschiedenis Node bekijken - Wijzig document type + Wijzig documenttype Kopiëren Nieuw Nieuwe package @@ -38,7 +38,7 @@ Bijwerken Rechten instellen Deblokkeer - Content sjabloon aanmaken + Content template aanmaken Uitnodiging opnieuw versturen @@ -60,7 +60,7 @@ zouden moeten worden vermeden. Gebruik bij voorkeur de cultuurinstelling hierboven.]]> Overerven Cultuur - of erf de cultuur over van de ouder nodes. Zal ook van toepassing
+ of erf de cultuur over van de oudernodes. Zal ook van toepassing
zijn op de huidige node, tenzij een domein hieronder ook van toepassing is.]]>
Domeinen @@ -112,7 +112,7 @@ Documenttype gewijzigd Eigenschappen toewijzen Toewijzen aan eigenschap - Nieuw sjabloon + Nieuwe template Nieuw type geen Inhoud @@ -151,7 +151,7 @@ Pagina Titel Eigenschappen Dit document is gepubliceerd maar niet zichtbaar omdat de bovenliggende node '%0%' niet gepubliceerd is - Dit document is gepubliceerd, maar het is niet in de cache (interne serverfout) + Dit document is gepubliceerd, maar het staat niet in de cache (interne serverfout) Kan de Url niet ophalen Dit document is gepubliceerd, maar de Url conflicteert met %0% Publiceren @@ -181,7 +181,7 @@ Voeg nog een tekstvak toe Verwijder dit tekstvak Content root - Deze waarde is verborgen. Indien u toegang nodig heeft om deze waarde te bekijken, contacteer dan uw website administrator. + Deze waarde is verborgen. Indien u toegang nodig heeft om deze waarde te bekijken, neem dan contact op met uw websitebeheerder. Deze waarde is verborgen @@ -191,7 +191,7 @@ Of klik hier om bestanden te kiezen De toegestane bestandtypen zijn Dit bestand heeft niet het juiste file-type. Dit bestand kan niet geupload worden. - Max file size is + Maximale bestandsgrootte is Maak nieuwe member aan @@ -205,16 +205,16 @@ Waar wil je de nieuwe %0% aanmaken? Aanmaken onder Kies een type en een titel - "Documenttypes".]]> - "Mediatypes".]]> + "Documenttypes".]]> + "Mediatypes".]]> Document Type zonder template - Nieuwe folder + Nieuwe map Nieuw data type Open je website - Verbergen - Als Umbraco niet geopend wordt dan moet je misschien popups toelaten voor deze site. + Als Umbraco niet geopend wordt dan moet je mogelijk popups toestaan voor deze site. is geopend in een nieuw venster Herstarten Bezoek @@ -225,7 +225,7 @@ Negeer wijzigingen Wijzigingen niet opgeslagen Weet je zeker dat deze pagina wilt verlaten? - er zijn onopgeslagen wijzigingen - Depubliceren zal deze pagina en alle onderliggend paginas verwijderen van de site. + Depubliceren zal deze pagina en alle onderliggende paginas verwijderen van de site. Done @@ -288,8 +288,8 @@ De items worden nu uit de prullenbak verwijderd. Sluit dit venster niet terwijl de actie nog niet voltooid is. De prullenbak is nu leeg. Als items worden verwijderd uit de prullenbak, zijn ze voorgoed verwijderd. - regexlib.com ondervindt momenteel prolemen waarover we geen controle hebben. Onze excuses voor het ongemak.]]> - Zoek naar een regular expressie om validatie aan een formulierveld toe te voegen. Voorbeeld: 'email, 'post-code' 'url' + regexlib.com ondervindt momenteel problemen waarover we geen controle hebben. Onze excuses voor het ongemak.]]> + Zoek naar een reguliere expressie om validatie aan een formulierveld toe te voegen. Voorbeeld: 'email, 'post-code' 'url' Verwijder Macro Verplicht veld Site is opnieuw geïndexeerd @@ -298,15 +298,15 @@ Aantal kolommen Aantal regels Plaats een placeholder id door een ID op uw placeholder te zetten kunt u inhoud plaatsen in deze template vanuit onderliggende templates, - door te referreren naar deze ID door gebruik te maken van een <asp:content /> element.]]> + door te verwijzen naar deze ID door gebruik te maken van een <asp:content /> element.]]>
Selecteer een placeholder id uit onderstaande lijst. U kunt alleen Id's kiezen van de master van de huidige template..]]> Klik op de afbeelding voor volledige grootte Kies een item Toon cache item - Maak folder aan... + Maak map aan... Relateer aan origineel - Descendants meenemen + Onderliggende nodes meenemen De vriendelijkste community Link naar pagina Opent het gelinkte document in een nieuw venster of tab @@ -334,7 +334,7 @@ Wijzig de verschillende taalversies voor het woordenboek item '%0%'. Je kunt extra talen toevoegen bij 'talen' in het menu links ]]> Cultuurnaam - Verander de key van het dictionary item. + Verander de key van het woordenboek item. Toestaan op root-niveau - Wanneer aangevinkt dan mag dit document type aangemaakt worden op het root-niveau van content of media trees. + Wanneer aangevinkt dan mag dit documenttype aangemaakt worden op het root-niveau van content- of media trees. Toegelaten subnodetypes - Document Type Composities + Documenttype Composities Nieuw Tab verwijderen Omschrijving @@ -388,8 +388,8 @@ Breedte en hoogte - Je data is opgeslagen, maar voordat je deze pagina kunt publiceren moet je eerst aan paar problemen herstellen: - Het wachtwoord veranderen wordt door de huidige Membership Provider niet ondersteund (EnablePasswordRetrieval moet op true staan) + Je data is opgeslagen, maar voordat je deze pagina kunt publiceren moet je eerst aan paar problemen oplossen: + Veranderen van het wachtwoord wordt door de huidige Membership Provider niet ondersteund (EnablePasswordRetrieval moet op true staan) %0% bestaat al Er zijn fouten geconstateerd: Er zijn fouten geconstateerd: @@ -404,8 +404,8 @@ Een error ontvangen van de server Het opgegeven bestandstype is niet toegestaan ​​door de beheerder OPMERKING! Ondanks dat CodeMiror is ingeschakeld, is het uitgeschakeld in Internet Explorer omdat het niet stabiel genoeg is. - Zowel de alias als de naam van het nieuwe eigenschappen type moeten worden ingevuld! - Er is een probleem met de lees/schrijf rechten op een bestand of map + Zowel de alias als de naam van het nieuwe eigenschappentype moeten worden ingevuld! + Er is een probleem met de lees/schrijfrechten op een bestand of map Error bij het laden van Partial View script (file: %0%) Error bij het laden van userControl '%0%' Error bij het laden van customControl (Assembly: %0%, Type: '%1%') @@ -720,7 +720,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Er zal een email worden gestuurd naar het emailadres van jouw account. Hierin staat een link om je wachtwoord te resetten Een email met daarin de wachtwoord reset uitleg zal worden gestuurd als het emailadres in onze database voorkomt. Terug naar loginformulier - Geeft alsjeblieft een nieuw wachtwoord op + Geef alsjeblieft een nieuw wachtwoord op Je wachtwoord is aangepast De link die je hebt aangeklikt is niet (meer) geldig. Umbraco: Wachtwoord Reset @@ -744,7 +744,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je De huidige node is niet toegestaan onder de geselecteerde node vanwege het node type De huidige node kan niet naar een van zijn subpagina’s worden verplaatst. De huidige node kan niet worden gebruikt op root-niveau - Deze actie is niet toegestaan omdat je onvoldoende rechten hebt op 1 of meer subitems. + Deze actie is niet toegestaan omdat je onvoldoende rechten hebt op één of meer subitems. Relateer gekopieerde items aan het origineel @@ -803,7 +803,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Package naam Package bevat geen inhoud
- Je kunt dit package veilig verwijderen door 'verwijder package' te klikken. + Je kunt deze package veilig verwijderen door op 'verwijder package' te klikken. ]]>
Geen upgrades beschikbaar Package opties @@ -815,7 +815,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Verwijder package Waarschuwing: alle documenten, media etc, die afhankelijk zijn van de items die je verwijderd, zullen niet meer werken en kan leiden tot een instabiele installatie, - wees dus voorzichtig met verwijderen. Als je niet zeker bent, neem dan contact op met de auteur van de package. + wees dus voorzichtig met verwijderen. Als je het niet zeker weet, neem dan contact op met de auteur van de package. ]]> Download update uit de repository Upgrade package @@ -832,11 +832,11 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Aan het installeren... Aan het herstarten, een ongenblik geduld aub... Geinstalleerd! Je browser zal nu automatisch ververst worden... - Kruk op "finish" om de installate te voltooien en de pagina te verversen. + Klik op "finish" om de installatie te voltooien en de pagina te verversen. Plakken met alle opmaak (Niet aanbevolen) - De tekst die je probeert te plakken bevat speciale karakters en/of opmaak. Dit kan veroorzaakt worden doordat de tekst vanuit Microsoft Word is gekopieerd. Umbraco kan deze speciale karakters en formattering automatisch verwijderen zodat de geplakte tekst geschikt is voor het web. + De tekst die je probeert te plakken bevat speciale tekens en/of opmaak. Dit kan veroorzaakt worden doordat de tekst vanuit Microsoft Word is gekopieerd. Umbraco kan deze speciale tekens en formattering automatisch verwijderen zodat de geplakte tekst geschikt is voor het web. Plakken als ruwe tekst en alle opmaak verwijderen Plakken, en verwijder de opmaak (aanbevolen) @@ -853,7 +853,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Kies de pagina met het login-formulier Verwijder beveiliging Kies de pagina's die het login-formulier en de error-berichten bevatten - Kies de roles wie toegang hebben tot deze pagina + Kies de roles die toegang hebben tot deze pagina Geef de gebruikersnaam en wachtwoord voor deze pagina Eenvoudig: Beveilig door middel van gebruikersnaam en wachtwoord Als je eenvoudige beveiliging wilt gebruiken met behulp van een enkele gebruikersnaam en wachtwoord @@ -895,7 +895,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Bijschrift Link In een nieuw venster openen - Voer het bijschrijft in + Voer het bijschrift in Voer de link in @@ -903,9 +903,9 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Huidige versie - Rode tekst wordt niet getoond in de geselecteerde versie , groen betekent toegevoegd]]> + Rode tekst wordt niet getoond in de geselecteerde versie, groen betekent toegevoegd]]> Document is teruggezet - Hiermee wordt de geselecteerde versie als html getoond, als u de verschillen tussen de 2 versies tegelijk wilt zien, gebruik dan de diff view + Hiermee wordt de geselecteerde versie als html getoond, als u de verschillen tussen de twee versies tegelijk wilt zien, gebruik dan de diff view Terugzetten naar Selecteer versie Bekijk @@ -970,12 +970,12 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Mislukt Wegens onvoldoende rechten kon deze handeling kon niet worden uitegevoerd Geannuleerd - Uitvoering is g eannuleerd door de plugin van een 3e partij - Publicatie werd geannuleerd doordeeen plugin van een 3e partij - Eigenschappen type bestaat al - Eigenschappen type aangemaakt + Uitvoering is geannuleerd door de plugin van een 3e partij + Publicatie werd geannuleerd door een plugin van een 3e partij + Eigenschappentype bestaat al + Eigenschappentype aangemaakt Data type: %1%]]> - Eigenschappen type verwijderd + Eigenschappentype verwijderd Inhoudstype opgeslagen Tab aangemaakt Tab verwijderd @@ -1069,9 +1069,9 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Invoegen dictionary item Invoegen Macro Invoegen Umbraco page field - Basis sjabloon + Basistemplate Quick Guide voor Umbraco template tags - Sjabloon + Template Rich Text Editor @@ -1145,12 +1145,12 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Ja - sta content van dit type toe op root-niveau Toegestane child node types - Sta contetn van een bepaalde type toe om onder dit type aangemaakt te kunnen worden + Sta content van een bepaald type toe om onder dit type aangemaakt te kunnen worden Kies child node - Overerfde tabs en properties van een bestaand document-type. Nieuwe tabs worden toegevoegd aan het huidige document-type of samengevoegd als een tab met de identieke naam al bestaat. - Dit content-type wordt gebruikt in een compositie en kan daarom niet zelf een compositie worden. - Er zijn geen content-typen beschikbaar om als compositie te gebruiken. + Overgeërfde tabs en properties van een bestaand documenttype. Nieuwe tabs worden toegevoegd aan het huidige documenttype of samengevoegd als een tab met dezelfde naam al bestaat. + Dit contenttype wordt gebruikt in een compositie en kan daarom niet zelf een compositie worden. + Er zijn geen contenttypen beschikbaar om als compositie te gebruiken. Beschikbare editors Herbruik @@ -1166,11 +1166,11 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Selecteer de map om te kopieren naar de boomstructuur onder - Alle Document types + Alle Documenttypes Alle documenten Alle media items - die gebruik maken van dit document type zullen permanent verwijderd worden. Bevestig aub dat je deze ook wilt verwijderen. + die gebruik maken van dit documenttype zullen permanent verwijderd worden. Bevestig aub dat je deze ook wilt verwijderen. die gebruik maken van dit media type zullen permanent verwijderd worden. Bevestig aub dat je deze ook wilt verwijderen. die gebruik maken van dit member type zullen permanent verwijderd worden. Bevestig aub dat je deze ook wilt verwijderen. @@ -1191,7 +1191,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je - Models aan het gereneren + Models aan het genereren dit kan enige tijd duren, geduld aub Models gegenereerd Models konden niet gegenereerd worden @@ -1222,13 +1222,13 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Hoofdletters URL-encoderen Speciale karakters in URL's worden geëncodeerd - Zal alleen worden gebruikt waneer de bovenstaande veld waardes leeg zijn + Zal alleen worden gebruikt waneer de bovenstaande veldwaardes leeg zijn Dit veld zal alleen worden gebruikt als het primaire veld leeg is Ja, met tijd. Scheidingsteken: Taken aan jou toegewezen - @@ -1255,14 +1255,14 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de De Umbraco Robot ]]>
[%0%] Vertaalopdracht voor %1% - Geen vertaal-gebruikers gevonden. Maak eerst een vertaal-gebruiker aan voordat je pagina's voor vertaling verstuurd + Geen vertaal-gebruikers gevonden. Maak eerst een vertaal-gebruiker aan voordat je pagina's voor vertaling verstuurt Taken aangemaakt door jou die je aanmaakte. Om een detailweergave met opmerkingen te zien, klik op "Detail" of op de paginanaam. Je kan ook de pagina in XML-formaat downloaden door op de "Download XML"-link te klikken. Om een vertalingstaak te sluiten, klik je op de "Sluiten"-knop in detailweergave.]]> De pagina '%0%' is verstuurd voor vertaling - Kies de taal waarin deze contetn vertaald moet worden + Kies de taal waarin deze content vertaald moet worden Stuur voor vertaling Toegewezen door Taak geopend @@ -1315,7 +1315,7 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de Toegang - Gebaseerd op de gebruikers groepen en start pagina's heeft de bruiker toegang tot de volgende pagina's + Gebaseerd op de gebruikersgroepen en startpagina's heeft de gebruiker toegang tot de volgende pagina's Toegang geven Beheerders Categorieveld @@ -1326,7 +1326,7 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de is niet gedeblokkeerd Het wachtwoord is niet gewijzigd Bevestig nieuw password - Je kunt je wachtwoord veranderen door onderstaan formulier in te vullen en op de knop 'Verander wachtwoord' te klikken + Je kunt je wachtwoord veranderen door onderstaand formulier in te vullen en op de knop 'Verander wachtwoord' te klikken Inhoudskanaal Nog een gebruiker aanmaken Maak nieuwe gebruikers aan om hun toegang te geven tot Umbraco. Wanneer een nieuwe gebruiker wordt aangemaakt wordt er een wachtwoord gegenereerd dat je met hun kan delen. @@ -1341,15 +1341,15 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de Nog een gebruiker uitnodigen Nodig gebruikers uit om hen toegang te geven to Umbraco. Een uitnodiging wordt via e-mail verstuurd met instructies hoe de gebruiker kan inloggen. Taal - Stel de taal in die gebruiker zal zien in menu's en dialoog vensters - Laatst geblokkeerd datu, + Stel de taal in die gebruiker zal zien in menu's en dialoogvensters + Laatst geblokkeerd datum Laatste keer ingelogd - Laatste keer paswoord gewijzigd + Laatste keer wachtwoord gewijzigd Loginnaam Startnode in Mediabibliotheek Beperk de mediabibliotheek tot een specifieke startnode Startnodes in Mediabibliotheek - Beperk de mediabibliotheek tot een specifieke startnodes + Beperk de mediabibliotheek tot een specifieke startnode Secties Blokkeer Umbraco toegang heeft nog niet ingelogd @@ -1383,9 +1383,9 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de Geblokkeerd Uitgenodigd Startnode in Content - Beperk de content toegan een specifieke start node + Beperk de content toegang tot een specifieke startnode Startnodes in Content - Beperk de content toegan een specifieke start nodes + Beperk de content toegang tot specifieke startnodes Naam (A-Z) Naam (Z-A) Nieuwste @@ -1402,7 +1402,7 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de Gebruikersgroepen is uitgenodigd Een uitnodiging is gestuurd naar de nieuwe gebruiker met informatie over hoe in te loggen in Umbraco - Hallo en welk in Umbraco! Binnen ongeveer 1 minuut kan je aan de slag. Je moet enkel je wachtwoord instellen en een foto toevoegen. + Hallo en welkom in Umbraco! Binnen ongeveer één minuut kan je aan de slag. Je moet enkel je wachtwoord instellen en een foto toevoegen. Wijzig je foto zodat andere gebruikers je makkelijk kunnen herkennen. Auteur Vertaler @@ -1511,7 +1511,7 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de Uitnodigen Uitnodiging opnieuw aan het versturen... Verwijder gebruiker - Ben je zeker dat je deze gebruiker wil verwijderen? + Weet je zeker dat je deze gebruiker wil verwijderen? Validatie @@ -1529,9 +1529,9 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de 3: Configuration file path --> Waarde is insteld naar the aanbevolen waarde: '%0%'. - Waarde was '%1%' voor XPath '%2%' in configuratie bestand '%3%'. - De verwachtte waarde voor '%2%' is '%1%' in configuratie bestand '%3%', maar is '%0%'. - Onverwachte waarde '%0%' gevonden voor '%2%' in configuratie bestand '%3%'. + Waarde was '%1%' voor XPath '%2%' in configuratiebestand '%3%'. + De verwachte waarde voor '%2%' is '%1%' in configuratiebestand '%3%', maar is '%0%'. + Onverwachte waarde '%0%' gevonden voor '%2%' in configuratiebestand '%3%'. @@ -1614,7 +1614,7 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de 0: Comma delimitted list of headers found --> %0%.]]> - Er zijn geen headeres gevonden welke informatie over de gebruikte website technologie prijsgeven! + Er zijn geen headers gevonden die informatie prijsgeven over de gebruikte website technologie! In de Web.config werd system.net/mailsettings niet gevonden In de Web.config sectie system.net/mailsettings is de host niet geconfigureerd. From 1850d046e4d18682831d4704813eaf1cddcd4b85 Mon Sep 17 00:00:00 2001 From: Laura Weatherhead Date: Thu, 8 Nov 2018 16:53:25 +0000 Subject: [PATCH 71/75] RelatedLinks2 validation in Nested content (#3578) --- src/Umbraco.Web/Editors/ContentControllerBase.cs | 2 +- src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/Editors/ContentControllerBase.cs b/src/Umbraco.Web/Editors/ContentControllerBase.cs index f67ce13950..47e472e4ee 100644 --- a/src/Umbraco.Web/Editors/ContentControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentControllerBase.cs @@ -141,7 +141,7 @@ namespace Umbraco.Web.Editors where TPersisted : IContentBase where T : ContentPropertyBasic { - //lasty, if it is not valid, add the modelstate to the outgoing object and throw a 403 + //lastly, if it is not valid, add the modelstate to the outgoing object and throw a 403 if (!ModelState.IsValid) { display.Errors = ModelState.ToErrorDictionary(); diff --git a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs index c229948677..cbb1d1676f 100644 --- a/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs @@ -386,7 +386,7 @@ namespace Umbraco.Web.PropertyEditors { if (propValues[propKey] == null) yield return new ValidationResult("Item " + (i + 1) + " '" + propType.Name + "' cannot be null", new[] { propKey }); - else if (propValues[propKey].ToString().IsNullOrWhiteSpace()) + else if (propValues[propKey].ToString().IsNullOrWhiteSpace() || (propValues[propKey].Type == JTokenType.Array && !propValues[propKey].HasValues)) yield return new ValidationResult("Item " + (i + 1) + " '" + propType.Name + "' cannot be empty", new[] { propKey }); } From cb636544c097c78f80111ae2f24e51fcc2849986 Mon Sep 17 00:00:00 2001 From: Anders Bjerner Date: Tue, 13 Nov 2018 15:06:58 +0100 Subject: [PATCH 72/75] Spotted some minor typos --- src/Umbraco.Web.UI/umbraco/config/lang/da.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml index 271144c7ec..010b0a4a74 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml @@ -211,7 +211,7 @@ Sidetitel Egenskaber Dette dokument er udgivet, men ikke synligt da den overliggende side '%0%' ikke er udgivet! - Upd: dette dokument er udgiver, men er ikke i cachen (intern fejl) + Ups: dette dokument er udgivet, men er ikke i cachen (intern fejl) Kunne ikke hente url'en Dette dokument er udgivet, men dets url ville kollidere med indholdet %0% Udgiv From b0292159331f62ca755fa855b5ed30a98974387d Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 14 Nov 2018 20:09:29 +1100 Subject: [PATCH 73/75] Updates logic for PasswordChanger so when the ChangePasswordWithMembershipProvider it correctly updates the password and raises the right event --- src/Umbraco.Web/Editors/PasswordChanger.cs | 76 ++++++++++++---------- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/src/Umbraco.Web/Editors/PasswordChanger.cs b/src/Umbraco.Web/Editors/PasswordChanger.cs index ff9efbb6d4..7be14d27d1 100644 --- a/src/Umbraco.Web/Editors/PasswordChanger.cs +++ b/src/Umbraco.Web/Editors/PasswordChanger.cs @@ -71,8 +71,9 @@ namespace Umbraco.Web.Editors throw new InvalidOperationException("The membership provider cannot have a password format of " + membershipPasswordHasher.MembershipProvider.PasswordFormat + " and be configured with secured hashed passwords"); } - //Are we resetting the password?? In ASP.NET Identity APIs, this flag indicates that an admin user is changing another user's password - //without knowing the original password. + //Are we resetting the password? + //This flag indicates that either an admin user is changing another user's password without knowing the original password + // or that the password needs to be reset to an auto-generated one. if (passwordModel.Reset.HasValue && passwordModel.Reset.Value) { //if it's the current user, the current user cannot reset their own password @@ -113,7 +114,6 @@ namespace Umbraco.Web.Editors } //we cannot arbitrarily change the password without knowing the old one and no old password was supplied - need to return an error - //TODO: What if the current user is admin? We should allow manually changing then? if (passwordModel.OldPassword.IsNullOrWhiteSpace()) { //if password retrieval is not enabled but there is no old password we cannot continue @@ -165,10 +165,43 @@ namespace Umbraco.Web.Editors } } - //Are we resetting the password?? - //TODO: I don't think this is required anymore since from 7.7 we no longer display the reset password checkbox since that didn't make sense. + //Are we resetting the password? + //This flag indicates that either an admin user is changing another user's password without knowing the original password + // or that the password needs to be reset to an auto-generated one. if (passwordModel.Reset.HasValue && passwordModel.Reset.Value) { + //if a new password is supplied then it's an admin user trying to change another user's password without knowing the original password + //this is only possible when using a membership provider if the membership provider supports AllowManuallyChangingPassword + if (passwordModel.NewPassword.IsNullOrWhiteSpace() == false) + { + if (membershipProvider is MembershipProviderBase umbracoBaseProvider && umbracoBaseProvider.AllowManuallyChangingPassword) + { + //this provider allows manually changing the password without the old password, so we can just do it + try + { + var result = umbracoBaseProvider.ChangePassword(username, string.Empty, passwordModel.NewPassword); + + if (result && backofficeUserManager != null && userId >= 0) + backofficeUserManager.RaisePasswordChangedEvent(userId); + + return result == false + ? Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, invalid username or password", new[] { "value" }) }) + : Attempt.Succeed(new PasswordChangedModel()); + } + catch (Exception ex) + { + _logger.WarnWithException("Could not change member password", ex); + return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex.Message + " (see log for full details)", new[] { "value" }) }); + } + } + else + { + return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Provider does not support manually changing passwords", new[] { "value" }) }); + } + } + + //we've made it here which means we need to generate a new password + var canReset = membershipProvider.CanResetPassword(_userService); if (canReset == false) { @@ -178,20 +211,13 @@ namespace Umbraco.Web.Editors { return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password reset requires a password answer", new[] { "resetPassword" }) }); } + //ok, we should be able to reset it try { - string newPass = passwordModel.NewPassword; - if (newPass.IsNullOrWhiteSpace()) - { - newPass = membershipProvider.ResetPassword( + var newPass = membershipProvider.ResetPassword( username, membershipProvider.RequiresQuestionAndAnswer ? passwordModel.Answer : null); - } - else - { - membershipProvider.ChangePassword(username, string.Empty, newPass); - } if (membershipProvider.IsUmbracoUsersProvider() && backofficeUserManager != null && userId >= 0) backofficeUserManager.RaisePasswordResetEvent(userId); @@ -213,26 +239,8 @@ namespace Umbraco.Web.Editors return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Cannot set an empty password", new[] { "value" }) }); } - //This is an edge case and is only necessary for backwards compatibility: - var umbracoBaseProvider = membershipProvider as MembershipProviderBase; - if (umbracoBaseProvider != null && umbracoBaseProvider.AllowManuallyChangingPassword) - { - //this provider allows manually changing the password without the old password, so we can just do it - try - { - var result = umbracoBaseProvider.ChangePassword(username, "", passwordModel.NewPassword); - return result == false - ? Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, invalid username or password", new[] { "value" }) }) - : Attempt.Succeed(new PasswordChangedModel()); - } - catch (Exception ex) - { - _logger.WarnWithException("Could not change member password", ex); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, error: " + ex.Message + " (see log for full details)", new[] { "value" }) }); - } - } - - //The provider does not support manually chaning the password but no old password supplied - need to return an error + //without being able to retrieve the original password, + //we cannot arbitrarily change the password without knowing the old one and no old password was supplied - need to return an error if (passwordModel.OldPassword.IsNullOrWhiteSpace() && membershipProvider.EnablePasswordRetrieval == false) { //if password retrieval is not enabled but there is no old password we cannot continue From 413791fb1941946dbe9f0a8041f1a0f388921739 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 14 Nov 2018 20:32:20 +1100 Subject: [PATCH 74/75] Fixes problem with UserRepository.GetProfile since it was looking up the wrong fields :( this meant that the security audit events were not being raised since it wasn't finding users by their login --- src/Umbraco.Core/Persistence/Repositories/UserRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs index 4dab83a8c5..8de5957323 100644 --- a/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/UserRepository.cs @@ -152,7 +152,7 @@ namespace Umbraco.Core.Persistence.Repositories public IProfile GetProfile(string username) { - var sql = GetBaseQuery(false).Where(userDto => userDto.UserName == username, SqlSyntax); + var sql = GetBaseQuery(false).Where(userDto => userDto.Login == username, SqlSyntax); var dto = Database.Fetch(sql) .FirstOrDefault(); From 06db9d22237b35014c9b1c250e0634ad91314f12 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 15 Nov 2018 13:00:33 +0100 Subject: [PATCH 75/75] Reverts PR #3449 and #3493 --- .../views/components/tabs/umb-tabs-nav.html | 4 +- src/Umbraco.Web/Models/ContentEditing/Tab.cs | 60 +++++++++---------- .../Mapping/ContentPropertyModelMapper.cs | 4 +- 3 files changed, 30 insertions(+), 38 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html b/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html index f3e7279154..96c4adf783 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/tabs/umb-tabs-nav.html @@ -1,5 +1,5 @@ diff --git a/src/Umbraco.Web/Models/ContentEditing/Tab.cs b/src/Umbraco.Web/Models/ContentEditing/Tab.cs index b87c15543b..536fe31182 100644 --- a/src/Umbraco.Web/Models/ContentEditing/Tab.cs +++ b/src/Umbraco.Web/Models/ContentEditing/Tab.cs @@ -1,33 +1,27 @@ -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace Umbraco.Web.Models.ContentEditing -{ - /// - /// Represents a tab in the UI - /// - [DataContract(Name = "tab", Namespace = "")] - public class Tab - { - [DataMember(Name = "id")] - public int Id { get; set; } - - [DataMember(Name = "active")] - public bool IsActive { get; set; } - - [DataMember(Name = "label")] - public string Label { get; set; } - - [DataMember(Name = "alias")] - public string Alias { get; set; } - - [DataMember(Name = "properties")] - public IEnumerable Properties { get; set; } - - [DataMember(Name = "cssClass")] - public string CssClass { get; set; } - - [DataMember(Name = "tooltip")] - public string Tooltip { get; set; } - } -} +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Umbraco.Web.Models.ContentEditing +{ + /// + /// Represents a tab in the UI + /// + [DataContract(Name = "tab", Namespace = "")] + public class Tab + { + [DataMember(Name = "id")] + public int Id { get; set; } + + [DataMember(Name = "active")] + public bool IsActive { get; set; } + + [DataMember(Name = "label")] + public string Label { get; set; } + + [DataMember(Name = "alias")] + public string Alias { get; set; } + + [DataMember(Name = "properties")] + public IEnumerable Properties { get; set; } + } +} diff --git a/src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs index 8343aecbd0..f401832020 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs @@ -19,9 +19,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(tab => tab.Label, expression => expression.MapFrom(@group => @group.Name)) .ForMember(tab => tab.IsActive, expression => expression.UseValue(true)) .ForMember(tab => tab.Properties, expression => expression.Ignore()) - .ForMember(tab => tab.Alias, expression => expression.Ignore()) - .ForMember(tab => tab.CssClass, expression => expression.Ignore()) - .ForMember(tab => tab.Tooltip, expression => expression.Ignore()); + .ForMember(tab => tab.Alias, expression => expression.Ignore()); //FROM Property TO ContentPropertyBasic config.CreateMap()