Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. namespace TS.Externwebb.Models.Properties
  2. {
  3. public class EServiceTypeDropDown : ISelectionFactory
  4. {
  5. public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata)
  6. {
  7. var eservicetypedropdown = new List<SelectItem>
  8. {
  9. new SelectItem() {Value = "open", Text = "Öppen"},
  10. new SelectItem() {Value = "info", Text = "Info"},
  11. new SelectItem() {Value = "warning", Text = "Varning"},
  12. new SelectItem() {Value = "danger", Text = "Stängd"}
  13. };
  14.  
  15. return eservicetypedropdown;
  16. }
  17. }
  18.  
  19. [EditorDescriptorRegistration(TargetType = typeof(string), UIHint = "EServiceTypeDropDown")]
  20. public class EServiceTypeDropDownEditorDescriptor : EditorDescriptor
  21. {
  22. public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
  23. {
  24. SelectionFactoryType = typeof(EServiceTypeDropDown);
  25. ClientEditingClass = "epi-cms/contentediting/editors/SelectionEditor";
  26. base.ModifyMetadata(metadata, attributes);
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement