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/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.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/ContentPropertyCollectionDto.cs b/src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyCollectionDto.cs similarity index 79% rename from src/Umbraco.Web/Models/ContentEditing/ContentPropertyCollectionDto.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyCollectionDto.cs index dc6a92cc93..d4c94410fe 100644 --- a/src/Umbraco.Web/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 { @@ -11,7 +9,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.Abstractions/Models/ContentEditing/ContentPropertyDto.cs similarity index 73% rename from src/Umbraco.Web/Models/ContentEditing/ContentPropertyDto.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyDto.cs index 83e5e2a9b2..865a10d5d5 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentPropertyDto.cs +++ b/src/Umbraco.Abstractions/Models/ContentEditing/ContentPropertyDto.cs @@ -1,14 +1,11 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Models; 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/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/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/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/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/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.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 91% rename from src/Umbraco.Web/Models/ContentEditing/IContentSave.cs rename to src/Umbraco.Abstractions/Models/ContentEditing/IContentSave.cs index bcac5d0aea..789b44dadf 100644 --- a/src/Umbraco.Web/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/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/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/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/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/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/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/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/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/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/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/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/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.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/Notification.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/BackOfficeNotification.cs similarity index 75% rename from src/Umbraco.Web/Models/ContentEditing/Notification.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/BackOfficeNotification.cs index 8852b2ca02..0dd132a503 100644 --- a/src/Umbraco.Web/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/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/ContentItemDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplay.cs similarity index 96% rename from src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentItemDisplay.cs index b6a90a93c3..73740a14de 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentItemDisplay.cs +++ b/src/Umbraco.Infrastructure/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(); @@ -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,14 +184,14 @@ 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. /// [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/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/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/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 95% rename from src/Umbraco.Web/Models/ContentEditing/ContentTypeCompositionDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ContentTypeCompositionDisplay.cs index 96b540d3ba..77b5f53b24 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ContentTypeCompositionDisplay.cs +++ b/src/Umbraco.Infrastructure/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/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/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/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/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/DataTypeDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeDisplay.cs similarity index 88% rename from src/Umbraco.Web/Models/ContentEditing/DataTypeDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DataTypeDisplay.cs index a234d1e76f..9bead4bf5d 100644 --- a/src/Umbraco.Web/Models/ContentEditing/DataTypeDisplay.cs +++ b/src/Umbraco.Infrastructure/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/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.Web/Models/ContentEditing/DictionaryDisplay.cs b/src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs similarity index 89% rename from src/Umbraco.Web/Models/ContentEditing/DictionaryDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/DictionaryDisplay.cs index bb93c72ac7..9e0dee36f6 100644 --- a/src/Umbraco.Web/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.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/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/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 86% rename from src/Umbraco.Web/Models/ContentEditing/INotificationModel.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/INotificationModel.cs index d718ae65f5..910d47a221 100644 --- a/src/Umbraco.Web/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/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 93% rename from src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MacroDisplay.cs index e84887b88b..33d2a959b6 100644 --- a/src/Umbraco.Web/Models/ContentEditing/MacroDisplay.cs +++ b/src/Umbraco.Infrastructure/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/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/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/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/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 87% rename from src/Umbraco.Web/Models/ContentEditing/MessagesExtensions.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/MessagesExtensions.cs index 1f526a50f3..c27fa39d44 100644 --- a/src/Umbraco.Web/Models/ContentEditing/MessagesExtensions.cs +++ b/src/Umbraco.Infrastructure/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.Infrastructure/Models/ContentEditing/ModelWithNotifications.cs similarity index 85% rename from src/Umbraco.Web/Models/ContentEditing/ModelWithNotifications.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/ModelWithNotifications.cs index d4e979eb85..2cf34e029d 100644 --- a/src/Umbraco.Web/Models/ContentEditing/ModelWithNotifications.cs +++ b/src/Umbraco.Infrastructure/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.Infrastructure/Models/ContentEditing/PostedFiles.cs similarity index 74% rename from src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs rename to src/Umbraco.Infrastructure/Models/ContentEditing/PostedFiles.cs index 4f3e5dbb18..e0ec347b45 100644 --- a/src/Umbraco.Web/Models/ContentEditing/PostedFiles.cs +++ b/src/Umbraco.Infrastructure/Models/ContentEditing/PostedFiles.cs @@ -9,16 +9,16 @@ namespace Umbraco.Web.Models.ContentEditing /// temporary files that were created. /// [DataContract] - internal class PostedFiles : IHaveUploadedFiles, INotificationModel + public class PostedFiles : IHaveUploadedFiles, INotificationModel { 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/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/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/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/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/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.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/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 99% rename from src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs rename to src/Umbraco.Infrastructure/Models/Mapping/ContentVariantMapper.cs index 5d076812f3..10a19287e7 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 e654fc16a1..d980958a91 100644 --- a/src/Umbraco.Web/Models/Mapping/MacroMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/MacroMapDefinition.cs @@ -10,7 +10,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 97% rename from src/Umbraco.Web/Models/Mapping/MapperContextExtensions.cs rename to src/Umbraco.Infrastructure/Models/Mapping/MapperContextExtensions.cs index 20a387c679..3133441846 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 SegmentKey = "Map.Segment"; 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/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/Editors/ContentTypeController.cs b/src/Umbraco.Web/Editors/ContentTypeController.cs index 119c84a927..3bf3382ab4 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; using Umbraco.Core.Mapping; namespace Umbraco.Web.Editors @@ -599,7 +598,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 394323427b..89137ea2d7 100644 --- a/src/Umbraco.Web/Editors/DictionaryController.cs +++ b/src/Umbraco.Web/Editors/DictionaryController.cs @@ -18,7 +18,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 { @@ -188,7 +187,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 d2bca8cb03..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.Notification("Success", "Macro saved", NotificationStyle.Success)); + macroDisplay.Notifications.Add(new 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 7b10957e81..aa6c486840 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; using Umbraco.Core.Mapping; @@ -460,7 +459,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) { @@ -773,7 +772,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)); @@ -864,7 +863,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 744733d1f2..5486b32655 100644 --- a/src/Umbraco.Web/Editors/PackageInstallController.cs +++ b/src/Umbraco.Web/Editors/PackageInstallController.cs @@ -11,6 +11,7 @@ using Umbraco.Core.Cache; using Umbraco.Web.Composing; using Umbraco.Core.Configuration; using Umbraco.Core.Logging; +using Umbraco.Core.Mapping; using Umbraco.Core.Models.Editors; using Umbraco.Core.Models.Packaging; using Umbraco.Core.Packaging; @@ -24,8 +25,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; -using Umbraco.Core.Mapping; namespace Umbraco.Web.Editors { @@ -194,7 +193,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/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/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/Models/Mapping/ContentTypeMapDefinition.cs b/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs index 1f6df93367..07b6801212 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using Umbraco.Core; -using Umbraco.Web.Composing; +using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Mapping; using Umbraco.Core.Models; @@ -10,6 +10,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 +28,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 +44,8 @@ namespace Umbraco.Web.Models.Mapping _memberTypeService = memberTypeService; _logger = logger; _shortStringHelper = shortStringHelper; - + _ioHelper = ioHelper; + _globalSettings = globalSettings; } public void DefineMaps(UmbracoMapper mapper) @@ -177,13 +181,18 @@ 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; target.CreateDate = source.CreateDate; target.Description = source.Description; target.Icon = source.Icon; + target.IconFilePath = target.IconIsClass + ? string.Empty + : $"{_globalSettings.Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; + + target.Trashed = source.Trashed; target.Id = source.Id; target.IsContainer = source.IsContainer; target.IsElement = source.IsElement; @@ -192,30 +201,32 @@ 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 + : _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); } @@ -487,6 +498,9 @@ namespace Umbraco.Web.Models.Mapping target.CreateDate = source.CreateDate; target.Description = source.Description; target.Icon = source.Icon; + target.IconFilePath = target.IconIsClass + ? string.Empty + : $"{_globalSettings.Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; target.Id = source.Id; target.IsContainer = source.IsContainer; target.IsElement = source.IsElement; @@ -495,6 +509,9 @@ namespace Umbraco.Web.Models.Mapping target.ParentId = source.ParentId; target.Path = source.Path; target.Thumbnail = source.Thumbnail; + target.ThumbnailFilePath = target.ThumbnailIsClass + ? string.Empty + : _ioHelper.ResolveUrl("~/umbraco/images/thumbnails/" + source.Thumbnail); target.Udi = MapContentTypeUdi(source); target.UpdateDate = source.UpdateDate; @@ -524,6 +541,9 @@ namespace Umbraco.Web.Models.Mapping target.CompositeContentTypes = source.CompositeContentTypes; target.Description = source.Description; target.Icon = source.Icon; + target.IconFilePath = target.IconIsClass + ? string.Empty + : $"{_globalSettings.Path.EnsureEndsWith("/")}images/umbraco/{source.Icon}"; target.Id = source.Id; target.IsContainer = source.IsContainer; target.IsElement = source.IsElement; @@ -532,6 +552,9 @@ namespace Umbraco.Web.Models.Mapping target.ParentId = source.ParentId; target.Path = source.Path; target.Thumbnail = source.Thumbnail; + target.ThumbnailFilePath = target.ThumbnailIsClass + ? string.Empty + : _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 2a8b5ec0c6..4e11601750 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -186,21 +186,28 @@ - - - - - - + - + + + + + + + + + + + + + + - @@ -244,9 +251,6 @@ - - - @@ -266,15 +270,6 @@ - - - - - - - - - @@ -301,10 +296,7 @@ - - - @@ -319,7 +311,6 @@ - @@ -402,60 +393,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -524,7 +468,6 @@ - @@ -543,8 +486,6 @@ - - @@ -566,30 +507,11 @@ - - - - - - - - - - - - - - - - - - - @@ -601,7 +523,6 @@ - @@ -610,10 +531,7 @@ - - - @@ -626,8 +544,6 @@ - - @@ -664,25 +580,7 @@ - - - - - - - - - - - - - - - - - - @@ -711,12 +609,6 @@ - - - - - - @@ -726,7 +618,6 @@ - @@ -736,37 +627,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -816,7 +683,6 @@ - @@ -825,11 +691,9 @@ - - @@ -840,31 +704,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -874,7 +714,6 @@ - @@ -891,13 +730,6 @@ - - - - - - - @@ -906,7 +738,6 @@ - @@ -1007,7 +838,6 @@ - @@ -1017,7 +847,6 @@ - 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,