From 1e5c00878be5f585af6bdabd6c850a931c19b033 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 15 Jan 2020 09:05:26 +0100 Subject: [PATCH 1/7] AB4549 - Moved models from web to abstractions and infrastructure --- .../Models/AnchorsModel.cs | 0 .../Models/ChangingPasswordModel.cs | 0 .../Models/ContentEditing/AuditLog.cs | 0 .../ContentDomainsAndCulture.cs | 0 .../ContentEditing/ContentPropertyBasic.cs | 0 .../ContentEditing/ContentSaveAction.cs | 0 .../ContentEditing/ContentSavedState.cs | 0 .../DictionaryOverviewDisplay.cs | 0 .../DictionaryOverviewTranslationDisplay.cs | 0 .../DictionaryTranslationDisplay.cs | 0 .../DictionaryTranslationSave.cs | 0 .../Models/ContentEditing/DomainDisplay.cs | 0 .../ContentEditing/IContentProperties.cs | 0 .../Models/ContentEditing/IContentSave.cs | 0 .../ContentEditing/IHaveUploadedFiles.cs | 0 .../Models/ContentEditing/ITabbedContent.cs | 0 .../Models/ContentEditing/Language.cs | 0 .../Models/ContentEditing/LinkDisplay.cs | 0 .../ContentEditing/NotificationStyle.cs | 0 .../Models/ContentEditing/Permission.cs | 0 .../ContentEditing/PropertyTypeValidation.cs | 0 .../Models/ContentEditing/Tab.cs | 0 .../Models/ContentModel.cs | 0 .../Models/ContentModelOfTContent.cs | 0 .../Models/IContentModel.cs | 0 .../Models/ImageCropAnchor.cs | 0 .../Models/ImageCropMode.cs | 0 .../Models/ImageCropRatioMode.cs | 0 .../Models/Link.cs | 0 .../Models/LinkType.cs | 0 .../Models/LoginModel.cs | 0 .../Models/PackageInstallModel.cs | 0 .../Models/PackageInstallResult.cs | 0 .../Models/PartialViewMacroModel.cs | 0 .../Models/PartialViewMacroModelExtensions.cs | 0 .../Models/PasswordChangedModel.cs | 0 .../Models/PostRedirectModel.cs | 0 .../Models/RequestPasswordResetModel.cs | 0 .../Models/SendCodeViewModel.cs | 0 .../Models/SetPasswordModel.cs | 0 .../Models/TemplateQuery/ContentTypeModel.cs | 0 .../Models/TemplateQuery/Operator.cs | 0 .../Models/TemplateQuery/OperatorFactory.cs | 0 .../Models/TemplateQuery/OperatorTerm.cs | 0 .../Models/TemplateQuery/PropertyModel.cs | 0 .../Models/TemplateQuery/QueryCondition.cs | 0 .../TemplateQuery/QueryConditionExtensions.cs | 0 .../Models/TemplateQuery/QueryModel.cs | 0 .../Models/TemplateQuery/QueryResultModel.cs | 0 .../Models/TemplateQuery/SortExpression.cs | 0 .../Models/TemplateQuery/SourceModel.cs | 0 .../TemplateQuery/TemplateQueryResult.cs | 0 .../Models/UmbracoProperty.cs | 0 .../Models/UnLinkLoginModel.cs | 0 .../Models/UpgradeCheckResponse.cs | 5 +- .../Models/UserTourStatus.cs | 0 .../Models/ValidatePasswordResetCodeModel.cs | 0 .../Models/BackOfficeTour.cs | 0 .../Models/BackOfficeTourFile.cs | 0 .../Models/BackOfficeTourStep.cs | 0 .../AssignedContentPermissions.cs | 0 .../AssignedUserGroupPermissions.cs | 0 .../Models/ContentEditing/ContentItemBasic.cs | 0 .../ContentEditing/ContentPropertyDisplay.cs | 0 .../ContentEditing/DictionaryDisplay.cs | 0 .../Models/ContentEditing/DictionarySave.cs | 0 .../Models/ContentEditing/DomainSave.cs | 0 .../Models/ContentEditing/EditorNavigation.cs | 0 .../Models/ContentEditing/EntityBasic.cs | 2 - .../GetAvailableCompositionsFilter.cs | 0 .../Models/ContentEditing/IErrorModel.cs | 0 .../ContentEditing/INotificationModel.cs | 0 .../Models/ContentEditing/MacroParameter.cs | 0 .../ContentEditing/MacroParameterDisplay.cs | 0 .../Models/ContentEditing/Notification.cs | 0 .../ContentEditing/TabbedContentItem.cs | 0 .../Models/ContentEditing/UserProfile.cs | 0 .../Umbraco.Infrastructure.csproj | 4 - src/Umbraco.Web/Umbraco.Web.csproj | 83 +------------------ 79 files changed, 5 insertions(+), 89 deletions(-) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/AnchorsModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ChangingPasswordModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/AuditLog.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/ContentDomainsAndCulture.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/ContentPropertyBasic.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/ContentSaveAction.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/ContentSavedState.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/DictionaryOverviewDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/DictionaryOverviewTranslationDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/DictionaryTranslationDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/DictionaryTranslationSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/DomainDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/IContentProperties.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/IContentSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/IHaveUploadedFiles.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/ITabbedContent.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/Language.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/LinkDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/NotificationStyle.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/Permission.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/PropertyTypeValidation.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/Tab.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentModelOfTContent.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/IContentModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ImageCropAnchor.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ImageCropMode.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ImageCropRatioMode.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/Link.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/LinkType.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/LoginModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/PackageInstallModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/PackageInstallResult.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/PartialViewMacroModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/PartialViewMacroModelExtensions.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/PasswordChangedModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/PostRedirectModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/RequestPasswordResetModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/SendCodeViewModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/SetPasswordModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/ContentTypeModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/Operator.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/OperatorFactory.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/OperatorTerm.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/PropertyModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/QueryCondition.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/QueryConditionExtensions.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/QueryModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/QueryResultModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/SortExpression.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/SourceModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/TemplateQuery/TemplateQueryResult.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/UmbracoProperty.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/UnLinkLoginModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/UpgradeCheckResponse.cs (82%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/UserTourStatus.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ValidatePasswordResetCodeModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/BackOfficeTour.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/BackOfficeTourFile.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/BackOfficeTourStep.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/AssignedContentPermissions.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/AssignedUserGroupPermissions.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentItemBasic.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentPropertyDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DictionaryDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DictionarySave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DomainSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/EditorNavigation.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/EntityBasic.cs (97%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/GetAvailableCompositionsFilter.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/IErrorModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/INotificationModel.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MacroParameter.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MacroParameterDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/Notification.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/TabbedContentItem.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/UserProfile.cs (100%) diff --git a/src/Umbraco.Web/Models/AnchorsModel.cs b/src/Umbraco.Abstractions/Models/AnchorsModel.cs similarity index 100% rename from src/Umbraco.Web/Models/AnchorsModel.cs rename to src/Umbraco.Abstractions/Models/AnchorsModel.cs diff --git a/src/Umbraco.Web/Models/ChangingPasswordModel.cs b/src/Umbraco.Abstractions/Models/ChangingPasswordModel.cs similarity index 100% rename from src/Umbraco.Web/Models/ChangingPasswordModel.cs rename to src/Umbraco.Abstractions/Models/ChangingPasswordModel.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/AuditLog.cs b/src/Umbraco.Abstractions/Models/ContentEditing/AuditLog.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/AuditLog.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/AuditLog.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentDomainsAndCulture.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentDomainsAndCulture.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentDomainsAndCulture.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentDomainsAndCulture.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyBasic.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentPropertyBasic.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyBasic.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentSaveAction.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentSaveAction.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentSaveAction.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentSaveAction.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentSavedState.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentSavedState.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentSavedState.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentSavedState.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DictionaryOverviewDisplay.cs b/src/Umbraco.Abstractions/Models/ContentEditing/DictionaryOverviewDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DictionaryOverviewDisplay.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/DictionaryOverviewDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DictionaryOverviewTranslationDisplay.cs b/src/Umbraco.Abstractions/Models/ContentEditing/DictionaryOverviewTranslationDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DictionaryOverviewTranslationDisplay.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/DictionaryOverviewTranslationDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DictionaryTranslationDisplay.cs b/src/Umbraco.Abstractions/Models/ContentEditing/DictionaryTranslationDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DictionaryTranslationDisplay.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/DictionaryTranslationDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DictionaryTranslationSave.cs b/src/Umbraco.Abstractions/Models/ContentEditing/DictionaryTranslationSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DictionaryTranslationSave.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/DictionaryTranslationSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DomainDisplay.cs b/src/Umbraco.Abstractions/Models/ContentEditing/DomainDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DomainDisplay.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/DomainDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/IContentProperties.cs b/src/Umbraco.Abstractions/Models/ContentEditing/IContentProperties.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/IContentProperties.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/IContentProperties.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/IContentSave.cs b/src/Umbraco.Abstractions/Models/ContentEditing/IContentSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/IContentSave.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/IContentSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/IHaveUploadedFiles.cs b/src/Umbraco.Abstractions/Models/ContentEditing/IHaveUploadedFiles.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/IHaveUploadedFiles.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/IHaveUploadedFiles.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ITabbedContent.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ITabbedContent.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ITabbedContent.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ITabbedContent.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/Language.cs b/src/Umbraco.Abstractions/Models/ContentEditing/Language.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/Language.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/Language.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/LinkDisplay.cs b/src/Umbraco.Abstractions/Models/ContentEditing/LinkDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/LinkDisplay.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/LinkDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/NotificationStyle.cs b/src/Umbraco.Abstractions/Models/ContentEditing/NotificationStyle.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/NotificationStyle.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/NotificationStyle.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/Permission.cs b/src/Umbraco.Abstractions/Models/ContentEditing/Permission.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/Permission.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/Permission.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/PropertyTypeValidation.cs b/src/Umbraco.Abstractions/Models/ContentEditing/PropertyTypeValidation.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/PropertyTypeValidation.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/PropertyTypeValidation.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/Tab.cs b/src/Umbraco.Abstractions/Models/ContentEditing/Tab.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/Tab.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/Tab.cs diff --git a/src/Umbraco.Web/Models/ContentModel.cs b/src/Umbraco.Abstractions/Models/ContentModel.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentModel.cs rename to src/Umbraco.Abstractions/Models/ContentModel.cs diff --git a/src/Umbraco.Web/Models/ContentModelOfTContent.cs b/src/Umbraco.Abstractions/Models/ContentModelOfTContent.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentModelOfTContent.cs rename to src/Umbraco.Abstractions/Models/ContentModelOfTContent.cs diff --git a/src/Umbraco.Web/Models/IContentModel.cs b/src/Umbraco.Abstractions/Models/IContentModel.cs similarity index 100% rename from src/Umbraco.Web/Models/IContentModel.cs rename to src/Umbraco.Abstractions/Models/IContentModel.cs diff --git a/src/Umbraco.Web/Models/ImageCropAnchor.cs b/src/Umbraco.Abstractions/Models/ImageCropAnchor.cs similarity index 100% rename from src/Umbraco.Web/Models/ImageCropAnchor.cs rename to src/Umbraco.Abstractions/Models/ImageCropAnchor.cs diff --git a/src/Umbraco.Web/Models/ImageCropMode.cs b/src/Umbraco.Abstractions/Models/ImageCropMode.cs similarity index 100% rename from src/Umbraco.Web/Models/ImageCropMode.cs rename to src/Umbraco.Abstractions/Models/ImageCropMode.cs diff --git a/src/Umbraco.Web/Models/ImageCropRatioMode.cs b/src/Umbraco.Abstractions/Models/ImageCropRatioMode.cs similarity index 100% rename from src/Umbraco.Web/Models/ImageCropRatioMode.cs rename to src/Umbraco.Abstractions/Models/ImageCropRatioMode.cs diff --git a/src/Umbraco.Web/Models/Link.cs b/src/Umbraco.Abstractions/Models/Link.cs similarity index 100% rename from src/Umbraco.Web/Models/Link.cs rename to src/Umbraco.Abstractions/Models/Link.cs diff --git a/src/Umbraco.Web/Models/LinkType.cs b/src/Umbraco.Abstractions/Models/LinkType.cs similarity index 100% rename from src/Umbraco.Web/Models/LinkType.cs rename to src/Umbraco.Abstractions/Models/LinkType.cs diff --git a/src/Umbraco.Web/Models/LoginModel.cs b/src/Umbraco.Abstractions/Models/LoginModel.cs similarity index 100% rename from src/Umbraco.Web/Models/LoginModel.cs rename to src/Umbraco.Abstractions/Models/LoginModel.cs diff --git a/src/Umbraco.Web/Models/PackageInstallModel.cs b/src/Umbraco.Abstractions/Models/PackageInstallModel.cs similarity index 100% rename from src/Umbraco.Web/Models/PackageInstallModel.cs rename to src/Umbraco.Abstractions/Models/PackageInstallModel.cs diff --git a/src/Umbraco.Web/Models/PackageInstallResult.cs b/src/Umbraco.Abstractions/Models/PackageInstallResult.cs similarity index 100% rename from src/Umbraco.Web/Models/PackageInstallResult.cs rename to src/Umbraco.Abstractions/Models/PackageInstallResult.cs diff --git a/src/Umbraco.Web/Models/PartialViewMacroModel.cs b/src/Umbraco.Abstractions/Models/PartialViewMacroModel.cs similarity index 100% rename from src/Umbraco.Web/Models/PartialViewMacroModel.cs rename to src/Umbraco.Abstractions/Models/PartialViewMacroModel.cs diff --git a/src/Umbraco.Web/Models/PartialViewMacroModelExtensions.cs b/src/Umbraco.Abstractions/Models/PartialViewMacroModelExtensions.cs similarity index 100% rename from src/Umbraco.Web/Models/PartialViewMacroModelExtensions.cs rename to src/Umbraco.Abstractions/Models/PartialViewMacroModelExtensions.cs diff --git a/src/Umbraco.Web/Models/PasswordChangedModel.cs b/src/Umbraco.Abstractions/Models/PasswordChangedModel.cs similarity index 100% rename from src/Umbraco.Web/Models/PasswordChangedModel.cs rename to src/Umbraco.Abstractions/Models/PasswordChangedModel.cs diff --git a/src/Umbraco.Web/Models/PostRedirectModel.cs b/src/Umbraco.Abstractions/Models/PostRedirectModel.cs similarity index 100% rename from src/Umbraco.Web/Models/PostRedirectModel.cs rename to src/Umbraco.Abstractions/Models/PostRedirectModel.cs diff --git a/src/Umbraco.Web/Models/RequestPasswordResetModel.cs b/src/Umbraco.Abstractions/Models/RequestPasswordResetModel.cs similarity index 100% rename from src/Umbraco.Web/Models/RequestPasswordResetModel.cs rename to src/Umbraco.Abstractions/Models/RequestPasswordResetModel.cs diff --git a/src/Umbraco.Web/Models/SendCodeViewModel.cs b/src/Umbraco.Abstractions/Models/SendCodeViewModel.cs similarity index 100% rename from src/Umbraco.Web/Models/SendCodeViewModel.cs rename to src/Umbraco.Abstractions/Models/SendCodeViewModel.cs diff --git a/src/Umbraco.Web/Models/SetPasswordModel.cs b/src/Umbraco.Abstractions/Models/SetPasswordModel.cs similarity index 100% rename from src/Umbraco.Web/Models/SetPasswordModel.cs rename to src/Umbraco.Abstractions/Models/SetPasswordModel.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/ContentTypeModel.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/ContentTypeModel.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/ContentTypeModel.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/ContentTypeModel.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/Operator.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/Operator.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/Operator.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/Operator.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/OperatorFactory.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/OperatorFactory.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/OperatorFactory.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/OperatorFactory.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/OperatorTerm.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/OperatorTerm.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/OperatorTerm.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/OperatorTerm.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/PropertyModel.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/PropertyModel.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/PropertyModel.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/PropertyModel.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/QueryCondition.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/QueryCondition.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/QueryCondition.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/QueryConditionExtensions.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/QueryConditionExtensions.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/QueryConditionExtensions.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/QueryConditionExtensions.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/QueryModel.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/QueryModel.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/QueryModel.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/QueryModel.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/QueryResultModel.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/QueryResultModel.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/QueryResultModel.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/QueryResultModel.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/SortExpression.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/SortExpression.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/SortExpression.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/SortExpression.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/SourceModel.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/SourceModel.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/SourceModel.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/SourceModel.cs diff --git a/src/Umbraco.Web/Models/TemplateQuery/TemplateQueryResult.cs b/src/Umbraco.Abstractions/Models/TemplateQuery/TemplateQueryResult.cs similarity index 100% rename from src/Umbraco.Web/Models/TemplateQuery/TemplateQueryResult.cs rename to src/Umbraco.Abstractions/Models/TemplateQuery/TemplateQueryResult.cs diff --git a/src/Umbraco.Web/Models/UmbracoProperty.cs b/src/Umbraco.Abstractions/Models/UmbracoProperty.cs similarity index 100% rename from src/Umbraco.Web/Models/UmbracoProperty.cs rename to src/Umbraco.Abstractions/Models/UmbracoProperty.cs diff --git a/src/Umbraco.Web/Models/UnLinkLoginModel.cs b/src/Umbraco.Abstractions/Models/UnLinkLoginModel.cs similarity index 100% rename from src/Umbraco.Web/Models/UnLinkLoginModel.cs rename to src/Umbraco.Abstractions/Models/UnLinkLoginModel.cs diff --git a/src/Umbraco.Web/Models/UpgradeCheckResponse.cs b/src/Umbraco.Abstractions/Models/UpgradeCheckResponse.cs similarity index 82% rename from src/Umbraco.Web/Models/UpgradeCheckResponse.cs rename to src/Umbraco.Abstractions/Models/UpgradeCheckResponse.cs index 6b15e33625..854f6cc4de 100644 --- a/src/Umbraco.Web/Models/UpgradeCheckResponse.cs +++ b/src/Umbraco.Abstractions/Models/UpgradeCheckResponse.cs @@ -1,6 +1,5 @@ using System.Runtime.Serialization; -using System.Web; -using Umbraco.Core.Composing; +using System.Net; using Umbraco.Core.Configuration; namespace Umbraco.Web.Models @@ -22,7 +21,7 @@ namespace Umbraco.Web.Models { Type = upgradeType; Comment = upgradeComment; - Url = upgradeUrl + "?version=" + HttpUtility.UrlEncode(umbracoVersion.Current.ToString(3)); + Url = upgradeUrl + "?version=" + WebUtility.UrlEncode(umbracoVersion.Current.ToString(3)); } } } diff --git a/src/Umbraco.Web/Models/UserTourStatus.cs b/src/Umbraco.Abstractions/Models/UserTourStatus.cs similarity index 100% rename from src/Umbraco.Web/Models/UserTourStatus.cs rename to src/Umbraco.Abstractions/Models/UserTourStatus.cs diff --git a/src/Umbraco.Web/Models/ValidatePasswordResetCodeModel.cs b/src/Umbraco.Abstractions/Models/ValidatePasswordResetCodeModel.cs similarity index 100% rename from src/Umbraco.Web/Models/ValidatePasswordResetCodeModel.cs rename to src/Umbraco.Abstractions/Models/ValidatePasswordResetCodeModel.cs diff --git a/src/Umbraco.Web/Models/BackOfficeTour.cs b/src/Umbraco.Infrastructure/Models/BackOfficeTour.cs similarity index 100% rename from src/Umbraco.Web/Models/BackOfficeTour.cs rename to src/Umbraco.Infrastructure/Models/BackOfficeTour.cs diff --git a/src/Umbraco.Web/Models/BackOfficeTourFile.cs b/src/Umbraco.Infrastructure/Models/BackOfficeTourFile.cs similarity index 100% rename from src/Umbraco.Web/Models/BackOfficeTourFile.cs rename to src/Umbraco.Infrastructure/Models/BackOfficeTourFile.cs diff --git a/src/Umbraco.Web/Models/BackOfficeTourStep.cs b/src/Umbraco.Infrastructure/Models/BackOfficeTourStep.cs similarity index 100% rename from src/Umbraco.Web/Models/BackOfficeTourStep.cs rename to src/Umbraco.Infrastructure/Models/BackOfficeTourStep.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/AssignedContentPermissions.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/AssignedContentPermissions.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/AssignedContentPermissions.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/AssignedContentPermissions.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/AssignedUserGroupPermissions.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/AssignedUserGroupPermissions.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/AssignedUserGroupPermissions.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/AssignedUserGroupPermissions.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemBasic.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentItemBasic.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemBasic.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentPropertyDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DictionaryDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DictionaryDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DictionarySave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DictionarySave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DictionarySave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DictionarySave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DomainSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DomainSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DomainSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DomainSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/EditorNavigation.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/EditorNavigation.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/EditorNavigation.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/EditorNavigation.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/EntityBasic.cs similarity index 97% rename from src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/EntityBasic.cs index 6cb2ccffaf..512bc1517d 100644 --- a/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/EntityBasic.cs @@ -3,12 +3,10 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using System.Web.Http.ModelBinding; using Newtonsoft.Json; using Umbraco.Core; using Umbraco.Core.Models.Validation; using Umbraco.Core.Serialization; -using Umbraco.Web.WebApi; namespace Umbraco.Web.Models.ContentEditing { diff --git a/src/Umbraco.Web/Models/ContentEditing/GetAvailableCompositionsFilter.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/GetAvailableCompositionsFilter.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/GetAvailableCompositionsFilter.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/GetAvailableCompositionsFilter.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/IErrorModel.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/IErrorModel.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/IErrorModel.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/IErrorModel.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/INotificationModel.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/INotificationModel.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/INotificationModel.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/INotificationModel.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MacroParameter.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MacroParameter.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MacroParameter.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MacroParameter.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MacroParameterDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MacroParameterDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MacroParameterDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MacroParameterDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/Notification.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/Notification.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/Notification.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/Notification.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/TabbedContentItem.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/TabbedContentItem.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/TabbedContentItem.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/UserProfile.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/UserProfile.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/UserProfile.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/UserProfile.cs diff --git a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj index 795ce65381..bb893ea1df 100644 --- a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj +++ b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj @@ -62,10 +62,6 @@ - - - - diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 0ce7127a5b..f709408555 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -181,17 +181,16 @@ - + - + - + - @@ -226,9 +225,6 @@ - - - @@ -286,8 +282,6 @@ - - @@ -304,7 +298,6 @@ - @@ -388,33 +381,15 @@ - - - - - - - - - - - - - - - - - - @@ -425,9 +400,7 @@ - - @@ -439,9 +412,7 @@ - - @@ -597,7 +568,6 @@ - @@ -617,10 +587,6 @@ - - - - @@ -660,7 +626,6 @@ - @@ -697,25 +662,12 @@ - - - - - - - - - - - - - @@ -745,12 +697,6 @@ - - - - - - @@ -760,7 +706,6 @@ - @@ -770,13 +715,10 @@ - - - @@ -787,8 +729,6 @@ - - @@ -886,11 +826,9 @@ - - @@ -902,17 +840,8 @@ - - - - - - - - - @@ -957,12 +886,9 @@ - - - @@ -972,7 +898,6 @@ - @@ -1073,7 +998,6 @@ - @@ -1083,7 +1007,6 @@ - From 2c8d53ed7104909b3aa98f70e3e4b2bc75afac3b Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 16 Jan 2020 07:25:18 +0100 Subject: [PATCH 2/7] AB3986 - fix from merge --- src/Umbraco.Web/Umbraco.Web.csproj | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 2e3b8c1572..06195b79d9 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -719,14 +719,6 @@ - - - - - - - - From 5a67e5b3956f475b5858b73f95559def3cc4e76b Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 20 Jan 2020 11:37:19 +0100 Subject: [PATCH 3/7] AB4549 - Moved more models --- .../ContentEditing/ContentRedirectUrl.cs | 0 .../Models/ContentEditing/ContentSortOrder.cs | 0 .../CreatedDocumentTypeCollectionResult.cs | 0 .../Models/ContentEditing/IContentSave.cs | 2 +- .../Models/ContentEditing/MoveOrCopy.cs | 0 .../Models/ContentEditing/NotifySetting.cs | 0 .../Models/ContentEditing/ObjectType.cs | 0 .../Models/ContentEditing/PostedFolder.cs | 0 .../ContentEditing/PropertyEditorBasic.cs | 0 .../ContentEditing/PropertyGroupBasic.cs | 0 .../ContentEditing/PropertyTypeBasic.cs | 0 .../ContentEditing/PropertyTypeDisplay.cs | 0 .../Models/ContentEditing/RelationDisplay.cs | 0 .../ContentEditing/RichTextEditorPlugin.cs | 0 .../Models/ContentEditing/RollbackVersion.cs | 0 .../Models/ContentEditing/SearchResult.cs | 0 .../Models/ContentEditing/Section.cs | 0 .../Models/ContentEditing/SnippetDisplay.cs | 0 .../Models/ContentEditing/StyleSheet.cs | 0 .../Models/ContentEditing/StylesheetRule.cs | 0 .../ContentEditing/UmbracoEntityTypes.cs | 0 .../Models/ContentEditing/UnpublishContent.cs | 0 .../Models/ContentEditing/UrlAndAnchors.cs | 0 ...ification.cs => BackOfficeNotification.cs} | 8 +-- .../Models/ContentEditing/CodeFileDisplay.cs | 4 +- .../Models/ContentEditing/ContentBaseSave.cs | 6 +- .../ContentEditing/ContentItemDisplayBase.cs | 4 +- .../ContentPropertyCollectionDto.cs | 2 +- .../ContentEditing/ContentPropertyDto.cs | 2 +- .../ContentEditing/ContentVariationDisplay.cs | 4 +- .../DataTypeConfigurationFieldSave.cs | 0 .../ContentEditing/DataTypeReferences.cs | 0 .../Models/ContentEditing/DataTypeSave.cs | 4 +- .../ContentEditing/DictionaryDisplay.cs | 4 +- .../ContentEditing/INotificationModel.cs | 2 +- .../ContentEditing/MemberGroupDisplay.cs | 4 +- .../Models/ContentEditing/MemberGroupSave.cs | 0 .../ContentEditing/RelationTypeDisplay.cs | 4 +- .../Models/ContentEditing/RelationTypeSave.cs | 0 .../ContentEditing/RichTextEditorCommand.cs | 0 .../RichTextEditorConfiguration.cs | 0 .../ContentEditing/SearchResultEntity.cs | 0 .../Models/ContentEditing/SearchResults.cs | 0 .../ContentEditing/SimpleNotificationModel.cs | 8 +-- .../Models/ContentEditing/TemplateDisplay.cs | 2 +- .../Models/ContentEditing/TreeSearchResult.cs | 1 - .../Models/ContentEditing/UserBasic.cs | 4 +- .../Models/ContentEditing/UserDetail.cs | 0 .../Models/ContentEditing/UserDisplay.cs | 0 .../Models/ContentEditing/UserGroupBasic.cs | 4 +- .../Models/ContentEditing/UserGroupDisplay.cs | 0 .../UserGroupPermissionsSave.cs | 0 .../Models/ContentEditing/UserGroupSave.cs | 2 +- .../Models/ContentEditing/UserSave.cs | 0 .../Routing/UrlInfo.cs | 0 src/Umbraco.Web.UI.Client/package-lock.json | 6 +- .../Umbraco/js/navigation.controller.js | 10 +++- .../Editors/ContentTypeController.cs | 3 +- .../Editors/DictionaryController.cs | 3 +- src/Umbraco.Web/Editors/MacrosController.cs | 2 +- src/Umbraco.Web/Editors/MediaController.cs | 7 +-- .../Editors/PackageInstallController.cs | 3 +- .../ContentEditing/ContentItemDisplay.cs | 4 +- .../ContentTypeCompositionDisplay.cs | 4 +- .../Models/ContentEditing/DataTypeDisplay.cs | 4 +- .../Models/ContentEditing/MacroDisplay.cs | 4 +- .../ContentEditing/MessagesExtensions.cs | 10 ++-- .../ContentEditing/ModelWithNotifications.cs | 4 +- .../Models/ContentEditing/PostedFiles.cs | 4 +- .../Models/ContentTypeImportModel.cs | 2 +- .../Models/LocalPackageInstallModel.cs | 2 +- src/Umbraco.Web/Umbraco.Web.csproj | 55 +------------------ .../AppendCurrentEventMessagesAttribute.cs | 2 +- 73 files changed, 76 insertions(+), 124 deletions(-) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/ContentRedirectUrl.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/ContentSortOrder.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/CreatedDocumentTypeCollectionResult.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/MoveOrCopy.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/NotifySetting.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/ObjectType.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/PostedFolder.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/PropertyEditorBasic.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/PropertyGroupBasic.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/PropertyTypeBasic.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/PropertyTypeDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/RelationDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/RichTextEditorPlugin.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/RollbackVersion.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/SearchResult.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/Section.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/SnippetDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/StyleSheet.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/StylesheetRule.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/UmbracoEntityTypes.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/UnpublishContent.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/UrlAndAnchors.cs (100%) rename src/Umbraco.Infrastructure/Models/ContentEditing/{Notification.cs => BackOfficeNotification.cs} (75%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/CodeFileDisplay.cs (94%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentBaseSave.cs (93%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentItemDisplayBase.cs (92%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentPropertyCollectionDto.cs (87%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentPropertyDto.cs (91%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentVariationDisplay.cs (95%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DataTypeConfigurationFieldSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DataTypeReferences.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DataTypeSave.cs (92%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MemberGroupDisplay.cs (78%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MemberGroupSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/RelationTypeDisplay.cs (93%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/RelationTypeSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/RichTextEditorCommand.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/RichTextEditorConfiguration.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/SearchResultEntity.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/SearchResults.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/SimpleNotificationModel.cs (70%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/TemplateDisplay.cs (94%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/TreeSearchResult.cs (98%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/UserBasic.cs (93%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/UserDetail.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/UserDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/UserGroupBasic.cs (90%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/UserGroupDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/UserGroupPermissionsSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/UserGroupSave.cs (97%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/UserSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Routing/UrlInfo.cs (100%) diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentRedirectUrl.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentRedirectUrl.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentRedirectUrl.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentRedirectUrl.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentSortOrder.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentSortOrder.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentSortOrder.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentSortOrder.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/CreatedDocumentTypeCollectionResult.cs b/src/Umbraco.Abstractions/Models/ContentEditing/CreatedDocumentTypeCollectionResult.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/CreatedDocumentTypeCollectionResult.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/CreatedDocumentTypeCollectionResult.cs diff --git a/src/Umbraco.Abstractions/Models/ContentEditing/IContentSave.cs b/src/Umbraco.Abstractions/Models/ContentEditing/IContentSave.cs index bcac5d0aea..789b44dadf 100644 --- a/src/Umbraco.Abstractions/Models/ContentEditing/IContentSave.cs +++ b/src/Umbraco.Abstractions/Models/ContentEditing/IContentSave.cs @@ -6,7 +6,7 @@ namespace Umbraco.Web.Models.ContentEditing /// An interface exposes the shared parts of content, media, members that we use during model binding in order to share logic /// /// - internal interface IContentSave : IHaveUploadedFiles + public interface IContentSave : IHaveUploadedFiles where TPersisted : IContentBase { /// diff --git a/src/Umbraco.Web/Models/ContentEditing/MoveOrCopy.cs b/src/Umbraco.Abstractions/Models/ContentEditing/MoveOrCopy.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MoveOrCopy.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/MoveOrCopy.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/NotifySetting.cs b/src/Umbraco.Abstractions/Models/ContentEditing/NotifySetting.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/NotifySetting.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/NotifySetting.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ObjectType.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ObjectType.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ObjectType.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ObjectType.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/PostedFolder.cs b/src/Umbraco.Abstractions/Models/ContentEditing/PostedFolder.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/PostedFolder.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/PostedFolder.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/PropertyEditorBasic.cs b/src/Umbraco.Abstractions/Models/ContentEditing/PropertyEditorBasic.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/PropertyEditorBasic.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/PropertyEditorBasic.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/PropertyGroupBasic.cs b/src/Umbraco.Abstractions/Models/ContentEditing/PropertyGroupBasic.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/PropertyGroupBasic.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/PropertyGroupBasic.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/PropertyTypeBasic.cs b/src/Umbraco.Abstractions/Models/ContentEditing/PropertyTypeBasic.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/PropertyTypeBasic.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/PropertyTypeBasic.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/PropertyTypeDisplay.cs b/src/Umbraco.Abstractions/Models/ContentEditing/PropertyTypeDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/PropertyTypeDisplay.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/PropertyTypeDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/RelationDisplay.cs b/src/Umbraco.Abstractions/Models/ContentEditing/RelationDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/RelationDisplay.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/RelationDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/RichTextEditorPlugin.cs b/src/Umbraco.Abstractions/Models/ContentEditing/RichTextEditorPlugin.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/RichTextEditorPlugin.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/RichTextEditorPlugin.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/RollbackVersion.cs b/src/Umbraco.Abstractions/Models/ContentEditing/RollbackVersion.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/RollbackVersion.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/RollbackVersion.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/SearchResult.cs b/src/Umbraco.Abstractions/Models/ContentEditing/SearchResult.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/SearchResult.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/SearchResult.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/Section.cs b/src/Umbraco.Abstractions/Models/ContentEditing/Section.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/Section.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/Section.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/SnippetDisplay.cs b/src/Umbraco.Abstractions/Models/ContentEditing/SnippetDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/SnippetDisplay.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/SnippetDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/StyleSheet.cs b/src/Umbraco.Abstractions/Models/ContentEditing/StyleSheet.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/StyleSheet.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/StyleSheet.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/StylesheetRule.cs b/src/Umbraco.Abstractions/Models/ContentEditing/StylesheetRule.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/StylesheetRule.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/StylesheetRule.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/UmbracoEntityTypes.cs b/src/Umbraco.Abstractions/Models/ContentEditing/UmbracoEntityTypes.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/UmbracoEntityTypes.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/UmbracoEntityTypes.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/UnpublishContent.cs b/src/Umbraco.Abstractions/Models/ContentEditing/UnpublishContent.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/UnpublishContent.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/UnpublishContent.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/UrlAndAnchors.cs b/src/Umbraco.Abstractions/Models/ContentEditing/UrlAndAnchors.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/UrlAndAnchors.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/UrlAndAnchors.cs diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/Notification.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/BackOfficeNotification.cs similarity index 75% rename from src/Umbraco.Infrastructure/Models/ContentEditing/Notification.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/BackOfficeNotification.cs index 8852b2ca02..0dd132a503 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/Notification.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/BackOfficeNotification.cs @@ -3,14 +3,14 @@ namespace Umbraco.Web.Models.ContentEditing { [DataContract(Name = "notification", Namespace = "")] - public class Notification + public class BackOfficeNotification { - public Notification() + public BackOfficeNotification() { } - public Notification(string header, string message, NotificationStyle notificationType) + public BackOfficeNotification(string header, string message, NotificationStyle notificationType) { Header = header; Message = message; @@ -25,6 +25,6 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "type")] public NotificationStyle NotificationType { get; set; } - + } } diff --git a/src/Umbraco.Web/Models/ContentEditing/CodeFileDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/CodeFileDisplay.cs similarity index 94% rename from src/Umbraco.Web/Models/ContentEditing/CodeFileDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/CodeFileDisplay.cs index 8c89bf263e..7e186932ac 100644 --- a/src/Umbraco.Web/Models/ContentEditing/CodeFileDisplay.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/CodeFileDisplay.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.Models.ContentEditing { public CodeFileDisplay() { - Notifications = new List(); + Notifications = new List(); } /// @@ -53,7 +53,7 @@ namespace Umbraco.Web.Models.ContentEditing [ReadOnly(true)] public string Id { get; set; } - public List Notifications { get; private set; } + public List Notifications { get; private set; } /// /// Some custom validation is required for valid file names diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentBaseSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentBaseSave.cs similarity index 93% rename from src/Umbraco.Web/Models/ContentEditing/ContentBaseSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentBaseSave.cs index 8a840a60c3..47eb1852e7 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentBaseSave.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentBaseSave.cs @@ -31,10 +31,10 @@ namespace Umbraco.Web.Models.ContentEditing /// [IgnoreDataMember] TPersisted IContentSave.PersistedContent { get; set; } - + //Non explicit internal getter so we don't need to explicitly cast in our own code [IgnoreDataMember] - internal TPersisted PersistedContent + public TPersisted PersistedContent { get => ((IContentSave)this).PersistedContent; set => ((IContentSave) this).PersistedContent = value; @@ -49,7 +49,7 @@ namespace Umbraco.Web.Models.ContentEditing /// This is not used for outgoing model information. /// [IgnoreDataMember] - internal ContentPropertyCollectionDto PropertyCollectionDto { get; set; } + public ContentPropertyCollectionDto PropertyCollectionDto { get; set; } #endregion diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplayBase.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplayBase.cs similarity index 92% rename from src/Umbraco.Web/Models/ContentEditing/ContentItemDisplayBase.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplayBase.cs index 7e2ba8e6cd..e0beae7fce 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplayBase.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplayBase.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.Models.ContentEditing { protected ContentItemDisplayBase() { - Notifications = new List(); + Notifications = new List(); Errors = new Dictionary(); } @@ -31,7 +31,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "notifications")] [ReadOnly(true)] - public List Notifications { get; private set; } + public List Notifications { get; private set; } /// /// This is used for validation of a content item. diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyCollectionDto.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyCollectionDto.cs similarity index 87% rename from src/Umbraco.Web/Models/ContentEditing/ContentPropertyCollectionDto.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyCollectionDto.cs index dc6a92cc93..3e9da2a56e 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyCollectionDto.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyCollectionDto.cs @@ -11,7 +11,7 @@ namespace Umbraco.Web.Models.ContentEditing /// /// This is only used during mapping operations, it is not used for angular purposes /// - internal class ContentPropertyCollectionDto : IContentProperties + public class ContentPropertyCollectionDto : IContentProperties { public ContentPropertyCollectionDto() { diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyDto.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyDto.cs similarity index 91% rename from src/Umbraco.Web/Models/ContentEditing/ContentPropertyDto.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyDto.cs index 83e5e2a9b2..466030226d 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyDto.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyDto.cs @@ -8,7 +8,7 @@ namespace Umbraco.Web.Models.ContentEditing /// /// Represents a content property from the database /// - internal class ContentPropertyDto : ContentPropertyBasic + public class ContentPropertyDto : ContentPropertyBasic { public IDataType DataType { get; set; } diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentVariationDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentVariationDisplay.cs similarity index 95% rename from src/Umbraco.Web/Models/ContentEditing/ContentVariationDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentVariationDisplay.cs index aff79d7b9d..cf871142a6 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentVariationDisplay.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentVariationDisplay.cs @@ -18,7 +18,7 @@ namespace Umbraco.Web.Models.ContentEditing public ContentVariantDisplay() { Tabs = new List>(); - Notifications = new List(); + Notifications = new List(); } [DataMember(Name = "name", IsRequired = true)] @@ -76,7 +76,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "notifications")] [ReadOnly(true)] - public List Notifications { get; private set; } + public List Notifications { get; private set; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/DataTypeConfigurationFieldSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeConfigurationFieldSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DataTypeConfigurationFieldSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeConfigurationFieldSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DataTypeReferences.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeReferences.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DataTypeReferences.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeReferences.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeSave.cs similarity index 92% rename from src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeSave.cs index ad74261543..db4acd4c4e 100644 --- a/src/Umbraco.Web/Models/ContentEditing/DataTypeSave.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeSave.cs @@ -39,13 +39,13 @@ namespace Umbraco.Web.Models.ContentEditing /// Gets or sets the persisted data type. /// [IgnoreDataMember] - internal IDataType PersistedDataType { get; set; } + public IDataType PersistedDataType { get; set; } /// /// Gets or sets the property editor. /// [IgnoreDataMember] - internal IDataEditor PropertyEditor { get; set; } + public IDataEditor PropertyEditor { get; set; } } } diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs index bb93c72ac7..9e0dee36f6 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.Models.ContentEditing /// public DictionaryDisplay() { - this.Notifications = new List(); + this.Notifications = new List(); this.Translations = new List(); } @@ -24,7 +24,7 @@ namespace Umbraco.Web.Models.ContentEditing /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// [DataMember(Name = "notifications")] - public List Notifications { get; private set; } + public List Notifications { get; private set; } /// /// Gets or sets the parent id. diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/INotificationModel.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/INotificationModel.cs index d718ae65f5..910d47a221 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/INotificationModel.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/INotificationModel.cs @@ -9,6 +9,6 @@ namespace Umbraco.Web.Models.ContentEditing /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// [DataMember(Name = "notifications")] - List Notifications { get; } + List Notifications { get; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberGroupDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MemberGroupDisplay.cs similarity index 78% rename from src/Umbraco.Web/Models/ContentEditing/MemberGroupDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MemberGroupDisplay.cs index 6453fdb7a4..7706514711 100644 --- a/src/Umbraco.Web/Models/ContentEditing/MemberGroupDisplay.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/MemberGroupDisplay.cs @@ -9,13 +9,13 @@ namespace Umbraco.Web.Models.ContentEditing { public MemberGroupDisplay() { - Notifications = new List(); + Notifications = new List(); } /// /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// [DataMember(Name = "notifications")] - public List Notifications { get; private set; } + public List Notifications { get; private set; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberGroupSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MemberGroupSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MemberGroupSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MemberGroupSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/RelationTypeDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/RelationTypeDisplay.cs similarity index 93% rename from src/Umbraco.Web/Models/ContentEditing/RelationTypeDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/RelationTypeDisplay.cs index b7f209cd20..49b0e15e6b 100644 --- a/src/Umbraco.Web/Models/ContentEditing/RelationTypeDisplay.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/RelationTypeDisplay.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.Models.ContentEditing { public RelationTypeDisplay() { - Notifications = new List(); + Notifications = new List(); } /// @@ -51,6 +51,6 @@ namespace Umbraco.Web.Models.ContentEditing /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// [DataMember(Name = "notifications")] - public List Notifications { get; private set; } + public List Notifications { get; private set; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/RelationTypeSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/RelationTypeSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/RelationTypeSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/RelationTypeSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/RichTextEditorCommand.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/RichTextEditorCommand.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/RichTextEditorCommand.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/RichTextEditorCommand.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/RichTextEditorConfiguration.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/RichTextEditorConfiguration.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/RichTextEditorConfiguration.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/RichTextEditorConfiguration.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/SearchResultEntity.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/SearchResultEntity.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/SearchResultEntity.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/SearchResultEntity.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/SearchResults.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/SearchResults.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/SearchResults.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/SearchResults.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/SimpleNotificationModel.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/SimpleNotificationModel.cs similarity index 70% rename from src/Umbraco.Web/Models/ContentEditing/SimpleNotificationModel.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/SimpleNotificationModel.cs index af35412a49..6b74ba5e0a 100644 --- a/src/Umbraco.Web/Models/ContentEditing/SimpleNotificationModel.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/SimpleNotificationModel.cs @@ -8,19 +8,19 @@ namespace Umbraco.Web.Models.ContentEditing { public SimpleNotificationModel() { - Notifications = new List(); + Notifications = new List(); } - public SimpleNotificationModel(params Notification[] notifications) + public SimpleNotificationModel(params BackOfficeNotification[] notifications) { - Notifications = new List(notifications); + Notifications = new List(notifications); } /// /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// [DataMember(Name = "notifications")] - public List Notifications { get; private set; } + public List Notifications { get; private set; } /// /// A default message diff --git a/src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/TemplateDisplay.cs similarity index 94% rename from src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/TemplateDisplay.cs index ffa4e4e100..b752aa1af2 100644 --- a/src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/TemplateDisplay.cs @@ -42,6 +42,6 @@ namespace Umbraco.Web.Models.ContentEditing /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// [DataMember(Name = "notifications")] - public List Notifications { get; private set; } + public List Notifications { get; private set; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/TreeSearchResult.cs similarity index 98% rename from src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/TreeSearchResult.cs index ce4c053099..820f3bae70 100644 --- a/src/Umbraco.Web/Models/ContentEditing/TreeSearchResult.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/TreeSearchResult.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Examine; namespace Umbraco.Web.Models.ContentEditing { diff --git a/src/Umbraco.Web/Models/ContentEditing/UserBasic.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/UserBasic.cs similarity index 93% rename from src/Umbraco.Web/Models/ContentEditing/UserBasic.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/UserBasic.cs index 3f1b879705..9a48a8243e 100644 --- a/src/Umbraco.Web/Models/ContentEditing/UserBasic.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/UserBasic.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.Models.ContentEditing { public UserBasic() { - Notifications = new List(); + Notifications = new List(); UserGroups = new List(); } @@ -63,6 +63,6 @@ namespace Umbraco.Web.Models.ContentEditing /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// [DataMember(Name = "notifications")] - public List Notifications { get; private set; } + public List Notifications { get; private set; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/UserDetail.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/UserDetail.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/UserDetail.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/UserDetail.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/UserDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/UserDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/UserDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/UserDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupBasic.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupBasic.cs similarity index 90% rename from src/Umbraco.Web/Models/ContentEditing/UserGroupBasic.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupBasic.cs index 0446ed6d34..3d959e0d32 100644 --- a/src/Umbraco.Web/Models/ContentEditing/UserGroupBasic.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupBasic.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.Models.ContentEditing { public UserGroupBasic() { - Notifications = new List(); + Notifications = new List(); Sections = Enumerable.Empty
(); } @@ -17,7 +17,7 @@ namespace Umbraco.Web.Models.ContentEditing /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// [DataMember(Name = "notifications")] - public List Notifications { get; private set; } + public List Notifications { get; private set; } [DataMember(Name = "sections")] public IEnumerable
Sections { get; set; } diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/UserGroupDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupPermissionsSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/UserGroupPermissionsSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupPermissionsSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/UserGroupSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupSave.cs similarity index 97% rename from src/Umbraco.Web/Models/ContentEditing/UserGroupSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupSave.cs index 4172033188..4b76ec1bec 100644 --- a/src/Umbraco.Web/Models/ContentEditing/UserGroupSave.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/UserGroupSave.cs @@ -57,7 +57,7 @@ namespace Umbraco.Web.Models.ContentEditing /// The real persisted user group /// [IgnoreDataMember] - internal IUserGroup PersistedUserGroup { get; set; } + public IUserGroup PersistedUserGroup { get; set; } public IEnumerable Validate(ValidationContext validationContext) { diff --git a/src/Umbraco.Web/Models/ContentEditing/UserSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/UserSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/UserSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/UserSave.cs diff --git a/src/Umbraco.Web/Routing/UrlInfo.cs b/src/Umbraco.Infrastructure/Routing/UrlInfo.cs similarity index 100% rename from src/Umbraco.Web/Routing/UrlInfo.cs rename to src/Umbraco.Infrastructure/Routing/UrlInfo.cs diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 4b3afbad18..9182bf89c3 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -9252,9 +9252,9 @@ "dev": true }, "nouislider": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/nouislider/-/nouislider-14.0.2.tgz", - "integrity": "sha512-N4AQStV4frh+XcLUwMI/hZpBP6tRboDE/4LZ7gzfxMVXFi/2J9URphnm40Ff4KEyrAVGSGaWApvljoMzTNWBlA==" + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/nouislider/-/nouislider-14.1.1.tgz", + "integrity": "sha512-3/+Z/pTBoWoJf2YXSEWRmS27LW2XxOBmGEzkPyRzB/J6QvL+0mS3QwcQp0SmWhgO5CMzbSxPmb1lDDD4HP12bg==" }, "now-and-later": { "version": "2.0.1", diff --git a/src/Umbraco.Web.UI/Umbraco/js/navigation.controller.js b/src/Umbraco.Web.UI/Umbraco/js/navigation.controller.js index b585d22e9f..194c45afe6 100644 --- a/src/Umbraco.Web.UI/Umbraco/js/navigation.controller.js +++ b/src/Umbraco.Web.UI/Umbraco/js/navigation.controller.js @@ -510,6 +510,14 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar if (!event) { return; } + closeTree(); + }; + + $scope.onOutsideClick = function() { + closeTree(); + }; + + function closeTree() { if (!appState.getGlobalState("touchDevice")) { treeActive = false; $timeout(function () { @@ -518,7 +526,7 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar } }, 300); } - }; + } $scope.toggleLanguageSelector = function () { $scope.page.languageSelectorIsOpen = !$scope.page.languageSelectorIsOpen; diff --git a/src/Umbraco.Web/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index b9bde906ea..535c03852b 100644 --- a/src/Umbraco.Web/Editors/ContentTypeController.cs +++ b/src/Umbraco.Web/Editors/ContentTypeController.cs @@ -29,7 +29,6 @@ using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; using Umbraco.Web.WebApi.Filters; using Constants = Umbraco.Core.Constants; -using Notification = Umbraco.Web.Models.ContentEditing.Notification; namespace Umbraco.Web.Editors { @@ -598,7 +597,7 @@ namespace Umbraco.Web.Editors } else { - model.Notifications.Add(new Notification( + model.Notifications.Add(new BackOfficeNotification( Services.TextService.Localize("speechBubbles/operationFailedHeader"), Services.TextService.Localize("media/disallowedFileType"), NotificationStyle.Warning)); diff --git a/src/Umbraco.Web/Editors/DictionaryController.cs b/src/Umbraco.Web/Editors/DictionaryController.cs index ce808bab1e..83665a1042 100644 --- a/src/Umbraco.Web/Editors/DictionaryController.cs +++ b/src/Umbraco.Web/Editors/DictionaryController.cs @@ -17,7 +17,6 @@ using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; using Umbraco.Web.WebApi.Filters; using Constants = Umbraco.Core.Constants; -using Notification = Umbraco.Web.Models.ContentEditing.Notification; namespace Umbraco.Web.Editors { @@ -187,7 +186,7 @@ namespace Umbraco.Web.Editors var model = Mapper.Map(dictionaryItem); - model.Notifications.Add(new Notification( + model.Notifications.Add(new BackOfficeNotification( Services.TextService.Localize("speechBubbles/dictionaryItemSaved", userCulture), string.Empty, NotificationStyle.Success)); diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index 12f0933500..81fbe2bd11 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -193,7 +193,7 @@ namespace Umbraco.Web.Editors macroDisplay.Notifications.Clear(); - macroDisplay.Notifications.Add(new Models.ContentEditing.Notification("Success", "Macro saved", NotificationStyle.Success)); + macroDisplay.Notifications.Add(new Models.ContentEditing.BackOfficeNotification("Success", "Macro saved", NotificationStyle.Success)); return this.Request.CreateResponse(HttpStatusCode.OK, macroDisplay); } diff --git a/src/Umbraco.Web/Editors/MediaController.cs b/src/Umbraco.Web/Editors/MediaController.cs index fee7128f69..51b6ad2a3d 100644 --- a/src/Umbraco.Web/Editors/MediaController.cs +++ b/src/Umbraco.Web/Editors/MediaController.cs @@ -47,7 +47,6 @@ using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; using Umbraco.Web.WebApi.Filters; using Constants = Umbraco.Core.Constants; -using Notification = Umbraco.Web.Models.ContentEditing.Notification; using Umbraco.Core.Strings; namespace Umbraco.Web.Editors @@ -458,7 +457,7 @@ namespace Umbraco.Web.Editors if (sourceParentID == destinationParentID) { - return Request.CreateValidationErrorResponse(new SimpleNotificationModel(new Notification("",Services.TextService.Localize("media/moveToSameFolderFailed"),NotificationStyle.Error))); + return Request.CreateValidationErrorResponse(new SimpleNotificationModel(new BackOfficeNotification("",Services.TextService.Localize("media/moveToSameFolderFailed"),NotificationStyle.Error))); } if (moveResult == false) { @@ -771,7 +770,7 @@ namespace Umbraco.Web.Editors } else { - tempFiles.Notifications.Add(new Notification( + tempFiles.Notifications.Add(new BackOfficeNotification( Services.TextService.Localize("speechBubbles/operationFailedHeader"), Services.TextService.Localize("media/disallowedFileType"), NotificationStyle.Warning)); @@ -862,7 +861,7 @@ namespace Umbraco.Web.Editors { throw new HttpResponseException(Request.CreateResponse( HttpStatusCode.Forbidden, - new SimpleNotificationModel(new Notification( + new SimpleNotificationModel(new BackOfficeNotification( Services.TextService.Localize("speechBubbles/operationFailedHeader"), Services.TextService.Localize("speechBubbles/invalidUserPermissionsText"), NotificationStyle.Warning)))); diff --git a/src/Umbraco.Web/Editors/PackageInstallController.cs b/src/Umbraco.Web/Editors/PackageInstallController.cs index 5851d64eba..7dec24d9a4 100644 --- a/src/Umbraco.Web/Editors/PackageInstallController.cs +++ b/src/Umbraco.Web/Editors/PackageInstallController.cs @@ -24,7 +24,6 @@ using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; using Umbraco.Web.WebApi.Filters; using File = System.IO.File; -using Notification = Umbraco.Web.Models.ContentEditing.Notification; namespace Umbraco.Web.Editors { @@ -193,7 +192,7 @@ namespace Umbraco.Web.Editors } else { - model.Notifications.Add(new Notification( + model.Notifications.Add(new BackOfficeNotification( Services.TextService.Localize("speechBubbles/operationFailedHeader"), Services.TextService.Localize("media/disallowedFileType"), NotificationStyle.Warning)); diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs index b6a90a93c3..b135ae573e 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs @@ -21,7 +21,7 @@ namespace Umbraco.Web.Models.ContentEditing public ContentItemDisplay() { AllowPreview = true; - Notifications = new List(); + Notifications = new List(); Errors = new Dictionary(); Variants = new List(); ContentApps = new List(); @@ -191,7 +191,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "notifications")] [ReadOnly(true)] - public List Notifications { get; private set; } + public List Notifications { get; private set; } /// /// This is used for validation of a content item. diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentTypeCompositionDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/ContentTypeCompositionDisplay.cs index 96b540d3ba..77b5f53b24 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentTypeCompositionDisplay.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ContentTypeCompositionDisplay.cs @@ -11,7 +11,7 @@ namespace Umbraco.Web.Models.ContentEditing //initialize collections so at least their never null AllowedContentTypes = new List(); CompositeContentTypes = new List(); - Notifications = new List(); + Notifications = new List(); } //name, alias, icon, thumb, desc, inherited from basic @@ -40,7 +40,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "notifications")] [ReadOnly(true)] - public List Notifications { get; private set; } + public List Notifications { get; private set; } /// /// This is used for validation of a content item. diff --git a/src/Umbraco.Web/Models/ContentEditing/DataTypeDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/DataTypeDisplay.cs index a234d1e76f..9bead4bf5d 100644 --- a/src/Umbraco.Web/Models/ContentEditing/DataTypeDisplay.cs +++ b/src/Umbraco.Web/Models/ContentEditing/DataTypeDisplay.cs @@ -13,7 +13,7 @@ namespace Umbraco.Web.Models.ContentEditing { public DataTypeDisplay() { - Notifications = new List(); + Notifications = new List(); } /// @@ -33,7 +33,7 @@ namespace Umbraco.Web.Models.ContentEditing /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// [DataMember(Name = "notifications")] - public List Notifications { get; private set; } + public List Notifications { get; private set; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs index e84887b88b..33d2a959b6 100644 --- a/src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs +++ b/src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs @@ -14,13 +14,13 @@ namespace Umbraco.Web.Models.ContentEditing /// public MacroDisplay() { - this.Notifications = new List(); + this.Notifications = new List(); this.Parameters = new List(); } /// [DataMember(Name = "notifications")] - public List Notifications { get; } + public List Notifications { get; } /// /// Gets or sets a value indicating whether the macro can be used in a rich text editor. diff --git a/src/Umbraco.Web/Models/ContentEditing/MessagesExtensions.cs b/src/Umbraco.Web/Models/ContentEditing/MessagesExtensions.cs index 1f526a50f3..c27fa39d44 100644 --- a/src/Umbraco.Web/Models/ContentEditing/MessagesExtensions.cs +++ b/src/Umbraco.Web/Models/ContentEditing/MessagesExtensions.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.Models.ContentEditing { if (model.Exists(header, msg, type)) return; - model.Notifications.Add(new Notification() + model.Notifications.Add(new BackOfficeNotification() { Header = header, Message = msg, @@ -22,7 +22,7 @@ namespace Umbraco.Web.Models.ContentEditing { if (model.Exists(header, msg, NotificationStyle.Success)) return; - model.Notifications.Add(new Notification() + model.Notifications.Add(new BackOfficeNotification() { Header = header, Message = msg, @@ -34,7 +34,7 @@ namespace Umbraco.Web.Models.ContentEditing { if (model.Exists(header, msg, NotificationStyle.Error)) return; - model.Notifications.Add(new Notification() + model.Notifications.Add(new BackOfficeNotification() { Header = header, Message = msg, @@ -46,7 +46,7 @@ namespace Umbraco.Web.Models.ContentEditing { if (model.Exists(header, msg, NotificationStyle.Warning)) return; - model.Notifications.Add(new Notification() + model.Notifications.Add(new BackOfficeNotification() { Header = header, Message = msg, @@ -58,7 +58,7 @@ namespace Umbraco.Web.Models.ContentEditing { if (model.Exists(header, msg, NotificationStyle.Info)) return; - model.Notifications.Add(new Notification() + model.Notifications.Add(new BackOfficeNotification() { Header = header, Message = msg, diff --git a/src/Umbraco.Web/Models/ContentEditing/ModelWithNotifications.cs b/src/Umbraco.Web/Models/ContentEditing/ModelWithNotifications.cs index d4e979eb85..2cf34e029d 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ModelWithNotifications.cs +++ b/src/Umbraco.Web/Models/ContentEditing/ModelWithNotifications.cs @@ -13,7 +13,7 @@ namespace Umbraco.Web.Models.ContentEditing public ModelWithNotifications(T value) { Value = value; - Notifications = new List(); + Notifications = new List(); } /// @@ -26,6 +26,6 @@ namespace Umbraco.Web.Models.ContentEditing /// The notifications /// [DataMember(Name = "notifications")] - public List Notifications { get; private set; } + public List Notifications { get; private set; } } } diff --git a/src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs b/src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs index 4f3e5dbb18..43b018653f 100644 --- a/src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs +++ b/src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs @@ -14,11 +14,11 @@ namespace Umbraco.Web.Models.ContentEditing public PostedFiles() { UploadedFiles = new List(); - Notifications = new List(); + Notifications = new List(); } public List UploadedFiles { get; private set; } [DataMember(Name = "notifications")] - public List Notifications { get; private set; } + public List Notifications { get; private set; } } } diff --git a/src/Umbraco.Web/Models/ContentTypeImportModel.cs b/src/Umbraco.Web/Models/ContentTypeImportModel.cs index f6f9a5926d..0880c5d1a3 100644 --- a/src/Umbraco.Web/Models/ContentTypeImportModel.cs +++ b/src/Umbraco.Web/Models/ContentTypeImportModel.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.Models public string Name { get; set; } [DataMember(Name = "notifications")] - public List Notifications { get; } = new List(); + public List Notifications { get; } = new List(); [DataMember(Name = "tempFileName")] public string TempFileName { get; set; } diff --git a/src/Umbraco.Web/Models/LocalPackageInstallModel.cs b/src/Umbraco.Web/Models/LocalPackageInstallModel.cs index 9d017148a2..4eab8ed2c2 100644 --- a/src/Umbraco.Web/Models/LocalPackageInstallModel.cs +++ b/src/Umbraco.Web/Models/LocalPackageInstallModel.cs @@ -14,7 +14,7 @@ namespace Umbraco.Web.Models public List UploadedFiles { get; } = new List(); [DataMember(Name = "notifications")] - public List Notifications { get; } = new List(); + public List Notifications { get; } = new List(); /// /// A flag to determine if this package is compatible to be installed diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 06195b79d9..f496581711 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -187,12 +187,12 @@ + - - + @@ -267,14 +267,6 @@ - - - - - - - - @@ -401,26 +393,10 @@ - - - - - - - - - - - - - - - - @@ -518,7 +494,6 @@ - @@ -537,8 +512,6 @@ - - @@ -575,9 +548,6 @@ - - - @@ -599,7 +569,6 @@ - @@ -656,7 +625,6 @@ - @@ -706,16 +674,9 @@ - - - - - - - @@ -732,10 +693,7 @@ - - - @@ -791,7 +749,6 @@ - @@ -813,11 +770,7 @@ - - - - @@ -838,7 +791,6 @@ - @@ -855,10 +807,7 @@ - - - diff --git a/src/Umbraco.Web/WebApi/Filters/AppendCurrentEventMessagesAttribute.cs b/src/Umbraco.Web/WebApi/Filters/AppendCurrentEventMessagesAttribute.cs index 8669533e78..949d5daced 100644 --- a/src/Umbraco.Web/WebApi/Filters/AppendCurrentEventMessagesAttribute.cs +++ b/src/Umbraco.Web/WebApi/Filters/AppendCurrentEventMessagesAttribute.cs @@ -53,7 +53,7 @@ namespace Umbraco.Web.WebApi.Filters throw new ArgumentOutOfRangeException(); } - notifications.Notifications.Add(new Notification + notifications.Notifications.Add(new BackOfficeNotification { Message = eventMessage.Message, Header = eventMessage.Category, From 9fa18fe9a30f1ce384174e8bc7e693e9c5b2cc57 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 20 Jan 2020 15:20:21 +0100 Subject: [PATCH 4/7] AB4549 - Moved more models --- .../Models/ContentEditing/ContentItemSave.cs | 10 +++--- .../ContentPropertyCollectionDto.cs | 2 -- .../ContentEditing/ContentPropertyDto.cs | 5 +-- .../ContentEditing/ContentVariantSave.cs | 0 .../ContentEditing/MemberPropertyTypeBasic.cs | 0 .../MemberPropertyTypeDisplay.cs | 0 .../RedirectUrlSearchResults.cs | 0 .../ContentEditing/ContentItemDisplay.cs | 4 +-- .../Models/ContentEditing/ContentTypeBasic.cs | 22 ++----------- .../ContentTypeCompositionDisplay.cs | 0 .../Models/ContentEditing/ContentTypeSave.cs | 0 .../Models/ContentEditing/DataTypeBasic.cs | 0 .../DataTypeConfigurationFieldDisplay.cs | 0 .../Models/ContentEditing/DataTypeDisplay.cs | 0 .../ContentEditing/DocumentTypeDisplay.cs | 0 .../Models/ContentEditing/DocumentTypeSave.cs | 0 .../ListViewAwareContentItemDisplayBase.cs | 0 .../Models/ContentEditing/MacroDisplay.cs | 0 .../Models/ContentEditing/MediaItemDisplay.cs | 0 .../Models/ContentEditing/MediaItemSave.cs | 1 - .../Models/ContentEditing/MediaTypeDisplay.cs | 0 .../Models/ContentEditing/MediaTypeSave.cs | 0 .../Models/ContentEditing/MemberBasic.cs | 0 .../Models/ContentEditing/MemberDisplay.cs | 0 .../ContentEditing/MemberListDisplay.cs | 0 .../Models/ContentEditing/MemberSave.cs | 6 +--- .../ContentEditing/MemberTypeDisplay.cs | 0 .../Models/ContentEditing/MemberTypeSave.cs | 0 .../ContentEditing/MessagesExtensions.cs | 0 .../ContentEditing/ModelWithNotifications.cs | 0 .../Models/ContentEditing/PostedFiles.cs | 2 +- .../ContentEditing/PropertyGroupDisplay.cs | 0 .../Models/ContentEditing/PublicAccess.cs | 0 .../Models/ContentEditing/UserInvite.cs | 4 +-- .../Mapping/ContentTypeMapDefinition.cs | 30 ++++++++++++++++-- src/Umbraco.Web/Umbraco.Web.csproj | 31 ------------------- 36 files changed, 41 insertions(+), 76 deletions(-) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/ContentItemSave.cs (95%) rename src/{Umbraco.Infrastructure => Umbraco.Abstractions}/Models/ContentEditing/ContentPropertyCollectionDto.cs (92%) rename src/{Umbraco.Infrastructure => Umbraco.Abstractions}/Models/ContentEditing/ContentPropertyDto.cs (82%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/ContentVariantSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/MemberPropertyTypeBasic.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/MemberPropertyTypeDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Abstractions}/Models/ContentEditing/RedirectUrlSearchResults.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentItemDisplay.cs (98%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentTypeBasic.cs (84%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentTypeCompositionDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ContentTypeSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DataTypeBasic.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DataTypeConfigurationFieldDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DataTypeDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DocumentTypeDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/DocumentTypeSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ListViewAwareContentItemDisplayBase.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MacroDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MediaItemDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MediaItemSave.cs (90%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MediaTypeDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MediaTypeSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MemberBasic.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MemberDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MemberListDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MemberSave.cs (92%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MemberTypeDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MemberTypeSave.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/MessagesExtensions.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/ModelWithNotifications.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/PostedFiles.cs (91%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/PropertyGroupDisplay.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/ContentEditing/PublicAccess.cs (100%) diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentItemSave.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentItemSave.cs similarity index 95% rename from src/Umbraco.Web/Models/ContentEditing/ContentItemSave.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentItemSave.cs index 4dbbb1385a..195c1800b7 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentItemSave.cs +++ b/src/Umbraco.Abstractions/Models/ContentEditing/ContentItemSave.cs @@ -1,8 +1,6 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Newtonsoft.Json; using Umbraco.Core.Models; using Umbraco.Core.Models.Editors; @@ -30,7 +28,7 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "variants", IsRequired = true)] public IEnumerable Variants { get; set; } - + [DataMember(Name = "contentTypeAlias", IsRequired = true)] [Required(AllowEmptyStrings = false)] public string ContentTypeAlias { get; set; } @@ -40,7 +38,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "templateAlias")] public string TemplateAlias { get; set; } - + #region IContentSave [DataMember(Name = "action", IsRequired = true)] @@ -54,7 +52,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [IgnoreDataMember] IContent IContentSave.PersistedContent { get; set; } - + //Non explicit internal getter so we don't need to explicitly cast in our own code [IgnoreDataMember] internal IContent PersistedContent diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyCollectionDto.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyCollectionDto.cs similarity index 92% rename from src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyCollectionDto.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyCollectionDto.cs index 3e9da2a56e..d4c94410fe 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyCollectionDto.cs +++ b/src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyCollectionDto.cs @@ -1,7 +1,5 @@ using System.Collections.Generic; using System.Linq; -using Newtonsoft.Json; -using Umbraco.Core.Models; namespace Umbraco.Web.Models.ContentEditing { diff --git a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyDto.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyDto.cs similarity index 82% rename from src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyDto.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyDto.cs index 466030226d..865a10d5d5 100644 --- a/src/Umbraco.Infrastructure/Models/ContentEditing/ContentPropertyDto.cs +++ b/src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyDto.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Models; namespace Umbraco.Web.Models.ContentEditing { diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentVariantSave.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentVariantSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentVariantSave.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentVariantSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberPropertyTypeBasic.cs b/src/Umbraco.Abstractions/Models/ContentEditing/MemberPropertyTypeBasic.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MemberPropertyTypeBasic.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/MemberPropertyTypeBasic.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberPropertyTypeDisplay.cs b/src/Umbraco.Abstractions/Models/ContentEditing/MemberPropertyTypeDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MemberPropertyTypeDisplay.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/MemberPropertyTypeDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/RedirectUrlSearchResults.cs b/src/Umbraco.Abstractions/Models/ContentEditing/RedirectUrlSearchResults.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/RedirectUrlSearchResults.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/RedirectUrlSearchResults.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplay.cs similarity index 98% rename from src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplay.cs index b135ae573e..73740a14de 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplay.cs @@ -173,7 +173,7 @@ namespace Umbraco.Web.Models.ContentEditing /// This is not used for outgoing model information. /// [IgnoreDataMember] - internal IContent PersistedContent { get; set; } + public IContent PersistedContent { get; set; } /// /// The DTO object used to gather all required content data including data type information etc... for use with validation - used during inbound model binding @@ -184,7 +184,7 @@ namespace Umbraco.Web.Models.ContentEditing /// This is not used for outgoing model information. /// [IgnoreDataMember] - internal ContentPropertyCollectionDto ContentDto { get; set; } + public ContentPropertyCollectionDto ContentDto { get; set; } /// /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeBasic.cs similarity index 84% rename from src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeBasic.cs index 167d0e1627..33749a451c 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentTypeBasic.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeBasic.cs @@ -4,7 +4,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; using Umbraco.Core; -using Umbraco.Web.Composing; + namespace Umbraco.Web.Models.ContentEditing { @@ -67,15 +67,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "iconFilePath")] [ReadOnly(true)] - public string IconFilePath - { - get - { - return IconIsClass - ? string.Empty - : string.Format("{0}images/umbraco/{1}", Current.Configs.Global().Path.EnsureEndsWith("/"), Icon); - } - } + public string IconFilePath { get; set; } /// /// Returns true if the icon represents a CSS class instead of a file path @@ -100,15 +92,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "thumbnailFilePath")] [ReadOnly(true)] - public string ThumbnailFilePath - { - get - { - return ThumbnailIsClass - ? string.Empty - : Current.IOHelper.ResolveUrl("~/umbraco/images/thumbnails/" + Thumbnail); - } - } + public string ThumbnailFilePath { get; set; } [DataMember(Name = "blueprints")] [ReadOnly(true)] diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentTypeCompositionDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeCompositionDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentTypeCompositionDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeCompositionDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ContentTypeSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ContentTypeSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DataTypeBasic.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeBasic.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DataTypeBasic.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeBasic.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DataTypeConfigurationFieldDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeConfigurationFieldDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DataTypeConfigurationFieldDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeConfigurationFieldDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DataTypeDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DataTypeDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DocumentTypeDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DocumentTypeDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DocumentTypeDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DocumentTypeDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/DocumentTypeSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DocumentTypeSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/DocumentTypeSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DocumentTypeSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ListViewAwareContentItemDisplayBase.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ListViewAwareContentItemDisplayBase.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ListViewAwareContentItemDisplayBase.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ListViewAwareContentItemDisplayBase.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MacroDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MacroDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MediaItemDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MediaItemDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MediaItemDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MediaItemDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MediaItemSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MediaItemSave.cs similarity index 90% rename from src/Umbraco.Web/Models/ContentEditing/MediaItemSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MediaItemSave.cs index b31f1d1782..d983077fa2 100644 --- a/src/Umbraco.Web/Models/ContentEditing/MediaItemSave.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/MediaItemSave.cs @@ -1,6 +1,5 @@ using System.Runtime.Serialization; using Umbraco.Core.Models; -using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web.Models.ContentEditing { diff --git a/src/Umbraco.Web/Models/ContentEditing/MediaTypeDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MediaTypeDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MediaTypeDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MediaTypeDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MediaTypeSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MediaTypeSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MediaTypeSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MediaTypeSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberBasic.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MemberBasic.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MemberBasic.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MemberBasic.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MemberDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MemberDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MemberDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberListDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MemberListDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MemberListDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MemberListDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MemberSave.cs similarity index 92% rename from src/Umbraco.Web/Models/ContentEditing/MemberSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MemberSave.cs index 10774de1a4..b9ec6fad67 100644 --- a/src/Umbraco.Web/Models/ContentEditing/MemberSave.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/MemberSave.cs @@ -1,13 +1,9 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -using Newtonsoft.Json.Linq; using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; using Umbraco.Core.Models.Validation; -using Umbraco.Web.WebApi.Filters; using Umbraco.Core; namespace Umbraco.Web.Models.ContentEditing diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberTypeDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MemberTypeDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MemberTypeDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MemberTypeDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MemberTypeSave.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MemberTypeSave.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MemberTypeSave.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MemberTypeSave.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/MessagesExtensions.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/MessagesExtensions.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/MessagesExtensions.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MessagesExtensions.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/ModelWithNotifications.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ModelWithNotifications.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/ModelWithNotifications.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ModelWithNotifications.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/PostedFiles.cs similarity index 91% rename from src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/PostedFiles.cs index 43b018653f..e0ec347b45 100644 --- a/src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/PostedFiles.cs @@ -9,7 +9,7 @@ namespace Umbraco.Web.Models.ContentEditing /// temporary files that were created. /// [DataContract] - internal class PostedFiles : IHaveUploadedFiles, INotificationModel + public class PostedFiles : IHaveUploadedFiles, INotificationModel { public PostedFiles() { diff --git a/src/Umbraco.Web/Models/ContentEditing/PropertyGroupDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/PropertyGroupDisplay.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/PropertyGroupDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/PropertyGroupDisplay.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/PublicAccess.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/PublicAccess.cs similarity index 100% rename from src/Umbraco.Web/Models/ContentEditing/PublicAccess.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/PublicAccess.cs diff --git a/src/Umbraco.Web/Models/ContentEditing/UserInvite.cs b/src/Umbraco.Web/Models/ContentEditing/UserInvite.cs index 405bececc9..3adf10c467 100644 --- a/src/Umbraco.Web/Models/ContentEditing/UserInvite.cs +++ b/src/Umbraco.Web/Models/ContentEditing/UserInvite.cs @@ -31,10 +31,10 @@ namespace Umbraco.Web.Models.ContentEditing public IEnumerable Validate(ValidationContext validationContext) { if (UserGroups.Any() == false) - yield return new ValidationResult("A user must be assigned to at least one group", new[] { "UserGroups" }); + yield return new ValidationResult("A user must be assigned to at least one group", new[] { nameof(UserGroups) }); if (Current.Configs.Settings().Security.UsernameIsEmail == false && Username.IsNullOrWhiteSpace()) - yield return new ValidationResult("A username cannot be empty", new[] { "Username" }); + yield return new ValidationResult("A username cannot be empty", new[] { nameof(Username) }); } } } diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs index 1f6df93367..11e7bfde6e 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using Umbraco.Core; +using Umbraco.Core.Configuration; using Umbraco.Web.Composing; using Umbraco.Core.Logging; using Umbraco.Core.Mapping; @@ -10,6 +11,7 @@ using Umbraco.Core.PropertyEditors; using Umbraco.Web.Models.ContentEditing; using Umbraco.Core.Services; using Umbraco.Core.Exceptions; +using Umbraco.Core.IO; using Umbraco.Core.Strings; namespace Umbraco.Web.Models.Mapping @@ -27,11 +29,13 @@ namespace Umbraco.Web.Models.Mapping private readonly IMemberTypeService _memberTypeService; private readonly ILogger _logger; private readonly IShortStringHelper _shortStringHelper; + private readonly IIOHelper _ioHelper; + private readonly IGlobalSettings _globalSettings; public ContentTypeMapDefinition(PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService, IFileService fileService, IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService, - ILogger logger, IShortStringHelper shortStringHelper) + ILogger logger, IShortStringHelper shortStringHelper, IIOHelper ioHelper, IGlobalSettings globalSettings) { _propertyEditors = propertyEditors; _dataTypeService = dataTypeService; @@ -41,7 +45,8 @@ namespace Umbraco.Web.Models.Mapping _memberTypeService = memberTypeService; _logger = logger; _shortStringHelper = shortStringHelper; - + _ioHelper = ioHelper; + _globalSettings = globalSettings; } public void DefineMaps(UmbracoMapper mapper) @@ -184,6 +189,11 @@ namespace Umbraco.Web.Models.Mapping target.CreateDate = source.CreateDate; target.Description = source.Description; target.Icon = source.Icon; + target.IconFilePath = target.IconIsClass + ? string.Empty + : $"{Current.Configs.Global().Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; + + target.Trashed = source.Trashed; target.Id = source.Id; target.IsContainer = source.IsContainer; target.IsElement = source.IsElement; @@ -192,7 +202,9 @@ namespace Umbraco.Web.Models.Mapping target.ParentId = source.ParentId; target.Path = source.Path; target.Thumbnail = source.Thumbnail; - target.Trashed = source.Trashed; + target.ThumbnailFilePath = target.ThumbnailIsClass + ? string.Empty + : Current.IOHelper.ResolveUrl("~/umbraco/images/thumbnails/" + source.Thumbnail); target.UpdateDate = source.UpdateDate; } @@ -487,6 +499,9 @@ namespace Umbraco.Web.Models.Mapping target.CreateDate = source.CreateDate; target.Description = source.Description; target.Icon = source.Icon; + target.IconFilePath = target.IconIsClass + ? string.Empty + : $"{Current.Configs.Global().Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; target.Id = source.Id; target.IsContainer = source.IsContainer; target.IsElement = source.IsElement; @@ -495,6 +510,9 @@ namespace Umbraco.Web.Models.Mapping target.ParentId = source.ParentId; target.Path = source.Path; target.Thumbnail = source.Thumbnail; + target.ThumbnailFilePath = target.ThumbnailIsClass + ? string.Empty + : Current.IOHelper.ResolveUrl("~/umbraco/images/thumbnails/" + source.Thumbnail); target.Udi = MapContentTypeUdi(source); target.UpdateDate = source.UpdateDate; @@ -524,6 +542,9 @@ namespace Umbraco.Web.Models.Mapping target.CompositeContentTypes = source.CompositeContentTypes; target.Description = source.Description; target.Icon = source.Icon; + target.IconFilePath = target.IconIsClass + ? string.Empty + : $"{Current.Configs.Global().Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; target.Id = source.Id; target.IsContainer = source.IsContainer; target.IsElement = source.IsElement; @@ -532,6 +553,9 @@ namespace Umbraco.Web.Models.Mapping target.ParentId = source.ParentId; target.Path = source.Path; target.Thumbnail = source.Thumbnail; + target.ThumbnailFilePath = target.ThumbnailIsClass + ? string.Empty + : Current.IOHelper.ResolveUrl("~/umbraco/images/thumbnails/" + source.Thumbnail); target.Trashed = source.Trashed; target.Udi = source.Udi; } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index f496581711..913f8a45d6 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -187,11 +187,6 @@ - - - - - @@ -266,7 +261,6 @@ - @@ -393,7 +387,6 @@ - @@ -537,17 +530,6 @@ - - - - - - - - - - - @@ -560,7 +542,6 @@ - @@ -569,7 +550,6 @@ - @@ -621,11 +601,7 @@ - - - - @@ -673,10 +649,7 @@ - - - @@ -692,8 +665,6 @@ - - @@ -770,7 +741,6 @@ - @@ -807,7 +777,6 @@ - From 3279098f024b9a8f904e1d7472be162bc2a9769f Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 20 Jan 2020 15:48:03 +0100 Subject: [PATCH 5/7] AB4549 - Moved mappers --- .../Models/Mapping/AuditMapDefinition.cs | 2 +- .../Models/Mapping/CodeFileMapDefinition.cs | 0 .../Models/Mapping/ContentSavedStateMapper.cs | 4 +- .../Models/Mapping/ContentVariantMapper.cs | 2 +- .../Models/Mapping/DictionaryMapDefinition.cs | 2 +- .../Models/Mapping/LanguageMapDefinition.cs | 2 +- .../Models/Mapping/MacroMapDefinition.cs | 2 +- .../Models/Mapping/MapperContextExtensions.cs | 4 +- .../Models/Mapping/RelationMapDefinition.cs | 2 +- .../Models/Mapping/SectionMapDefinition.cs | 2 +- .../Models/Mapping/TagMapDefinition.cs | 2 +- .../Models/Mapping/TemplateMapDefinition.cs | 2 +- src/Umbraco.Web/Umbraco.Web.csproj | 49 ++++++------------- 13 files changed, 27 insertions(+), 48 deletions(-) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/AuditMapDefinition.cs (93%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/CodeFileMapDefinition.cs (100%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/ContentSavedStateMapper.cs (96%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/ContentVariantMapper.cs (98%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/DictionaryMapDefinition.cs (98%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/LanguageMapDefinition.cs (97%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/MacroMapDefinition.cs (98%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/MapperContextExtensions.cs (96%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/RelationMapDefinition.cs (98%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/SectionMapDefinition.cs (96%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/TagMapDefinition.cs (91%) rename src/{Umbraco.Web => Umbraco.Infrastructure}/Models/Mapping/TemplateMapDefinition.cs (97%) diff --git a/src/Umbraco.Web/Models/Mapping/AuditMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/AuditMapDefinition.cs similarity index 93% rename from src/Umbraco.Web/Models/Mapping/AuditMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/AuditMapDefinition.cs index 9bc0229550..51a0fed704 100644 --- a/src/Umbraco.Web/Models/Mapping/AuditMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/AuditMapDefinition.cs @@ -4,7 +4,7 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Models.Mapping { - internal class AuditMapDefinition : IMapDefinition + public class AuditMapDefinition : IMapDefinition { public void DefineMaps(UmbracoMapper mapper) { diff --git a/src/Umbraco.Web/Models/Mapping/CodeFileMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/CodeFileMapDefinition.cs similarity index 100% rename from src/Umbraco.Web/Models/Mapping/CodeFileMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/CodeFileMapDefinition.cs diff --git a/src/Umbraco.Web/Models/Mapping/ContentSavedStateMapper.cs b/src/Umbraco.Infrastructure/Models/Mapping/ContentSavedStateMapper.cs similarity index 96% rename from src/Umbraco.Web/Models/Mapping/ContentSavedStateMapper.cs rename to src/Umbraco.Infrastructure/Models/Mapping/ContentSavedStateMapper.cs index dfb334621d..82f1d4e9bb 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentSavedStateMapper.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/ContentSavedStateMapper.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.Models.Mapping /// Returns the for an item /// /// - internal class ContentBasicSavedStateMapper + public class ContentBasicSavedStateMapper where T : ContentPropertyBasic { private readonly ContentSavedStateMapper _inner = new ContentSavedStateMapper(); @@ -25,7 +25,7 @@ namespace Umbraco.Web.Models.Mapping /// Returns the for an item /// /// - internal class ContentSavedStateMapper + public class ContentSavedStateMapper where T : ContentPropertyBasic { public ContentSavedState Map(IContent source, MapperContext context) diff --git a/src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs b/src/Umbraco.Infrastructure/Models/Mapping/ContentVariantMapper.cs similarity index 98% rename from src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs rename to src/Umbraco.Infrastructure/Models/Mapping/ContentVariantMapper.cs index c279ae2c70..1a911f6d1e 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/ContentVariantMapper.cs @@ -10,7 +10,7 @@ using Language = Umbraco.Web.Models.ContentEditing.Language; namespace Umbraco.Web.Models.Mapping { - internal class ContentVariantMapper + public class ContentVariantMapper { private readonly ILocalizationService _localizationService; diff --git a/src/Umbraco.Web/Models/Mapping/DictionaryMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/DictionaryMapDefinition.cs similarity index 98% rename from src/Umbraco.Web/Models/Mapping/DictionaryMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/DictionaryMapDefinition.cs index c7ae0cb717..278adc56e0 100644 --- a/src/Umbraco.Web/Models/Mapping/DictionaryMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/DictionaryMapDefinition.cs @@ -13,7 +13,7 @@ namespace Umbraco.Web.Models.Mapping /// /// The dictionary model mapper. /// - internal class DictionaryMapDefinition : IMapDefinition + public class DictionaryMapDefinition : IMapDefinition { private readonly ILocalizationService _localizationService; diff --git a/src/Umbraco.Web/Models/Mapping/LanguageMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/LanguageMapDefinition.cs similarity index 97% rename from src/Umbraco.Web/Models/Mapping/LanguageMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/LanguageMapDefinition.cs index 28074d4817..6fcbe1a88b 100644 --- a/src/Umbraco.Web/Models/Mapping/LanguageMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/LanguageMapDefinition.cs @@ -8,7 +8,7 @@ using Language = Umbraco.Web.Models.ContentEditing.Language; namespace Umbraco.Web.Models.Mapping { - internal class LanguageMapDefinition : IMapDefinition + public class LanguageMapDefinition : IMapDefinition { public void DefineMaps(UmbracoMapper mapper) { diff --git a/src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/MacroMapDefinition.cs similarity index 98% rename from src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/MacroMapDefinition.cs index e5bca22287..7138c5d795 100644 --- a/src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/MacroMapDefinition.cs @@ -9,7 +9,7 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Models.Mapping { - internal class MacroMapDefinition : IMapDefinition + public class MacroMapDefinition : IMapDefinition { private readonly ParameterEditorCollection _parameterEditors; private readonly ILogger _logger; diff --git a/src/Umbraco.Web/Models/Mapping/MapperContextExtensions.cs b/src/Umbraco.Infrastructure/Models/Mapping/MapperContextExtensions.cs similarity index 96% rename from src/Umbraco.Web/Models/Mapping/MapperContextExtensions.cs rename to src/Umbraco.Infrastructure/Models/Mapping/MapperContextExtensions.cs index 1538f1a987..020a66cd2a 100644 --- a/src/Umbraco.Web/Models/Mapping/MapperContextExtensions.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/MapperContextExtensions.cs @@ -5,7 +5,7 @@ namespace Umbraco.Web.Models.Mapping /// /// Provides extension methods for the class. /// - internal static class MapperContextExtensions + public static class MapperContextExtensions { private const string CultureKey = "Map.Culture"; private const string IncludedPropertiesKey = "Map.IncludedProperties"; @@ -42,4 +42,4 @@ namespace Umbraco.Web.Models.Mapping context.Items[IncludedPropertiesKey] = properties; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/Models/Mapping/RelationMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/RelationMapDefinition.cs similarity index 98% rename from src/Umbraco.Web/Models/Mapping/RelationMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/RelationMapDefinition.cs index d26a867858..d6ec4fd969 100644 --- a/src/Umbraco.Web/Models/Mapping/RelationMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/RelationMapDefinition.cs @@ -7,7 +7,7 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Models.Mapping { - internal class RelationMapDefinition : IMapDefinition + public class RelationMapDefinition : IMapDefinition { private readonly IEntityService _entityService; private readonly IRelationService _relationService; diff --git a/src/Umbraco.Web/Models/Mapping/SectionMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/SectionMapDefinition.cs similarity index 96% rename from src/Umbraco.Web/Models/Mapping/SectionMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/SectionMapDefinition.cs index e05e6e5c84..20b1d2e05f 100644 --- a/src/Umbraco.Web/Models/Mapping/SectionMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/SectionMapDefinition.cs @@ -7,7 +7,7 @@ using Umbraco.Web.Sections; namespace Umbraco.Web.Models.Mapping { - internal class SectionMapDefinition : IMapDefinition + public class SectionMapDefinition : IMapDefinition { private readonly ILocalizedTextService _textService; public SectionMapDefinition(ILocalizedTextService textService) diff --git a/src/Umbraco.Web/Models/Mapping/TagMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/TagMapDefinition.cs similarity index 91% rename from src/Umbraco.Web/Models/Mapping/TagMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/TagMapDefinition.cs index 2161183504..32912489c2 100644 --- a/src/Umbraco.Web/Models/Mapping/TagMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/TagMapDefinition.cs @@ -3,7 +3,7 @@ using Umbraco.Core.Models; namespace Umbraco.Web.Models.Mapping { - internal class TagMapDefinition : IMapDefinition + public class TagMapDefinition : IMapDefinition { public void DefineMaps(UmbracoMapper mapper) { diff --git a/src/Umbraco.Web/Models/Mapping/TemplateMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/TemplateMapDefinition.cs similarity index 97% rename from src/Umbraco.Web/Models/Mapping/TemplateMapDefinition.cs rename to src/Umbraco.Infrastructure/Models/Mapping/TemplateMapDefinition.cs index 6868040586..99b69c1fb3 100644 --- a/src/Umbraco.Web/Models/Mapping/TemplateMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/TemplateMapDefinition.cs @@ -5,7 +5,7 @@ using Umbraco.Web.Models.ContentEditing; namespace Umbraco.Web.Models.Mapping { - internal class TemplateMapDefinition : IMapDefinition + public class TemplateMapDefinition : IMapDefinition { private readonly IShortStringHelper _shortStringHelper; diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 3d1de77746..ae1c196a21 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -193,7 +193,20 @@ - + + + + + + + + + + + + + + @@ -285,7 +298,6 @@ - @@ -387,14 +399,6 @@ - - - - - - - - @@ -530,7 +534,6 @@ - @@ -543,7 +546,6 @@ - @@ -629,25 +631,12 @@ - - - - - - - - - - - - - @@ -719,16 +708,6 @@ - - - - - - - - - - From bda64d75baeaf2e1b8f00fab26291cf3e921d7b4 Mon Sep 17 00:00:00 2001 From: elitsa Date: Tue, 21 Jan 2020 13:47:21 +0100 Subject: [PATCH 6/7] Removing the usage of Current --- .../Mapping/ContentTypeMapDefinition.cs | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs index 11e7bfde6e..07b6801212 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using Umbraco.Core; using Umbraco.Core.Configuration; -using Umbraco.Web.Composing; using Umbraco.Core.Logging; using Umbraco.Core.Mapping; using Umbraco.Core.Models; @@ -182,7 +181,7 @@ namespace Umbraco.Web.Models.Mapping } // Umbraco.Code.MapAll -Blueprints - private static void Map(IContentTypeBase source, ContentTypeBasic target, string entityType) + private void Map(IContentTypeBase source, ContentTypeBasic target, string entityType) { target.Udi = Udi.Create(entityType, source.Key); target.Alias = source.Alias; @@ -191,7 +190,7 @@ namespace Umbraco.Web.Models.Mapping target.Icon = source.Icon; target.IconFilePath = target.IconIsClass ? string.Empty - : $"{Current.Configs.Global().Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; + : $"{_globalSettings.Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; target.Trashed = source.Trashed; target.Id = source.Id; @@ -204,30 +203,30 @@ namespace Umbraco.Web.Models.Mapping target.Thumbnail = source.Thumbnail; target.ThumbnailFilePath = target.ThumbnailIsClass ? string.Empty - : Current.IOHelper.ResolveUrl("~/umbraco/images/thumbnails/" + source.Thumbnail); + : _ioHelper.ResolveUrl("~/umbraco/images/thumbnails/" + source.Thumbnail); target.UpdateDate = source.UpdateDate; } // no MapAll - uses the IContentTypeBase map method, which has MapAll - private static void Map(IContentTypeComposition source, ContentTypeBasic target, MapperContext context) + private void Map(IContentTypeComposition source, ContentTypeBasic target, MapperContext context) { Map(source, target, Constants.UdiEntityType.MemberType); } // no MapAll - uses the IContentTypeBase map method, which has MapAll - private static void Map(IContentType source, ContentTypeBasic target, MapperContext context) + private void Map(IContentType source, ContentTypeBasic target, MapperContext context) { Map(source, target, Constants.UdiEntityType.DocumentType); } // no MapAll - uses the IContentTypeBase map method, which has MapAll - private static void Map(IMediaType source, ContentTypeBasic target, MapperContext context) + private void Map(IMediaType source, ContentTypeBasic target, MapperContext context) { Map(source, target, Constants.UdiEntityType.MediaType); } // no MapAll - uses the IContentTypeBase map method, which has MapAll - private static void Map(IMemberType source, ContentTypeBasic target, MapperContext context) + private void Map(IMemberType source, ContentTypeBasic target, MapperContext context) { Map(source, target, Constants.UdiEntityType.MemberType); } @@ -501,7 +500,7 @@ namespace Umbraco.Web.Models.Mapping target.Icon = source.Icon; target.IconFilePath = target.IconIsClass ? string.Empty - : $"{Current.Configs.Global().Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; + : $"{_globalSettings.Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; target.Id = source.Id; target.IsContainer = source.IsContainer; target.IsElement = source.IsElement; @@ -512,7 +511,7 @@ namespace Umbraco.Web.Models.Mapping target.Thumbnail = source.Thumbnail; target.ThumbnailFilePath = target.ThumbnailIsClass ? string.Empty - : Current.IOHelper.ResolveUrl("~/umbraco/images/thumbnails/" + source.Thumbnail); + : _ioHelper.ResolveUrl("~/umbraco/images/thumbnails/" + source.Thumbnail); target.Udi = MapContentTypeUdi(source); target.UpdateDate = source.UpdateDate; @@ -544,7 +543,7 @@ namespace Umbraco.Web.Models.Mapping target.Icon = source.Icon; target.IconFilePath = target.IconIsClass ? string.Empty - : $"{Current.Configs.Global().Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; + : $"{_globalSettings.Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; target.Id = source.Id; target.IsContainer = source.IsContainer; target.IsElement = source.IsElement; @@ -555,7 +554,7 @@ namespace Umbraco.Web.Models.Mapping target.Thumbnail = source.Thumbnail; target.ThumbnailFilePath = target.ThumbnailIsClass ? string.Empty - : Current.IOHelper.ResolveUrl("~/umbraco/images/thumbnails/" + source.Thumbnail); + : _ioHelper.ResolveUrl("~/umbraco/images/thumbnails/" + source.Thumbnail); target.Trashed = source.Trashed; target.Udi = source.Udi; } From 9ef5f74d6728782415e86cd75ad750ad8082618a Mon Sep 17 00:00:00 2001 From: elitsa Date: Tue, 21 Jan 2020 13:50:37 +0100 Subject: [PATCH 7/7] Removing unnecessary namespace from in-line file reference --- src/Umbraco.Web/Editors/MacrosController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Editors/MacrosController.cs b/src/Umbraco.Web/Editors/MacrosController.cs index 5f8bcfa0f4..bd91898849 100644 --- a/src/Umbraco.Web/Editors/MacrosController.cs +++ b/src/Umbraco.Web/Editors/MacrosController.cs @@ -213,7 +213,7 @@ namespace Umbraco.Web.Editors macroDisplay.Notifications.Clear(); - macroDisplay.Notifications.Add(new Models.ContentEditing.BackOfficeNotification("Success", "Macro saved", NotificationStyle.Success)); + macroDisplay.Notifications.Add(new BackOfficeNotification("Success", "Macro saved", NotificationStyle.Success)); return this.Request.CreateResponse(HttpStatusCode.OK, macroDisplay); }