Created
May 18, 2017 19:49
-
-
Save mercedesb/31980fb0cab358ee9705eae8108ef975 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using EPiServer.Core; | |
| using EPiServer.Shell; | |
| using EPiServer.Shell.Services.Rest; | |
| using SampleEditors.Models.Media; | |
| using System; | |
| using System.Collections.Generic; | |
| namespace SampleEditors.Models.UIDescriptors | |
| { | |
| [UIDescriptorRegistration] | |
| public class PdfFileUIDescriptor : UIDescriptor<SitePDFData>, IEditorDropBehavior | |
| { | |
| public bool ActAsAnAsset | |
| { | |
| get | |
| { | |
| return true; | |
| } | |
| } | |
| public EditorDropBehavior EditorDropBehaviour | |
| { | |
| get; | |
| set; | |
| } | |
| public PdfFileUIDescriptor() | |
| { | |
| base.IsPrimaryType = true; | |
| base.ContainerTypes = (IEnumerable<Type>)(new Type[] { typeof(ContentFolder) }); | |
| base.SortKey = new SortColumn() | |
| { | |
| ColumnName = "typeIdentifier" | |
| }; | |
| base.DefaultView = "formedit"; | |
| base.AddDisabledView("onpageedit"); | |
| this.EditorDropBehaviour = EditorDropBehavior.CreateLink; | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using EPiServer.Cms.Shell.UI.UIDescriptors; | |
| using EPiServer.Core; | |
| using EPiServer.Shell.ObjectEditing.EditorDescriptors; | |
| using SampleEditors.Models.Media; | |
| namespace SampleEditors.Models.EditorDescriptors | |
| { | |
| [EditorDescriptorRegistration(TargetType = typeof(ContentReference), UIHint = MakingWavesUIHint.PDF)] | |
| public class PdfReferenceEditorDescriptor : ContentReferenceEditorDescriptor<SitePDFData> | |
| { | |
| public override string RepositoryKey | |
| { | |
| get | |
| { | |
| return MediaRepositoryDescriptor.RepositoryKey; | |
| } | |
| } | |
| public PdfReferenceEditorDescriptor() | |
| { | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment