public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var contactPages = SiteDataFactory.Instance.GetContactPages(); return(new List <SelectItem>(contactPages.Select(c => new SelectItem { Value = c.PageLink, Text = c.Name }))); }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var locations = ParkingGateway.Service.GetLocations(); return(new List <SelectItem>(locations.Select(c => new SelectItem { Value = c, Text = c }))); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { base.ModifyMetadata(metadata, attributes); metadata.EditorConfiguration.Add("aceEditorMode", metadata.UIHint.Replace("AceEditor_", "")); metadata.ClientEditingClass = "aceeditor/aceEditor"; }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var values = Enum.GetValues(typeof(TEnum)); return((from object value in values select new SelectItem { Text = this.GetValueName(value), Value = Convert.ChangeType(value, typeof(TUnderlying)) }).OrderBy(x => x.Text)); }
public override void ModifyMetadata( ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { ClientEditingClass = "episerverbase/editors/StringList"; base.ModifyMetadata(metadata, attributes); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { base.ModifyMetadata(metadata, attributes); if (metadata.PropertyName == "icategorizable_category") { metadata.ShowForEdit = false; } }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { SelectionFactoryType = typeof(RelatedPagesSelectionFactory); //ClientEditingClass = "alloy.RelationSelector"; base.ModifyMetadata(metadata, attributes); }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var startPage = _contentLoader.Value.Get <CmsHomePage>(ContentReference.StartPage); return(startPage.Locations?.Select(x => new SelectItem { Value = x.Value, Text = x.Text }) ?? new List <SelectItem>());; }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var availablePageTypes = GetAvailablePageTypes(); return(availablePageTypes.Select(x => new SelectItem { Value = x.Key, Text = x.Value })); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { base.ModifyMetadata(metadata, attributes); metadata.OverlayConfiguration["customType"] = "episerver-labs-block-enhancements/editors/content-area"; metadata.OverlayConfiguration["blockEnhancementsOptions"] = _options; metadata.EditorConfiguration["blockEnhancementsOptions"] = _options; }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var settings = _settingsService.Value.GetSiteSettings <CollectionSettings>(); return(settings?.Sectors?.Select(x => new SelectItem { Value = x.Value, Text = x.Text }) ?? new List <SelectItem>()); }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { Array items = Enum.GetValues(typeof(AttendStatus)); foreach (var item in items) { yield return new SelectItem() { Text = GetValueName(item), Value=Enum.GetName(typeof(AttendStatus), item) }; } }
public override IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { return(new[] { new SelectItem { Text = "", Value = null, } }.Concat(base.GetSelections(metadata))); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { SelectionFactoryType = typeof(ContactPageSelectionFactory); ClientEditingClass = "epi-cms/contentediting/editors/SelectionEditor"; base.ModifyMetadata(metadata, attributes); }
/// <summary> /// Overridden to set editor configuration. /// </summary> /// <param name="metadata">The meta data.</param> protected override void SetEditorConfiguration(ExtendedMetadata metadata) { base.SetEditorConfiguration(metadata); // Needs to be set explicitly since we have a custom root. this.EditorConfiguration["showSearchBox"] = true; this.EditorConfiguration["searchArea"] = UISettings.SearchArea; }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var contactPages = RuleEngine.Instance.GetAllRules(); return(new List <SelectItem>(contactPages.Select(c => new SelectItem { Value = c.RuleName, Text = c.RuleName }))); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { SelectionFactoryType = typeof(RuleSelectionFactory); ClientEditingClass = "epi.cms.contentediting.editors.SelectionEditor"; base.ModifyMetadata(metadata, attributes); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { SelectionFactoryType = typeof(ContactPageSelectionFactory); ClientEditingClass = "epi-cms/contentediting/editors/SelectionEditor"; base.ModifyMetadata(metadata, attributes); }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var vueSettings = VueConfig.Settings; return(vueSettings.Components.Select(x => new SelectItem { Text = x.Name, Value = x.Name })); }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var contactPages = ContentLocator.Service.GetContactPages(); return(new List <SelectItem>(contactPages.Select(c => new SelectItem { Value = c.PageLink, Text = c.Name }))); }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { return new ISelectItem[] { new SelectItem {Text = "Center logo", Value = "CenterLogo"}, new SelectItem {Text = "Left logo", Value = "LeftLogo"} }; }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { base.ModifyMetadata(metadata, attributes); metadata.EditorConfiguration.Add("fields", GetFieldInfo(metadata)); metadata.EditorConfiguration.Add("itemMappings", GetItemMappings(metadata)); metadata.ClientEditingClass = "enhancedpropertylist/EnhancedCollectionEditor"; }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var appModes = Enum.GetNames(typeof(AppMode)); var selections = appModes.Select(x => new SelectItem { Text = x, Value = x }).ToList(); return(selections); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { base.ModifyMetadata(metadata, attributes); object constraints = base.EditorConfiguration["constraints"]; constraints = constraints.AddProperty("Pattern", "#"); base.EditorConfiguration["constraints"] = constraints; this.SetEditorConfiguration(metadata); }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { return new ISelectItem[] { new SelectItem { Value = PreviewOptions.OneThird, Text = "One third width" }, new SelectItem { Value = PreviewOptions.Half, Text = "Half width" }, new SelectItem { Value = PreviewOptions.Full, Text = "Full width" } }; }
public override void ModifyMetadata( ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { base.ModifyMetadata(metadata, attributes); var width = metadata.Model.ToString().Length * 10; metadata.EditorConfiguration.Add("style", $"width: {width}px"); }
protected override void SetEditorConfiguration(ExtendedMetadata metadata) { // Get the StringListAttribute with which you can specify the editor configuration, // and override the default settings in the StringList.js file. var stringListAttribute = metadata.Attributes.FirstOrDefault(a => typeof(StringListAttribute) == a.GetType()) as StringListAttribute; if (stringListAttribute != null) { if (!string.IsNullOrEmpty(stringListAttribute.ValueLabel)) { EditorConfiguration[VALUE_LABEL] = stringListAttribute.ValueLabel; } else { EditorConfiguration.Remove(VALUE_LABEL); } if (!string.IsNullOrEmpty(stringListAttribute.AddButtonLabel)) { EditorConfiguration[ADD_BUTTON_LABEL] = stringListAttribute.AddButtonLabel; } else { EditorConfiguration.Remove(ADD_BUTTON_LABEL); } if (!string.IsNullOrEmpty(stringListAttribute.RemoveButtonLabel)) { EditorConfiguration[REMOVE_BUTTON_LABEL] = stringListAttribute.RemoveButtonLabel; } else { EditorConfiguration.Remove(REMOVE_BUTTON_LABEL); } if (!string.IsNullOrEmpty(stringListAttribute.ValidationExpression)) { EditorConfiguration[VALIDATION_EXPRESSION] = stringListAttribute.ValidationExpression; } else { EditorConfiguration.Remove(VALIDATION_EXPRESSION); } if (!string.IsNullOrEmpty(stringListAttribute.ValidationMessage)) { EditorConfiguration[VALIDATION_MESSAGE] = stringListAttribute.ValidationMessage; } else { EditorConfiguration.Remove(VALIDATION_MESSAGE); } } base.SetEditorConfiguration(metadata); }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var facets = new List <IFacet>(); facets.Add(new FieldFacet(pathsFieldName)); var resp = SearchFactory <SearchDocument> .SearchClient.Search(new SearchRequest() { QueryText = "*", PageSize = 1, //RefinementType = RefinementType.SingleSelect, Facets = facets, }); var refinement = resp.Refinements.FirstOrDefault(r => r.Name == pathsFieldName); var items = (refinement != null) ? refinement.Items : new List <RefinementItem>(); var paths = new List <string>(); foreach (var result in items) { var parts = result.Value.Replace("\"", "").Split('/'); var lastPath = ""; foreach (var part in parts) { if (part == "") { continue; } var path = string.Format("{0}/{1}", lastPath, part); if (!paths.Contains(path)) { paths.Add(path); } lastPath = path; } } yield return(new SelectItem { Text = "--None--", Value = "None", }); foreach (var path in paths.OrderBy(p => p)) { yield return(new SelectItem { Text = path, Value = path, }); } }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { SelectionFactoryType = typeof(AttendXFormFieldsSelectionFactory); ClientEditingClass = "epi-cms/contentediting/editors/CheckBoxListEditor"; metadata.CustomEditorSettings["uiWrapperType"] = "flyout"; base.ModifyMetadata(metadata, attributes); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { //if (metadata.PropertyName == "PagePeerOrder") if (metadata.PropertyName == Global.SystemPropertyNames.SortIndex) { metadata.GroupName = EPiServer.DataAbstraction.SystemTabNames.Content; } base.ModifyMetadata(metadata, attributes); }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { return(new ISelectItem[] { new SelectItem() { Text = "Left", Value = "Left" }, new SelectItem() { Text = "Right", Value = "Right" } }); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { base.ModifyMetadata(metadata, attributes); metadata.EditorConfiguration["dialogContentParams"] = new { ModelType = typeof(LinkModel).FullName.ToLower(), BaseClass = "epi-link-item" }; }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { SelectionFactoryType = typeof(AttendXFormFieldsSelectionFactory); ClientEditingClass = "epi-cms/contentediting/editors/CheckBoxListEditor"; metadata.CustomEditorSettings["uiWrapperType"] = "flyout"; base.ModifyMetadata(metadata, attributes); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { base.ModifyMetadata(metadata, attributes); // We allow objects with a file URL, such as an image from File Manager, to be dropped on the logotype block... metadata.AdditionalValues["DropTargetType"] = new [] { "fileurl" }; // ...and when it is dropped we map the object (i.e. the URL) to the logotype's image URL property metadata.AdditionalValues["DropTargetChildProperty"] = "SiteLogotypeUrl"; }
public override void ModifyMetadata( ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { base.ModifyMetadata(metadata, attributes); ClientEditingClass = "epi.cms.contentediting.editors.ContentAreaEditor"; metadata.CustomEditorSettings["uiWrapperType"] = UiWrapperType.Floating; AllowedTypes = new List<Type>() { typeof(BlockData), typeof(PageData), typeof(IContent) }; }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { ClientEditingClass = "app.editors.TagSelector"; TagSelectorApiAttribute apiAttribute = attributes.FirstOrDefault(x => x.GetType() == typeof(TagSelectorApiAttribute)) as TagSelectorApiAttribute; if(apiAttribute != null) { EditorConfiguration["apiUrl"] = apiAttribute.ApiUri; } base.ModifyMetadata(metadata, attributes); }
public override IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { return GetSelectionFromDictionary( new Dictionary<string, string>() { {"Equals", OperatorNames.Equal}, {"Greater Than", OperatorNames.GreaterThan}, {"Less Than", OperatorNames.LessThan} }); }
public IEnumerable <ISelectItem> GetSelections(ExtendedMetadata metadata) { var organizationsList = CustomerContext.Current.GetOrganizations(); return(organizationsList.Select(organization => new SelectItem { Value = organization.Name, Text = organization.Name }).ToList()); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable <Attribute> attributes) { SelectionFactoryType = typeof(T); ClientEditingClass = "epi.cms.contentediting.editors.SelectionEditor"; base.ModifyMetadata(metadata, attributes); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { foreach (ExtendedMetadata property in metadata.Properties) { if (property.PropertyName == "icategorizable_category") { property.GroupName = SystemTabNames.PageHeader; property.Order = 9000; } } }
public override IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { return GetSelectionFromDictionary( new Dictionary<string, string>() { {"Default", ""}, {"Purple Red", "color-scheme2"}, {"Cyan Brown", "color-scheme3"}, {"Green Brown", "color-scheme4"} }); }
public override IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { return GetSelectionFromDictionary( new Dictionary<string, string>() { {"Heading 1", "h1"}, {"Heading 2", "h2"}, {"Heading 3", "h3"}, {"Heading 4", "h4"}, {"Heading 5", "h5"} }); }
/// <summary> /// Gets PageTypes using DisplayName if not null, else Name and not PageTypes SysRoot or SysRecycleBin /// </summary> /// <param name="metadata"></param> /// <returns>IEnumerable of SelectItems</returns> public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { var typeRepository = _typeRepository.Service; return typeRepository .List() .Where(c => c.Name != "SysRoot" && c.Name != "SysRecycleBin" && c.Name != "SysContentFolder" & c.Name != "SysContentAssetFolder") .Select(t => new SelectItem() { Text = !string.IsNullOrWhiteSpace(t.DisplayName) ? t.DisplayName : t.Name, Value = t.ID.ToString() }); }
public override IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { IProductFilterRegistry registry = ServiceLocator.Current.GetInstance<IProductFilterRegistry>(); var filterAttributes = registry.GetFilters(typeof(NumericFilterAttribute)); var selectionDictionary = new Dictionary<string, string>(); foreach (FilterAttribute attribute in filterAttributes) { selectionDictionary.Add(attribute.DisplayName, attribute.PropertyName); } return GetSelectionFromDictionary(selectionDictionary); }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { var allColors = Enum.GetValues(typeof(ProductColor)); ISelectItem[] colorItems = new ISelectItem[allColors.Length-1]; for (int i = 1; i < allColors.Length; i++) { var value = EPiServer.Framework.Localization.LocalizationService.Current.GetStringByCulture("/common/product/colors/" + ((ProductColor)i).ToString(), ContentLanguage.PreferredCulture); colorItems[i-1] = new SelectItem() { Text = value, Value = value }; } return colorItems; }
public override IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { return GetSelectionFromDictionary( new Dictionary<string, string>() { {"Boxed", "boxed"}, // The default layout of slider, size of the slider does not exceed the specified width and height in slider options. {"Full Width", "fullwidth"}, // Forces the slider to adapt width to the browser width. {"Full screen", "fullscreen"}, // Forces the slider to adapt width and height to the browser window dimension. {"Fill Width", "fillwidth"}, // Enables the slider to adapt width to its parent element. {"Auto fill", "autofill"}, // Enables the slider to adapt width and height to its parent element. {"Partial View", "partialview"} // It's like the boxed layout but nearby slides are always visible. }); }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { var results = SearchClient.Instance.Search<EmployeeLocationPage>() .OrderBy(x => x.Name) .Take(1000) .GetContentResult(); List<SelectItem> items = new List<SelectItem>(); foreach(var result in results) { items.Add(new SelectItem() { Text = result.Name, Value = result.Name }); } return items; }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { return new List<SelectItem> { new SelectItem { Text = "Blue", Value = "#7cb5ec"}, new SelectItem { Text = "Black", Value = "#434348"}, new SelectItem { Text = "Green", Value = "#90ed7d"}, new SelectItem { Text = "Orange", Value = "#f7a35c"}, new SelectItem { Text = "Purple", Value = "#8085e9"}, new SelectItem { Text = "Pink", Value = "#f15c80"}, new SelectItem { Text = "Yellow", Value = "#e4d354"}, new SelectItem { Text = "Grey", Value = "#cccccc"}, new SelectItem { Text = "Brown", Value = "#8d4653"}, new SelectItem { Text = "Turquoise", Value = "#91e8e1"} }; }
/// <summary> /// Gets the selections. /// </summary> /// <param name="metadata">The metadata.</param> /// <returns></returns> public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { var vaultList = new List<SelectItem>(); try { IOrderedEnumerable<Vault> vaults = _client.Query<Vault>().ToList().OrderBy(v => v.Name); foreach (Vault vault in vaults) { vaultList.Add(new SelectItem {Text = vault.Name, Value = vault.Id}); } } catch (Exception) { // leave the list empty if ImageVault query goes wrong } return vaultList; }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { var language = LanguageSelector.AutoDetect() as LanguageSelector; if (language != null) { var values = PaymentManager.GetPaymentMethods(language.LanguageBranch); foreach (var value in values.PaymentMethod) { yield return new SelectItem { Text = string.Format("{0} ({1})", value.Name, language.LanguageBranch), Value = value.PaymentMethodId }; } } }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { var commentStore = DynamicDataStoreFactory.Instance.GetStore(typeof(DDS_Location)); var allData = commentStore.Items<DDS_Location>(); var query = from sendmail in allData select sendmail; var list = query.ToList<DDS_Location>(); int i = 0; Region[] reg = new Region[list.Count]; foreach (var places in list) { reg[i] = new Region() { CountryCode = places.CountryCode, Name = places.RegionName, RegionCode = places.RegionCode }; i = i + 1; } return reg; }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { if ((metadata.Model as PropertyData) == null || (metadata.Model as PropertyData).Parent["icontent_contentlink"] == null || string.IsNullOrEmpty((metadata.Model as PropertyData).Parent["icontent_contentlink"].ToString())) yield break; var ownerPage = new ContentReference((metadata.Model as PropertyData).Parent["icontent_contentlink"].ToString()); EventPageBase EventPageBase = EPiServer.DataFactory.Instance.Get<EventPageBase>(ownerPage); if (EventPageBase.RegistrationForm == null) yield break; XForm xform = XForm.CreateInstance(new Guid(EventPageBase.RegistrationForm.Id.ToString())); NameValueCollection formControls = xform.CreateFormData().GetValues(); foreach (string data in formControls) { yield return new SelectItem() { Text = data, Value = data }; } }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { var layoutDirectory = new System.IO.DirectoryInfo(HostingEnvironment.MapPath("~/Views/Shared/Layouts")); if(!layoutDirectory.Exists) { yield return new SelectItem() { Text = "No layouts available.", Value = "" }; yield break; } var layouts = layoutDirectory.EnumerateDirectories("*", System.IO.SearchOption.TopDirectoryOnly); var siteroot = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath; foreach(var s in layouts) { yield return new SelectItem() { Text = s.Name, Value = s.FullName.Replace(siteroot, string.Empty).Replace("\\", "/").Insert(0,"~/") }; } }
public override IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { return GetSelectionFromArray("Cork", "Screw Cap", "Synthetic", "Glass"); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { ClientEditingClass = "alloy.editors.PreviewImage"; base.ModifyMetadata(metadata, attributes); }
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { ClientEditingClass = "alloy/editors/StringList"; base.ModifyMetadata(metadata, attributes); }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { var contactPages = SiteDataFactory.Instance.GetContactPages(); return new List<SelectItem>(contactPages.Select(c => new SelectItem {Value = c.PageLink, Text = c.Name})); }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { return new ISelectItem[] { new SelectItem() { Text = "Days", Value = "Days" }, new SelectItem() { Text = "Weeks", Value = "Weeks" } , new SelectItem() { Text = "Months", Value = "Months" } , new SelectItem() { Text = "Year", Value = "Year" }}; }
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata) { var contactPages = ContentLocator.Service.GetContactPages(); return new List<SelectItem>(contactPages.Select(c => new SelectItem {Value = c.PageLink, Text = c.Name})); }
public abstract IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata);