diff --git a/.github/IDEAS.md b/.github/IDEAS.md index 5761f40f..5695f614 100644 --- a/.github/IDEAS.md +++ b/.github/IDEAS.md @@ -1,4 +1,4 @@ -Umbraco Contentment Logo +Contentment for Umbraco Logo # Ideas for Contentment diff --git a/.github/README.md b/.github/README.md index b84a5f81..56a92747 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,6 +1,6 @@ -Umbraco Contentment Logo +Contentment for Umbraco logo -## Umbraco Contentment +## Contentment for Umbraco > contentment /kənˈtɛntm(ə)nt/ - a state of happiness and satisfaction @@ -112,3 +112,7 @@ _To give you an idea of how much human developer time/effort has been put into m - Thank you to [Umbrella](https://umbrellainc.co.uk) for facilitating the time and resource to help me develop this project. + +#### Logo + +The package logo uses the [Happy](https://thenounproject.com/term/happy/375493/) (by [Nick Bluth](https://thenounproject.com/nickbluth/)) icon from the [Noun Project](https://thenounproject.com), licensed under [CC BY 3.0 US](https://creativecommons.org/licenses/by/3.0/us/). diff --git a/.github/ROADMAP.md b/.github/ROADMAP.md index 10b4ce0c..c9dd1044 100644 --- a/.github/ROADMAP.md +++ b/.github/ROADMAP.md @@ -1,8 +1,8 @@ -Umbraco Contentment Logo +Contentment for Umbraco logo # Umbraco Contentment - Roadmap -Here is a _provisional_ roadmap for the Umbraco Contentment package, to be actioned at my own pleasure. +Here is a _provisional_ roadmap for the Contentment for Umbraco package, to be actioned at my own pleasure. ## v1 @@ -27,6 +27,7 @@ Initial release. Property Editors are: - Text Input _(a reimagining of the textstring editor)_ - Number Input _(a reimagining of the numeric editor)_ +- Data List: Templated List _(use custom AngularJS markup to render items)_ ### v1.3 @@ -53,5 +54,5 @@ Could be an interesting to explore the validation approaches for the Contentment ## v2 - _Who knows?!_ `¯\_(ツ)_/¯` -- Let's see if new ideas can be sparked from Umbraco v8.6+! +- Let's see if new ideas can be sparked from Umbraco v8.7+! diff --git a/VERSION b/VERSION index 537aabf7..afaf360d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0-beta \ No newline at end of file +1.0.0 \ No newline at end of file diff --git a/build/build-pkgs.ps1 b/build/build-pkgs.ps1 index 3c70f56e..25bfeb3d 100644 --- a/build/build-pkgs.ps1 +++ b/build/build-pkgs.ps1 @@ -26,6 +26,7 @@ Function parseSemVer($version) { # Set various variables / folder paths +$nugetPackageId = 'Our.Umbraco.Community.Contentment'; $projectNamespace = 'Umbraco.Community.Contentment'; $packageName = 'Contentment'; $nugetTitle = "${packageName} for Umbraco"; @@ -136,8 +137,8 @@ Compress-Archive -Path "${umbFolder}\*" -DestinationPath "${artifactsFolder}\Con # Populate the NuGet package manifest Copy-Item -Path "${rootFolder}\docs\assets\img\logo.png" -Destination "${assetsFolder}\icon.png"; -& $nuget_exe pack "${buildFolder}\manifest-nuget-core.nuspec" -BasePath $assetsFolder -OutputDirectory $artifactsFolder -Version "$($semver.VersionString)" -Properties "id=$projectNamespace;version=$($semver.VersionString);title=$nugetTitle;authors=$authorName;owners=$authorName;projectUrl=$packageUrl;requireLicenseAcceptance=false;description=$packageDescription;copyright=$copyright;license=MPL-2.0;language=en;tags=umbraco;minUmbracoVersion=$($minUmbracoVersion.VersionString);repositoryUrl=$packageUrl;" -& $nuget_exe pack "${buildFolder}\manifest-nuget-web.nuspec" -BasePath $assetsFolder -OutputDirectory $artifactsFolder -Version "$($semver.VersionString)" -Properties "id=$projectNamespace;version=$($semver.VersionString);title=$nugetTitle;authors=$authorName;owners=$authorName;projectUrl=$packageUrl;requireLicenseAcceptance=false;description=$packageDescription;copyright=$copyright;license=MPL-2.0;language=en;tags=umbraco;minUmbracoVersion=$($minUmbracoVersion.VersionString);repositoryUrl=$packageUrl;" +& $nuget_exe pack "${buildFolder}\manifest-nuget-core.nuspec" -BasePath $assetsFolder -OutputDirectory $artifactsFolder -Version "$($semver.VersionString)" -Properties "id=$nugetPackageId;version=$($semver.VersionString);title=$nugetTitle;authors=$authorName;owners=$authorName;projectUrl=$packageUrl;requireLicenseAcceptance=false;description=$packageDescription;copyright=$copyright;license=MPL-2.0;language=en;tags=umbraco;minUmbracoVersion=$($minUmbracoVersion.VersionString);repositoryUrl=$packageUrl;" +& $nuget_exe pack "${buildFolder}\manifest-nuget-web.nuspec" -BasePath $assetsFolder -OutputDirectory $artifactsFolder -Version "$($semver.VersionString)" -Properties "id=$nugetPackageId;version=$($semver.VersionString);title=$nugetTitle;authors=$authorName;owners=$authorName;projectUrl=$packageUrl;requireLicenseAcceptance=false;description=$packageDescription;copyright=$copyright;license=MPL-2.0;language=en;tags=umbraco;minUmbracoVersion=$($minUmbracoVersion.VersionString);repositoryUrl=$packageUrl;" # Tidy up folders diff --git a/docs/README.md b/docs/README.md index fbf6ce1d..fd319c0c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ -Umbraco Contentment Logo +Contentment for Umbraco logo -## Umbraco Contentment +## Contentment for Umbraco ### Documentation diff --git a/docs/assets/img/github-repository-open-graph-image.png b/docs/assets/img/github-repository-open-graph-image.png index f97c8845..ad266209 100644 Binary files a/docs/assets/img/github-repository-open-graph-image.png and b/docs/assets/img/github-repository-open-graph-image.png differ diff --git a/docs/assets/img/github-repository-open-graph-image.psd b/docs/assets/img/github-repository-open-graph-image.psd index b14ee56d..15b8bacd 100644 Binary files a/docs/assets/img/github-repository-open-graph-image.psd and b/docs/assets/img/github-repository-open-graph-image.psd differ diff --git a/docs/assets/img/icon-1024px.png b/docs/assets/img/icon-1024px.png index 381fc93c..dce15202 100644 Binary files a/docs/assets/img/icon-1024px.png and b/docs/assets/img/icon-1024px.png differ diff --git a/docs/assets/img/icon.png b/docs/assets/img/icon.png index 5b12021c..fbf7b698 100644 Binary files a/docs/assets/img/icon.png and b/docs/assets/img/icon.png differ diff --git a/docs/assets/img/icon.psd b/docs/assets/img/icon.psd index 4ffb3aaa..e91879a2 100644 Binary files a/docs/assets/img/icon.psd and b/docs/assets/img/icon.psd differ diff --git a/docs/assets/img/logo-1200px.png b/docs/assets/img/logo-1200px.png index 16c20244..0b0eecc7 100644 Binary files a/docs/assets/img/logo-1200px.png and b/docs/assets/img/logo-1200px.png differ diff --git a/docs/assets/img/logo.png b/docs/assets/img/logo.png index 45994500..36f197b1 100644 Binary files a/docs/assets/img/logo.png and b/docs/assets/img/logo.png differ diff --git a/docs/assets/img/logo.psd b/docs/assets/img/logo.psd index 5310c0e8..c67fc74e 100644 Binary files a/docs/assets/img/logo.psd and b/docs/assets/img/logo.psd differ diff --git a/docs/editors/bytes.md b/docs/editors/bytes.md index 0917d29c..918a09a6 100644 --- a/docs/editors/bytes.md +++ b/docs/editors/bytes.md @@ -1,6 +1,6 @@ -Umbraco Contentment Logo +Contentment for Umbraco logo -## Umbraco Contentment +## Contentment for Umbraco ### Bytes diff --git a/docs/editors/data-list.md b/docs/editors/data-list.md index 05b4cd5f..8b65fbd6 100644 --- a/docs/editors/data-list.md +++ b/docs/editors/data-list.md @@ -1,6 +1,6 @@ -Umbraco Contentment Logo +Contentment for Umbraco logo -## Umbraco Contentment +## Contentment for Umbraco ### Data List @@ -9,6 +9,7 @@ Data List is a property-editor that takes a data source and makes the values sel _If that sounds too generic, think of it like this... take a data source, say a SQL query, and display the results in an editor, say a dropdown-list, or checkbox-list, or whatever!_ > This property-editor has taken some inspiration from the community package, [nuPickers](https://our.umbraco.com/packages/backoffice-extensions/nupickers/) by Hendy Racher, _(itself inspired by [a uComponents idea](https://gist.github.com/leekelleher/6183524))._ +> **Please note,** Data List is not a drop in replacement for nuPickers. Data List does not offer like-for-like features. ### How to configure the editor? @@ -98,7 +99,7 @@ public class TimeZoneDataSource : IDataListSource items.Add(new DataListItem { Name = timezone.DisplayName, - Value = timezone.BaseUtcOffset.ToString() + Value = timezone.Id }); } @@ -121,6 +122,58 @@ public IEnumerable Fields => new ConfigurationField[] } } ``` +#### Providing custom values for published content + +As explained in the [*How to get the value?*](#how-to-get-the-value) section, the values from your data source will be either `string` or `IEnumerable` by default. + +If you need something more than this, your custom data source should implement the [`Umbraco.Community.Contentment.DataEditors.IDataListSourceValueConverter`](https://github.com/leekelleher/umbraco-contentment/blob/master/src/Umbraco.Community.Contentment/DataEditors/DataList/IDataListSourceValueConverter.cs) interface instead of `IDataListSource`. This interface inherits from `IDataListSource`, but also specifies two new methods that your data source will have to implement - that is the `GetValueType` and `ConvertValue` methods. + +With this interface, the `TimeZoneDataSource` class from before could now look like: + +```csharp +public class TimeZoneDataSource : IDataListSource, IDataListSourceValueConverter +{ + public string Name => "Time zones"; + + public string Description => "Data source for all the time zones."; + + public string Icon => "icon-globe"; + + public OverlaySize OverlaySize => OverlaySize.Small; + + public Dictionary DefaultValues => default; + + public IEnumerable Fields => default; + + public IEnumerable GetItems(Dictionary config) + { + var items = new List(); + + foreach (var timezone in TimeZoneInfo.GetSystemTimeZones()) + { + items.Add(new DataListItem + { + Name = timezone.DisplayName, + Value = timezone.Id + }); + } + + return items; + } + + public Type GetValueType(Dictionary config) + { + return typeof(TimeZoneInfo); + } + + public object ConvertValue(Type type, string value) + { + return TimeZoneInfo.FindSystemTimeZoneById(value); + } +} +``` + +This ensures that you'll get the value as `IEnumerable` instead of `IEnumerable`. #### Extending with your own custom list editor diff --git a/docs/editors/icon-picker.md b/docs/editors/icon-picker.md index b853c352..16c33d24 100644 --- a/docs/editors/icon-picker.md +++ b/docs/editors/icon-picker.md @@ -1,6 +1,6 @@ -Umbraco Contentment Logo +Contentment for Umbraco logo -## Umbraco Contentment +## Contentment for Umbraco ### Icon Picker diff --git a/docs/editors/notes.md b/docs/editors/notes.md index 573549e1..3f3cfde5 100644 --- a/docs/editors/notes.md +++ b/docs/editors/notes.md @@ -1,6 +1,6 @@ -Umbraco Contentment Logo +Contentment for Umbraco logo -## Umbraco Contentment +## Contentment for Umbraco ### Notes diff --git a/docs/editors/render-macro.md b/docs/editors/render-macro.md index b4e09ea1..a8c0109f 100644 --- a/docs/editors/render-macro.md +++ b/docs/editors/render-macro.md @@ -1,6 +1,6 @@ -Umbraco Contentment Logo +Contentment for Umbraco logo -## Umbraco Contentment +## Contentment for Umbraco **What is a Macro?** diff --git a/src/Umbraco.Community.Contentment/Composing/ContentmentComponent.cs b/src/Umbraco.Community.Contentment/Composing/ContentmentComponent.cs index 7a473aee..714c4534 100644 --- a/src/Umbraco.Community.Contentment/Composing/ContentmentComponent.cs +++ b/src/Umbraco.Community.Contentment/Composing/ContentmentComponent.cs @@ -55,7 +55,7 @@ private void ServerVariablesParser_Parsing(object sender, Dictionary(); + + composition + .Components() + .Append() + ; } } } diff --git a/src/Umbraco.Community.Contentment/Composing/ContentmentListItemCollectionBuilder.cs b/src/Umbraco.Community.Contentment/Composing/ContentmentListItemCollectionBuilder.cs index 71568b06..1687ce14 100644 --- a/src/Umbraco.Community.Contentment/Composing/ContentmentListItemCollectionBuilder.cs +++ b/src/Umbraco.Community.Contentment/Composing/ContentmentListItemCollectionBuilder.cs @@ -5,18 +5,21 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using Umbraco.Community.Contentment.DataEditors; using Umbraco.Core; using Umbraco.Core.Composing; namespace Umbraco.Community.Contentment.Composing { + [EditorBrowsable(EditorBrowsableState.Advanced)] public sealed class ContentmentListItemCollectionBuilder : LazyCollectionBuilderBase { protected override ContentmentListItemCollectionBuilder This => this; } + [EditorBrowsable(EditorBrowsableState.Advanced)] public sealed class ContentmentListItemCollection : BuilderCollectionBase { private readonly Dictionary _lookup; diff --git a/src/Umbraco.Community.Contentment/Composing/ContentmentRunComposer.cs b/src/Umbraco.Community.Contentment/Composing/ContentmentRunComposer.cs deleted file mode 100644 index ba0eb644..00000000 --- a/src/Umbraco.Community.Contentment/Composing/ContentmentRunComposer.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright © 2019 Lee Kelleher. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -using Umbraco.Core; -using Umbraco.Core.Composing; - -namespace Umbraco.Community.Contentment.Composing -{ - [ComposeAfter(typeof(ContentmentBootComposer))] - internal sealed class ContentmentRunComposer : IUserComposer - { - public void Compose(Composition composition) - { - composition - .Components() - .Append() - ; - } - } -} diff --git a/src/Umbraco.Community.Contentment/Configuration/ContentmentVersion.cs b/src/Umbraco.Community.Contentment/Configuration/ContentmentVersion.cs index 6eaef12d..25688e59 100644 --- a/src/Umbraco.Community.Contentment/Configuration/ContentmentVersion.cs +++ b/src/Umbraco.Community.Contentment/Configuration/ContentmentVersion.cs @@ -13,7 +13,7 @@ using Semver; using Umbraco.Core; -namespace Umbraco.Community.Contentment +namespace Umbraco.Community.Contentment.Configuration { public static class ContentmentVersion { diff --git a/src/Umbraco.Community.Contentment/Constants.cs b/src/Umbraco.Community.Contentment/Constants.cs index c0aff160..1d17d4b4 100644 --- a/src/Umbraco.Community.Contentment/Constants.cs +++ b/src/Umbraco.Community.Contentment/Constants.cs @@ -41,6 +41,36 @@ internal static partial class ConfigurationFieldAliases public const string OverlayView = "overlayView"; } + internal static partial class DefaultConfiguration + { + public static readonly object RichTextEditor = new + { + maxImageSize = 500, + mode = "classic", + stylesheets = false, + toolbar = new[] + { + "ace", + "undo", + "redo", + "cut", + "styleselect", + "removeformat", + "bold", + "italic", + "alignleft", + "aligncenter", + "alignright", + "bullist", + "numlist", + "link", + "umbmediapicker", + "umbmacro", + "umbembeddialog" + }, + }; + } + internal static partial class PropertyGroups { public const string Code = "Code"; diff --git a/src/Umbraco.Community.Contentment/Core/DictionaryExtensions.cs b/src/Umbraco.Community.Contentment/Core/DictionaryExtensions.cs index c98fd0bf..ca9589fa 100644 --- a/src/Umbraco.Community.Contentment/Core/DictionaryExtensions.cs +++ b/src/Umbraco.Community.Contentment/Core/DictionaryExtensions.cs @@ -9,16 +9,16 @@ namespace Umbraco.Core { internal static class DictionaryExtensions { - public static TValOut GetValueAs(this IDictionary config, TKey key, TValOut defaultValue = default) + public static TValueOut GetValueAs(this IDictionary config, TKey key, TValueOut defaultValue = default) { if (config.TryGetValue(key, out var tmp)) { - if (tmp is TValOut value) + if (tmp is TValueOut value) { return value; } - var attempt = tmp.TryConvertTo(); + var attempt = tmp.TryConvertTo(); if (attempt.Success) { return attempt.Result; @@ -28,17 +28,17 @@ public static TValOut GetValueAs(this IDictionary(this IDictionary config, TKey key, out TValOut value) + public static bool TryGetValueAs(this IDictionary config, TKey key, out TValueOut value) { if (config.TryGetValue(key, out var tmp1)) { - if (tmp1 is TValOut tmp2) + if (tmp1 is TValueOut tmp2) { value = tmp2; return true; } - var attempt = tmp1.TryConvertTo(); + var attempt = tmp1.TryConvertTo(); if (attempt.Success) { value = attempt.Result; diff --git a/src/Umbraco.Community.Contentment/DataEditors/CheckboxList/checkbox-list.css b/src/Umbraco.Community.Contentment/DataEditors/CheckboxList/checkbox-list.css index 064cc166..e83b2bd4 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/CheckboxList/checkbox-list.css +++ b/src/Umbraco.Community.Contentment/DataEditors/CheckboxList/checkbox-list.css @@ -11,11 +11,7 @@ margin-bottom: 8px; } -.contentment .umb-form-check__text { - margin-top: 1px; +.contentment .umb-form-check__text small { + display: block; + padding-top: 0; } - - .contentment .umb-form-check__text small { - display: block; - padding-top: 0; - } diff --git a/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.html b/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.html index 68827b4d..5ba8ccc7 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.html +++ b/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.html @@ -12,7 +12,7 @@ description="vm.populate(item, 'description')" sortable="vm.sortable" allow-remove="vm.allowRemove" - allow-edit="vm.allowEdit" + allow-edit="vm.allowEdit[item.key]" on-remove="vm.remove($index)" on-edit="vm.edit($index)"> diff --git a/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.js b/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.js index f2178f09..03bcf625 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.js +++ b/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.js @@ -18,7 +18,6 @@ angular.module("umbraco").controller("Umbraco.Community.Contentment.DataEditors. items: [], maxItems: 0, disableSorting: 0, - allowEdit: 1, allowRemove: 1, enableFilter: 0, orderBy: "name", @@ -46,13 +45,14 @@ angular.module("umbraco").controller("Umbraco.Community.Contentment.DataEditors. }); config.itemLookup = {}; + vm.allowEdit = {}; config.items.forEach(function (item) { config.itemLookup[item.key] = item; + vm.allowEdit[item.key] = item.fields && item.fields.length > 0; }); vm.allowAdd = (config.maxItems === 0 || config.maxItems === "0") || $scope.model.value.length < config.maxItems; - vm.allowEdit = Object.toBoolean(config.allowEdit); vm.allowRemove = Object.toBoolean(config.allowRemove); vm.sortable = Object.toBoolean(config.disableSorting) === false && (config.maxItems !== 1 && config.maxItems !== "1"); diff --git a/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.overlay.html b/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.overlay.html index 2885a406..0c5f1794 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.overlay.html +++ b/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.overlay.html @@ -55,7 +55,7 @@

Unable to find the editor for this configuration value.

- +

There are no fields for this item.

diff --git a/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.overlay.js b/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.overlay.js index 0a34d3e1..84610d59 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.overlay.js +++ b/src/Umbraco.Community.Contentment/DataEditors/ConfigurationEditor/configuration-editor.overlay.js @@ -60,6 +60,10 @@ angular.module("umbraco").controller("Umbraco.Community.Contentment.Overlays.Con $scope.model.size = editor.overlaySize; } + if (!item.value) { + item.value = {}; + } + vm.title = "Configure " + editor.name; vm.editor = Object.assign({}, editor); diff --git a/src/Umbraco.Community.Contentment/DataEditors/DataList/DataListConfigurationEditor.cs b/src/Umbraco.Community.Contentment/DataEditors/DataList/DataListConfigurationEditor.cs index 58b25da3..71ddcf3c 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/DataList/DataListConfigurationEditor.cs +++ b/src/Umbraco.Community.Contentment/DataEditors/DataList/DataListConfigurationEditor.cs @@ -42,7 +42,7 @@ public DataListConfigurationEditor(ConfigurationEditorUtility utility) Fields.Add( DataSource, "Data source", - "Select and configure the data source.", + "Select and configure a data source.", configEditorViewPath, new Dictionary(defaultConfigEditorConfig) { @@ -52,7 +52,7 @@ public DataListConfigurationEditor(ConfigurationEditorUtility utility) Fields.Add( ListEditor, "List editor", - "Select and configure the list editor.", + "Select and configure a list editor.", configEditorViewPath, new Dictionary(defaultConfigEditorConfig) { diff --git a/src/Umbraco.Community.Contentment/DataEditors/DataList/DataListDataEditor.cs b/src/Umbraco.Community.Contentment/DataEditors/DataList/DataListDataEditor.cs index f3265288..22137f86 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/DataList/DataListDataEditor.cs +++ b/src/Umbraco.Community.Contentment/DataEditors/DataList/DataListDataEditor.cs @@ -15,7 +15,7 @@ public sealed class DataListDataEditor : IDataEditor internal const string DataEditorAlias = Constants.Internals.DataEditorAliasPrefix + "DataList"; internal const string DataEditorName = Constants.Internals.DataEditorNamePrefix + "Data List"; internal const string DataEditorViewPath = Constants.Internals.EditorsPathRoot + "_empty.html"; - internal const string DataEditorIcon = "icon-bulleted-list"; + internal const string DataEditorIcon = "icon-fa fa-list-ul"; private readonly ConfigurationEditorUtility _utility; diff --git a/src/Umbraco.Community.Contentment/DataEditors/DataList/DataSources/SqlDataListSource.cs b/src/Umbraco.Community.Contentment/DataEditors/DataList/DataSources/SqlDataListSource.cs index 248b4d1d..9573bed3 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/DataList/DataSources/SqlDataListSource.cs +++ b/src/Umbraco.Community.Contentment/DataEditors/DataList/DataSources/SqlDataListSource.cs @@ -74,7 +74,7 @@ public SqlDataListSource() { Key = "connectionString", Name = "Connection string", - Description = "Enter the connection string.", + Description = "Select the connection string.", View = IOHelper.ResolveUrl(DropdownListDataListEditor.DataEditorViewPath), Config = new Dictionary { diff --git a/src/Umbraco.Community.Contentment/DataEditors/IconPicker/IconPickerDataEditor.cs b/src/Umbraco.Community.Contentment/DataEditors/IconPicker/IconPickerDataEditor.cs index fb4472ed..383252a7 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/IconPicker/IconPickerDataEditor.cs +++ b/src/Umbraco.Community.Contentment/DataEditors/IconPicker/IconPickerDataEditor.cs @@ -21,7 +21,7 @@ public sealed class IconPickerDataEditor : DataEditor internal const string DataEditorAlias = Constants.Internals.DataEditorAliasPrefix + "IconPicker"; internal const string DataEditorName = Constants.Internals.DataEditorNamePrefix + "Icon Picker"; internal const string DataEditorViewPath = Constants.Internals.EditorsPathRoot + "icon-picker.html"; - internal const string DataEditorIcon = "icon-circle-dotted"; + internal const string DataEditorIcon = "icon-fa fa-circle-o"; public IconPickerDataEditor(ILogger logger) : base(logger) diff --git a/src/Umbraco.Community.Contentment/DataEditors/Notes/NotesConfigurationEditor.cs b/src/Umbraco.Community.Contentment/DataEditors/Notes/NotesConfigurationEditor.cs index 71e99774..2a366eb3 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/Notes/NotesConfigurationEditor.cs +++ b/src/Umbraco.Community.Contentment/DataEditors/Notes/NotesConfigurationEditor.cs @@ -23,33 +23,7 @@ public NotesConfigurationEditor() IOHelper.ResolveUrl("~/umbraco/views/propertyeditors/rte/rte.html"), new Dictionary { - { "editor", new - { - maxImageSize = 500, - mode = "classic", - stylesheets = false, - toolbar = new[] - { - "ace", - "undo", - "redo", - "cut", - "styleselect", - "removeformat", - "bold", - "italic", - "alignleft", - "aligncenter", - "alignright", - "bullist", - "numlist", - "link", - "umbmediapicker", - "umbmacro", - "umbembeddialog" - }, - } - } + { "editor", Constants.Conventions.DefaultConfiguration.RichTextEditor } }); Fields.Add(new HideLabelConfigurationField()); diff --git a/src/Umbraco.Community.Contentment/DataEditors/Notes/NotesDataEditor.cs b/src/Umbraco.Community.Contentment/DataEditors/Notes/NotesDataEditor.cs index cf1d011f..2bf191ed 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/Notes/NotesDataEditor.cs +++ b/src/Umbraco.Community.Contentment/DataEditors/Notes/NotesDataEditor.cs @@ -14,7 +14,7 @@ public sealed class NotesDataEditor : IDataEditor internal const string DataEditorAlias = Constants.Internals.DataEditorAliasPrefix + "Notes"; internal const string DataEditorName = Constants.Internals.DataEditorNamePrefix + "Notes"; internal const string DataEditorViewPath = Constants.Internals.EditorsPathRoot + "notes.html"; - internal const string DataEditorIcon = "icon-readonly"; + internal const string DataEditorIcon = "icon-fa fa-sticky-note-o"; public string Alias => DataEditorAlias; diff --git a/src/Umbraco.Community.Contentment/DataEditors/RadioButtonList/RadioButtonListDataListEditor.cs b/src/Umbraco.Community.Contentment/DataEditors/RadioButtonList/RadioButtonListDataListEditor.cs index 716a9d97..103d7478 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/RadioButtonList/RadioButtonListDataListEditor.cs +++ b/src/Umbraco.Community.Contentment/DataEditors/RadioButtonList/RadioButtonListDataListEditor.cs @@ -14,7 +14,7 @@ public sealed class RadioButtonListDataListEditor : IDataListEditor public string Name => "Radio Button List"; - public string Description => "Select a single value from a list of radio buttons"; + public string Description => "Select a single value from a list of radio buttons."; public string Icon => "icon-target"; diff --git a/src/Umbraco.Community.Contentment/Migrations/Install/RegisterUmbracoPackageEntry.cs b/src/Umbraco.Community.Contentment/Migrations/Install/RegisterUmbracoPackageEntry.cs index 9dcce5d2..3930120e 100644 --- a/src/Umbraco.Community.Contentment/Migrations/Install/RegisterUmbracoPackageEntry.cs +++ b/src/Umbraco.Community.Contentment/Migrations/Install/RegisterUmbracoPackageEntry.cs @@ -39,7 +39,7 @@ public override void Migrate() License = Constants.Package.License, LicenseUrl = Constants.Package.LicenseUrl, UmbracoVersion = Constants.Package.MinimumSupportedUmbracoVersion, - Version = ContentmentVersion.Version.ToString(), + Version = Configuration.ContentmentVersion.Version.ToString(), Readme = "", }); } diff --git a/src/Umbraco.Community.Contentment/Trees/ContentmentTreeController.cs b/src/Umbraco.Community.Contentment/Trees/ContentmentTreeController.cs index e5555e02..ae472c08 100644 --- a/src/Umbraco.Community.Contentment/Trees/ContentmentTreeController.cs +++ b/src/Umbraco.Community.Contentment/Trees/ContentmentTreeController.cs @@ -27,7 +27,7 @@ protected override TreeNode CreateRootNode(FormDataCollection queryStrings) { var root = base.CreateRootNode(queryStrings); - root.Icon = "icon-fa fa-dot-circle-o"; + root.Icon = "icon-fa fa-cube"; root.HasChildren = false; root.RoutePath = $"{SectionAlias}/{TreeAlias}/index"; root.MenuUrl = null; diff --git a/src/Umbraco.Community.Contentment/Umbraco.Community.Contentment.csproj b/src/Umbraco.Community.Contentment/Umbraco.Community.Contentment.csproj index 733ee1ce..69af9962 100644 --- a/src/Umbraco.Community.Contentment/Umbraco.Community.Contentment.csproj +++ b/src/Umbraco.Community.Contentment/Umbraco.Community.Contentment.csproj @@ -294,7 +294,7 @@ - + @@ -312,7 +312,6 @@ - diff --git a/src/Umbraco.Community.Contentment/Web/UI/App_Plugins/Contentment/backoffice/contentment/index.html b/src/Umbraco.Community.Contentment/Web/UI/App_Plugins/Contentment/backoffice/contentment/index.html index 927bc873..84fb699b 100644 --- a/src/Umbraco.Community.Contentment/Web/UI/App_Plugins/Contentment/backoffice/contentment/index.html +++ b/src/Umbraco.Community.Contentment/Web/UI/App_Plugins/Contentment/backoffice/contentment/index.html @@ -10,7 +10,7 @@
- Contentment logo + Contentment logo
@@ -26,12 +26,38 @@
- - - -
- unsplash-logoKalen Emsley +
+
+

Do you want to stay up to date with Contentment?

+

Sign up for our newsletter about latest Contentment package releases and community news.

+
+
+ + +
+
+ + + + + +
+
+ +
+
+ +
+
+
+
+
@@ -60,25 +86,6 @@ - - - - -
-
- -
-
- -
-
-
-
-
- -
-
- @@ -130,12 +137,6 @@ - - - Copyright © 2019 Lee Kelleher - - -
diff --git a/src/Umbraco.Community.Contentment/Web/UI/backoffice.js b/src/Umbraco.Community.Contentment/Web/UI/backoffice.js index 120fe09e..b9bb4d4b 100644 --- a/src/Umbraco.Community.Contentment/Web/UI/backoffice.js +++ b/src/Umbraco.Community.Contentment/Web/UI/backoffice.js @@ -4,12 +4,10 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ angular.module("umbraco").controller("Umbraco.Community.Contentment.Tree.Controller", [ - "$http", "$scope", - "formHelper", + "$window", "navigationService", - "umbRequestHelper", - function ($http, $scope, formHelper, navigationService, umbRequestHelper) { + function ($scope, $window, navigationService) { // console.log("tree.model", $scope.model); @@ -38,7 +36,7 @@ angular.module("umbraco").controller("Umbraco.Community.Contentment.Tree.Control { icon: "icon-fa fa-comments-o", name: "Support forum", - url: "https://our.umbraco.com", + url: "https://our.umbraco.com/packages/backoffice-extensions/contentment/contentment-feedback/", description: "Ask for help, the community is your friend." }, { @@ -62,7 +60,12 @@ angular.module("umbraco").controller("Umbraco.Community.Contentment.Tree.Control ]; vm.shareUrl = encodeURIComponent("https://github.com/leekelleher/umbraco-contentment"); - vm.shareTitle = encodeURIComponent("Check out Contentment, probably the best Umbraco package in the world!"); + vm.shareTitle = encodeURIComponent("Check out Contentment, innovative editor components for Umbraco CMS!"); + + vm.subscribe = function ($event) { + $window.open("https://tinyletter.com/umbraco-contentment", "newsletterWindow", "scrollbars=yes,width=840,height=640"); + return true; + }; vm.vote = function (x) { vm.nggyu = x == false;