-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v10/develop' into v10/main
- Loading branch information
Showing
3 changed files
with
62 additions
and
84 deletions.
There are no files selected for viewing
42 changes: 0 additions & 42 deletions
42
...aster.Umbraco.IcomoonPicker/App_plugins/Infocaster.Umbraco.IcomoonPicker/package.manifest
This file was deleted.
Oops, something went wrong.
62 changes: 62 additions & 0 deletions
62
src/Infocaster.Umbraco.IcomoonPicker/PropertyValueConverters/IcomoonPickerDataType.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Umbraco.Cms.Core.IO; | ||
using Umbraco.Cms.Core.PropertyEditors; | ||
using Umbraco.Cms.Core.PropertyEditors.Validators; | ||
using Umbraco.Cms.Core.Services; | ||
|
||
namespace Infocaster.Umbraco.IcomoonPicker.PropertyValueConverters | ||
{ | ||
[DataEditor( | ||
alias: "Infocaster.IcomoonPicker", | ||
name: "Icomoon icon picker", | ||
view: "~/App_Plugins/Infocaster.Umbraco.IcomoonPicker/editor/editor.html", | ||
ValueType = ValueTypes.String)] | ||
public class IcomoonPickerDataType : DataEditor | ||
{ | ||
private readonly IIOHelper _ioHelper; | ||
private readonly IEditorConfigurationParser _editorConfigurationParser; | ||
private readonly ILocalizedTextService _textService; | ||
|
||
public IcomoonPickerDataType( | ||
IDataValueEditorFactory dataValueEditorFactory, | ||
IIOHelper ioHelper, | ||
IEditorConfigurationParser editorConfigurationParser, | ||
ILocalizedTextService textService) | ||
: base(dataValueEditorFactory) | ||
{ | ||
_ioHelper = ioHelper; | ||
_editorConfigurationParser = editorConfigurationParser; | ||
_textService = textService; | ||
} | ||
|
||
protected override IConfigurationEditor CreateConfigurationEditor() | ||
{ | ||
return new IcomoonPickerConfigurationEditor(_ioHelper, _editorConfigurationParser, _textService); | ||
} | ||
} | ||
|
||
public class IcomoonPickerConfigurationEditor | ||
: ConfigurationEditor<IcomoonPickerConfiguration> | ||
{ | ||
public IcomoonPickerConfigurationEditor(IIOHelper ioHelper, IEditorConfigurationParser editorConfigurationParser, ILocalizedTextService textService) | ||
: base(ioHelper, editorConfigurationParser) | ||
{ | ||
Field(nameof(IcomoonPickerConfiguration.ProjectName)).Validators.Add(new RequiredValidator(textService)); | ||
Field(nameof(IcomoonPickerConfiguration.ProjectCode)).Validators.Add(new RequiredValidator(textService)); | ||
} | ||
} | ||
|
||
public class IcomoonPickerConfiguration | ||
{ | ||
[ConfigurationField("projectName", "Project name", "requiredfield", Description = "The name of the project in icomoon")] | ||
public string ProjectName { get; set; } | ||
|
||
[ConfigurationField("projectCode", "Project code", "requiredfield", Description = "The code that is associated with this project in icomoon")] | ||
public string ProjectCode { get; set; } | ||
} | ||
} |
42 changes: 0 additions & 42 deletions
42
src/Infocaster.Umbraco.IcomoonPicker/frontend/public/package.manifest
This file was deleted.
Oops, something went wrong.