diff --git a/Our.Umbraco.GMaps.Core/Config/GoogleMapsConfig.cs b/Our.Umbraco.GMaps.Core/Config/GoogleMapsConfig.cs deleted file mode 100644 index 645ed82..0000000 --- a/Our.Umbraco.GMaps.Core/Config/GoogleMapsConfig.cs +++ /dev/null @@ -1,54 +0,0 @@ -using Newtonsoft.Json; -using System.Runtime.Serialization; -#if NET5_0_OR_GREATER -using Microsoft.Extensions.Configuration; -#else -using System.Configuration; -#endif - -namespace Our.Umbraco.GMaps.Core.Config -{ - public class GoogleMapsConfig - { - [DataMember(Name = "apiKey")] - [JsonProperty("apiKey")] - public string ApiKey { get; set; } - - [DataMember(Name = "defaultLocation")] - [JsonProperty("defaultLocation")] - public string DefaultLocation { get; set; } - - [DataMember(Name = "zoomLevel")] - [JsonProperty("zoomLevel")] - public int? ZoomLevel { get; set; } - -#if NET5_0_OR_GREATER - public GoogleMapsConfig() - { - } - - internal GoogleMapsConfig(IConfiguration configuration) - { - if (configuration != null) - { - var configSection = configuration.GetSection(Constants.Configuration.SectionName).Get(); - - ApiKey = configSection?.ApiKey; - DefaultLocation = configSection?.DefaultLocation; - ZoomLevel = configSection?.ZoomLevel; - } - } -#else - public GoogleMapsConfig() - { - ApiKey = GetConfigurationItem(Constants.Configuration.ApiKey); - DefaultLocation = GetConfigurationItem(Constants.Configuration.DefaultLocation); - if (int.TryParse(GetConfigurationItem(Constants.Configuration.DefaultZoom), out int defaultZoom)) - { - ZoomLevel = defaultZoom; - } - } - private static string GetConfigurationItem(string key) => ConfigurationManager.AppSettings[$"{Constants.Configuration.SectionName}:{key}"]; -#endif - } -} diff --git a/Our.Umbraco.GMaps.Core/Configuration/GoogleMaps.cs b/Our.Umbraco.GMaps.Core/Configuration/GoogleMaps.cs new file mode 100644 index 0000000..2767499 --- /dev/null +++ b/Our.Umbraco.GMaps.Core/Configuration/GoogleMaps.cs @@ -0,0 +1,17 @@ +using System.Runtime.Serialization; + +namespace Our.Umbraco.GMaps.Core.Configuration +{ + [DataContract] + public class GoogleMaps + { + [DataMember(Name = "apiKey")] + public string ApiKey { get; set; } + + [DataMember(Name = "defaultLocation")] + public string DefaultLocation { get; set; } + + [DataMember(Name = "zoomLevel")] + public int? ZoomLevel { get; set; } + } +} diff --git a/Our.Umbraco.GMaps.Core/Constants.cs b/Our.Umbraco.GMaps.Core/Constants.cs index c38ee06..0f38262 100644 --- a/Our.Umbraco.GMaps.Core/Constants.cs +++ b/Our.Umbraco.GMaps.Core/Constants.cs @@ -4,13 +4,5 @@ internal static class Constants { public const string PluginName = "GMaps"; public const string MapPropertyAlias = "Our.Umbraco.GMaps"; - - internal static class Configuration - { - public const string SectionName = "GoogleMaps"; - public const string ApiKey = "ApiKey"; - public const string DefaultLocation = "DefaultLocation"; - public const string DefaultZoom = "DefaultZoomLevel"; - } } } diff --git a/Our.Umbraco.GMaps.Core/Controllers/GoogleMapsController.cs b/Our.Umbraco.GMaps.Core/Controllers/GoogleMapsController.cs index c599dc8..a3edb15 100644 --- a/Our.Umbraco.GMaps.Core/Controllers/GoogleMapsController.cs +++ b/Our.Umbraco.GMaps.Core/Controllers/GoogleMapsController.cs @@ -1,45 +1,25 @@ -using Our.Umbraco.GMaps.Core.Config; -#if NET5_0_OR_GREATER +using Our.Umbraco.GMaps.Core.Configuration; using Microsoft.AspNetCore.Mvc; using Umbraco.Cms.Web.BackOffice.Controllers; using Umbraco.Cms.Web.Common.Attributes; using Umbraco.Cms.Web.Common.Controllers; -#else -using System.Web.Http; -using Umbraco.Web.WebApi; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration; -using Umbraco.Core.Logging; -using Umbraco.Core.Persistence; -using Umbraco.Core.Services; -using Umbraco.Web; -using Umbraco.Web.Mvc; -using Umbraco.Core.Mapping; -#endif +using Microsoft.Extensions.Options; namespace Our.Umbraco.GMaps.Core.Controllers { [PluginController(Constants.PluginName)] public class GoogleMapsController : UmbracoAuthorizedApiController { - private readonly GoogleMapsConfig googleMapsConfig; + private GoogleMaps googleMapsConfig; -#if NET5_0_OR_GREATER - public GoogleMapsController(GoogleMapsConfig settings) -#else - public GoogleMapsController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, - ISqlContext sqlContext, ServiceContext services, GoogleMapsConfig settings, - AppCaches appCaches, IProfilingLogger logger, global::Umbraco.Core.IRuntimeState runtimeState, - UmbracoHelper umbracoHelper) : - base(globalSettings, umbracoContextAccessor, sqlContext, services, appCaches, logger, runtimeState, umbracoHelper) -#endif + public GoogleMapsController(IOptionsMonitor settings) { - googleMapsConfig = settings; + googleMapsConfig = settings.CurrentValue; + settings.OnChange(config => googleMapsConfig = config); } - [HttpGet] - public GoogleMapsConfig GetSettings() + public GoogleMaps GetSettings() { return googleMapsConfig; } diff --git a/Our.Umbraco.GMaps.Core/GoogleMapsBuilderExtensions.cs b/Our.Umbraco.GMaps.Core/GoogleMapsBuilderExtensions.cs index 98a0d92..bfde91c 100644 --- a/Our.Umbraco.GMaps.Core/GoogleMapsBuilderExtensions.cs +++ b/Our.Umbraco.GMaps.Core/GoogleMapsBuilderExtensions.cs @@ -1,7 +1,6 @@ -#if NET5_0_OR_GREATER +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Our.Umbraco.GMaps.Core.Config; -using System; +using Our.Umbraco.GMaps.Core.Configuration; using System.Linq; using Umbraco.Cms.Core.DependencyInjection; @@ -15,34 +14,20 @@ public static class GoogleMapsBuilderExtensions /// /// /// - public static IUmbracoBuilder AddGoogleMaps(this IUmbracoBuilder builder, Action defaultOptions = default) + public static IUmbracoBuilder AddGoogleMaps(this IUmbracoBuilder builder) { // if the GoogleMapsConfig Service is registered then we assume this has been added before so we don't do it again. - if (builder.Services.FirstOrDefault(x => x.ServiceType == typeof(GoogleMapsConfig)) != null) + if (builder.Services.FirstOrDefault(x => x.ServiceType == typeof(GoogleMaps)) != null) { return builder; } - var options = builder.Services.AddSingleton(r => + builder.Services.Configure(options => { - var ret = new GoogleMapsConfig(builder.Config); - - if (defaultOptions != default) - { - //Override with custom details - defaultOptions.Invoke(ret); - } - return ret; + builder.Config.GetSection(nameof(GoogleMaps)).Bind(options); }); - - if (defaultOptions != default) - { - //options..Configure(defaultOptions); - } - return builder; } } -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/Our.Umbraco.GMaps.Core/Models/Address.cs b/Our.Umbraco.GMaps.Core/Models/Address.cs index d09b644..8a3f776 100644 --- a/Our.Umbraco.GMaps.Core/Models/Address.cs +++ b/Our.Umbraco.GMaps.Core/Models/Address.cs @@ -1,8 +1,6 @@ using Newtonsoft.Json; using System.Runtime.Serialization; -#if NET5_0_OR_GREATER using System.Text.Json.Serialization; -#endif namespace Our.Umbraco.GMaps.Models { @@ -10,58 +8,42 @@ public class Address { [DataMember(Name = "coordinates")] [JsonProperty("coordinates")] -#if NET5_0_OR_GREATER [JsonPropertyName("coordinates")] -#endif public Location Coordinates { get; set; } = new Location(); [DataMember(Name = "full_address")] [JsonProperty("full_address")] -#if NET5_0_OR_GREATER [JsonPropertyName("full_address")] -#endif public string FullAddress { get; set; } [DataMember(Name = "streetNumber")] [JsonProperty("streetNumber")] -#if NET5_0_OR_GREATER [JsonPropertyName("streetNumber")] -#endif public string StreetNumber { get; set; } [DataMember(Name = "street")] [JsonProperty("street")] -#if NET5_0_OR_GREATER [JsonPropertyName("street")] -#endif public string Street { get; set; } [DataMember(Name = "postalcode")] [JsonProperty("postalcode")] -#if NET5_0_OR_GREATER [JsonPropertyName("postalcode")] -#endif public string PostalCode { get; set; } [DataMember(Name = "city")] [JsonProperty("city")] -#if NET5_0_OR_GREATER [JsonPropertyName("city")] -#endif public string City { get; set; } [DataMember(Name = "state")] [JsonProperty("state")] -#if NET5_0_OR_GREATER [JsonPropertyName("state")] -#endif public string State { get; set; } [DataMember(Name = "country")] [JsonProperty("country")] -#if NET5_0_OR_GREATER [JsonPropertyName("country")] -#endif public string Country { get; set; } } diff --git a/Our.Umbraco.GMaps.Core/Models/Configuration/Config.cs b/Our.Umbraco.GMaps.Core/Models/Configuration/Config.cs index 01f13b1..f36ea24 100644 --- a/Our.Umbraco.GMaps.Core/Models/Configuration/Config.cs +++ b/Our.Umbraco.GMaps.Core/Models/Configuration/Config.cs @@ -2,9 +2,7 @@ using Newtonsoft.Json.Converters; using Our.Umbraco.GMaps.Models; using System.Runtime.Serialization; -#if NET5_0_OR_GREATER using System.Text.Json.Serialization; -#endif namespace Our.Umbraco.GMaps.Core.Models.Configuration { public class Config @@ -22,10 +20,8 @@ public class Config public string Zoom { get; set; } [DataMember(Name = "maptype")] -#if NET5_0_OR_GREATER [JsonPropertyName("maptype")] [System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))] -#endif [JsonProperty("maptype")] [Newtonsoft.Json.JsonConverter(typeof(StringEnumConverter))] public MapType MapType { get; set; } diff --git a/Our.Umbraco.GMaps.Core/Models/Location.cs b/Our.Umbraco.GMaps.Core/Models/Location.cs index 7dce9d1..4fe7d39 100644 --- a/Our.Umbraco.GMaps.Core/Models/Location.cs +++ b/Our.Umbraco.GMaps.Core/Models/Location.cs @@ -2,9 +2,7 @@ using System; using System.Globalization; using System.Runtime.Serialization; -#if NET5_0_OR_GREATER using System.Text.Json.Serialization; -#endif namespace Our.Umbraco.GMaps.Models { @@ -15,16 +13,12 @@ public class Location [DataMember(Name = "lat")] [JsonProperty("lat")] -#if NET5_0_OR_GREATER [JsonPropertyName("lat")] -#endif public double Latitude { get; set; } [DataMember(Name = "lng")] [JsonProperty("lng")] -#if NET5_0_OR_GREATER [JsonPropertyName("lng")] -#endif public double Longitude { get; set; } public bool IsEmpty => Latitude == 0 && Longitude == 0; diff --git a/Our.Umbraco.GMaps.Core/Models/Map.cs b/Our.Umbraco.GMaps.Core/Models/Map.cs index 0f0e4c9..ec93723 100644 --- a/Our.Umbraco.GMaps.Core/Models/Map.cs +++ b/Our.Umbraco.GMaps.Core/Models/Map.cs @@ -1,8 +1,6 @@ using Newtonsoft.Json; using System.Runtime.Serialization; -#if NET5_0_OR_GREATER using System.Text.Json.Serialization; -#endif namespace Our.Umbraco.GMaps.Models { @@ -10,16 +8,12 @@ public class Map { [DataMember(Name = "address")] [JsonProperty("address")] -#if NET5_0_OR_GREATER [JsonPropertyName("address")] -#endif public Address Address { get; set; } = new Address(); [DataMember(Name = "mapconfig")] [JsonProperty("mapconfig")] -#if NET5_0_OR_GREATER [JsonPropertyName("mapconfig")] -#endif public MapConfig MapConfig { get; set; } = new MapConfig(); } diff --git a/Our.Umbraco.GMaps.Core/Models/MapConfig.cs b/Our.Umbraco.GMaps.Core/Models/MapConfig.cs index a8e266d..9b52e47 100644 --- a/Our.Umbraco.GMaps.Core/Models/MapConfig.cs +++ b/Our.Umbraco.GMaps.Core/Models/MapConfig.cs @@ -1,9 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Runtime.Serialization; -#if NET5_0_OR_GREATER using System.Text.Json.Serialization; -#endif namespace Our.Umbraco.GMaps.Models { @@ -11,38 +9,28 @@ public class MapConfig { [DataMember(Name = "apikey")] [JsonProperty("apikey")] -#if NET5_0_OR_GREATER [JsonPropertyName("apikey")] -#endif public string ApiKey { get; set; } [DataMember(Name = "zoom")] [JsonProperty("zoom")] -#if NET5_0_OR_GREATER [JsonPropertyName("zoom")] -#endif public int Zoom { get; set; } [DataMember(Name = "centerCoordinates")] [JsonProperty("centerCoordinates")] -#if NET5_0_OR_GREATER [JsonPropertyName("centerCoordinates")] -#endif public Location CenterCoordinates { get; set; } = new Location(); [DataMember(Name = "mapstyle")] [JsonProperty("mapstyle")] -#if NET5_0_OR_GREATER [JsonPropertyName("mapstyle")] -#endif public string Style { get; set; } [DataMember(Name = "maptype")] [JsonProperty("maptype")] -#if NET5_0_OR_GREATER [JsonPropertyName("maptype")] [System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))] -#endif [Newtonsoft.Json.JsonConverter(typeof(StringEnumConverter))] public MapType? MapType { get; set; } } diff --git a/Our.Umbraco.GMaps.Core/Our.Umbraco.GMaps.Core.csproj b/Our.Umbraco.GMaps.Core/Our.Umbraco.GMaps.Core.csproj index b7369fa..61898de 100644 --- a/Our.Umbraco.GMaps.Core/Our.Umbraco.GMaps.Core.csproj +++ b/Our.Umbraco.GMaps.Core/Our.Umbraco.GMaps.Core.csproj @@ -1,14 +1,14 @@  - net5.0;net6.0;net7.0;net472 + net6.0;net7.0 True - 2.1.4-pre1 + 2.2.0-pre1 Arnold Visser Arnold Visser Basic Google Maps with autocomplete property editor for Umbraco 8+. This package contains the Core DLL only. Copyright © Arnold Visser - $(AssemblyName) - Google Maps for Umbraco 8+ + $(AssemblyName) - Google Maps for Umbraco MIT https://github.com/ArnoldV/Our.Umbraco.GMaps icon.png @@ -16,62 +16,16 @@ en-US README.nuget.md icon.png - Now multi-targeting Umbraco 8 - 11 - - - - AnyCPU - - - - AnyCPU - - - - AnyCPU - - - - AnyCPU + Now multi-targeting Umbraco 10 - 12 - - AnyCPU - - - - AnyCPU - - - - AnyCPU - - - - AnyCPU - - - - - - - - - - - 9.0.0 - - - - - - 9.0.0 + + - - - - 9.0.0 + + all + runtime; build; native; contentfiles; analyzers; buildtransitive @@ -85,11 +39,4 @@ - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - diff --git a/Our.Umbraco.GMaps.Core/PropertyValueConverter/SingleMapPropertyValueConverter.cs b/Our.Umbraco.GMaps.Core/PropertyValueConverter/SingleMapPropertyValueConverter.cs index 0c64c18..7a38686 100644 --- a/Our.Umbraco.GMaps.Core/PropertyValueConverter/SingleMapPropertyValueConverter.cs +++ b/Our.Umbraco.GMaps.Core/PropertyValueConverter/SingleMapPropertyValueConverter.cs @@ -1,29 +1,25 @@ -#if NET5_0_OR_GREATER -using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; using Umbraco.Cms.Core.PropertyEditors; -using Microsoft.Extensions.Configuration; -#else -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -#endif using System; using Newtonsoft.Json; using Our.Umbraco.GMaps.Models; using Our.Umbraco.GMaps.Core; using Our.Umbraco.GMaps.Core.Models.Configuration; using System.Collections.Generic; -using Our.Umbraco.GMaps.Core.Config; +using Our.Umbraco.GMaps.Core.Configuration; using Our.Umbraco.GMaps.Models.Legacy; +using Microsoft.Extensions.Options; namespace Our.Umbraco.GMaps.PropertyValueConverter { public class SingleMapPropertyValueConverter : PropertyValueConverterBase { - private readonly GoogleMapsConfig googleMapsConfig; + private GoogleMaps googleMapsConfig; - public SingleMapPropertyValueConverter(GoogleMapsConfig googleMapsConfig) + public SingleMapPropertyValueConverter(IOptionsMonitor googleMapsConfig) { - this.googleMapsConfig = googleMapsConfig; + this.googleMapsConfig = googleMapsConfig.CurrentValue; + googleMapsConfig.OnChange(config => this.googleMapsConfig = config); } public override bool IsConverter(IPublishedPropertyType propertyType) => propertyType.EditorAlias.Equals(Constants.MapPropertyAlias); diff --git a/Our.Umbraco.GMaps.UmbracoV10/Our.Umbraco.GMaps.UmbracoV10.csproj b/Our.Umbraco.GMaps.UmbracoV10/Our.Umbraco.GMaps.UmbracoV10.csproj index dad867d..d13c89c 100644 --- a/Our.Umbraco.GMaps.UmbracoV10/Our.Umbraco.GMaps.UmbracoV10.csproj +++ b/Our.Umbraco.GMaps.UmbracoV10/Our.Umbraco.GMaps.UmbracoV10.csproj @@ -7,10 +7,8 @@ - - - + @@ -21,11 +19,7 @@ - - - - - + @@ -33,14 +27,4 @@ false false - - - - - - - diff --git a/Our.Umbraco.GMaps.UmbracoV11/Our.Umbraco.GMaps.UmbracoV11.csproj b/Our.Umbraco.GMaps.UmbracoV11/Our.Umbraco.GMaps.UmbracoV11.csproj index 0755e65..dce0f4a 100644 --- a/Our.Umbraco.GMaps.UmbracoV11/Our.Umbraco.GMaps.UmbracoV11.csproj +++ b/Our.Umbraco.GMaps.UmbracoV11/Our.Umbraco.GMaps.UmbracoV11.csproj @@ -7,10 +7,8 @@ - - - + @@ -21,11 +19,7 @@ - - - - - + @@ -33,14 +27,4 @@ false false - - - - - - - diff --git a/Our.Umbraco.GMaps.UmbracoV12/.gitignore b/Our.Umbraco.GMaps.UmbracoV12/.gitignore new file mode 100644 index 0000000..408c316 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV12/.gitignore @@ -0,0 +1,480 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# JetBrains Rider +.idea/ +*.sln.iml + +## +## Visual Studio Code +## +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +## +## Umbraco CMS +## + +# JSON schema file for appsettings.json +appsettings-schema.json + +# Packages created from the backoffice (package.xml/package.zip) +/umbraco/Data/CreatedPackages/ + +# Temp folder containing Examine indexes, NuCache, MediaCache, etc. +/umbraco/Data/TEMP/ + +# SQLite database files +/umbraco/Data/*.sqlite.db-shm +/umbraco/Data/*.sqlite.db-wal + +# Log files +/umbraco/Logs/ + +# Media files +/wwwroot/media/ + +/App_Plugins +appsettings-schema*.json diff --git a/Our.Umbraco.GMaps.UmbracoV12/Controllers/MapTestController.cs b/Our.Umbraco.GMaps.UmbracoV12/Controllers/MapTestController.cs new file mode 100644 index 0000000..5e64719 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV12/Controllers/MapTestController.cs @@ -0,0 +1,59 @@ +using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json; +using Our.Umbraco.GMaps.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Web.Common.Controllers; + +namespace Our.Umbraco.GMaps.UmbracoV12.Controllers +{ + public class MapTestController : UmbracoApiController + { + private readonly IContentService contentService; + + public MapTestController(IContentService contentService) + { + this.contentService = contentService; + } + + public IActionResult CreateMapEntry() + { + double lat = -35.23989947459226; + double lng = 149.149934680426; + Map gmap = new() + { + Address = new Address + { + Coordinates = new Location + { + Latitude = lat, + Longitude = lng + } + }, + MapConfig = new MapConfig + { + Zoom = 15, + CenterCoordinates = new Location + { + Latitude = lat, + Longitude = lng + } + } + }; + + string json = JsonConvert.SerializeObject(gmap); + + //Hack to get zoom to an int. Probably bug that's a string in model. + //If a string the map won't show up and there is an error saying that zoom is not an int. + json = json.Replace("\"zoom\":\"15\"", "\"zoom\":15"); + + var testContent = contentService.GetRootContent(); + foreach (var n in testContent) + { + n.SetValue("singleMap", json); + contentService.SaveAndPublish(n); + } + + return Ok(); + } + } +} diff --git a/Our.Umbraco.GMaps.UmbracoV12/Our.Umbraco.GMaps.UmbracoV12.csproj b/Our.Umbraco.GMaps.UmbracoV12/Our.Umbraco.GMaps.UmbracoV12.csproj new file mode 100644 index 0000000..c06418b --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV12/Our.Umbraco.GMaps.UmbracoV12.csproj @@ -0,0 +1,30 @@ + + + net8.0 + enable + enable + + + + + + + + + + + + + true + + + + + + + + + false + false + + diff --git a/Our.Umbraco.GMaps.UmbracoV12/Program.cs b/Our.Umbraco.GMaps.UmbracoV12/Program.cs new file mode 100644 index 0000000..60352a8 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV12/Program.cs @@ -0,0 +1,19 @@ +namespace Our.Umbraco.GMaps.UmbracoV12 +{ + public class Program + { + public static void Main(string[] args) + => CreateHostBuilder(args) + .Build() + .Run(); + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureUmbracoDefaults() + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStaticWebAssets(); + webBuilder.UseStartup(); + }); + } +} diff --git a/Our.Umbraco.GMaps.UmbracoV9/Properties/launchSettings.json b/Our.Umbraco.GMaps.UmbracoV12/Properties/launchSettings.json similarity index 80% rename from Our.Umbraco.GMaps.UmbracoV9/Properties/launchSettings.json rename to Our.Umbraco.GMaps.UmbracoV12/Properties/launchSettings.json index 6e2e8df..c16c1ac 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Properties/launchSettings.json +++ b/Our.Umbraco.GMaps.UmbracoV12/Properties/launchSettings.json @@ -4,8 +4,8 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:60427", - "sslPort": 44391 + "applicationUrl": "http://localhost:17892", + "sslPort": 44325 } }, "profiles": { @@ -20,7 +20,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "applicationUrl": "https://localhost:44391;http://localhost:60427", + "applicationUrl": "https://localhost:44325;http://localhost:17892", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/Our.Umbraco.GMaps.UmbracoV9/Startup.cs b/Our.Umbraco.GMaps.UmbracoV12/Startup.cs similarity index 70% rename from Our.Umbraco.GMaps.UmbracoV9/Startup.cs rename to Our.Umbraco.GMaps.UmbracoV12/Startup.cs index 294a4fb..8a04c7a 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Startup.cs +++ b/Our.Umbraco.GMaps.UmbracoV12/Startup.cs @@ -1,13 +1,4 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using System; -using Umbraco.Cms.Core.DependencyInjection; -using Umbraco.Extensions; - -namespace Our.Umbraco.GMaps.UmbracoV9 +namespace Our.Umbraco.GMaps.UmbracoV12 { public class Startup { @@ -15,12 +6,12 @@ public class Startup private readonly IConfiguration _config; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The Web Host Environment - /// The Configuration + /// The web hosting environment. + /// The configuration. /// - /// Only a few services are possible to be injected here https://github.com/dotnet/aspnetcore/issues/9337 + /// Only a few services are possible to be injected here https://github.com/dotnet/aspnetcore/issues/9337. /// public Startup(IWebHostEnvironment webHostEnvironment, IConfiguration config) { @@ -28,30 +19,28 @@ public Startup(IWebHostEnvironment webHostEnvironment, IConfiguration config) _config = config ?? throw new ArgumentNullException(nameof(config)); } - - /// - /// Configures the services + /// Configures the services. /// + /// The services. /// /// This method gets called by the runtime. Use this method to add services to the container. - /// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + /// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940. /// public void ConfigureServices(IServiceCollection services) { -#pragma warning disable IDE0022 // Use expression body for methods services.AddUmbraco(_env, _config) .AddBackOffice() // this call registers the Our.Umbraco.GMaps.Core/Controllers/GoogleMapsController.cs .AddWebsite() .AddComposers() .Build(); -#pragma warning restore IDE0022 // Use expression body for methods - } /// - /// Configures the application + /// Configures the application. /// + /// The application builder. + /// The web hosting environment. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) @@ -59,6 +48,8 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseDeveloperExceptionPage(); } + app.UseHttpsRedirection(); + app.UseUmbraco() .WithMiddleware(u => { diff --git a/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/area.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/area.cshtml new file mode 100644 index 0000000..3614847 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/area.cshtml @@ -0,0 +1,10 @@ +@using Umbraco.Extensions +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +
+ @await Html.GetBlockGridItemsHtmlAsync(Model) +
diff --git a/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/areas.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/areas.cshtml new file mode 100644 index 0000000..30f987c --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/areas.cshtml @@ -0,0 +1,13 @@ +@using Umbraco.Extensions +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage +@{ + if (Model?.Areas.Any() != true) { return; } +} + +
+ @foreach (var area in Model.Areas) + { + @await Html.GetBlockGridItemAreaHtmlAsync(area) + } +
diff --git a/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/default.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/default.cshtml new file mode 100644 index 0000000..e25839e --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/default.cshtml @@ -0,0 +1,11 @@ +@using Umbraco.Extensions +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage +@{ + if (Model?.Any() != true) { return; } +} + +
+ @await Html.GetBlockGridItemsHtmlAsync(Model) +
diff --git a/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/items.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/items.cshtml new file mode 100644 index 0000000..e6bb230 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blockgrid/items.cshtml @@ -0,0 +1,35 @@ +@using Umbraco.Cms.Core.Models.Blocks +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage> +@{ + if (Model?.Any() != true) { return; } +} + +
+ @foreach (var item in Model) + { +
+ @{ + var partialViewName = "blockgrid/Components/" + item.Content.ContentType.Alias; + try + { + @await Html.PartialAsync(partialViewName, item) + } + catch (InvalidOperationException) + { +

+ Could not render component of type: @(item.Content.ContentType.Alias) +
+ This likely happened because the partial view @partialViewName could not be found. +

+ } + } +
+ } +
diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/blocklist/default.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blocklist/default.cshtml similarity index 74% rename from Our.Umbraco.GMaps.UmbracoV9/Views/Partials/blocklist/default.cshtml rename to Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blocklist/default.cshtml index fffd5e5..accca2e 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/blocklist/default.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/blocklist/default.cshtml @@ -1,6 +1,6 @@ @inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage @{ - if (!Model.Any()) { return; } + if (Model?.Any() != true) { return; } }
@foreach (var block in Model) @@ -8,6 +8,6 @@ if (block?.ContentUdi == null) { continue; } var data = block.Content; - @await Html.PartialAsync("BlockList/Components/" + data.ContentType.Alias, block) + @await Html.PartialAsync("blocklist/Components/" + data.ContentType.Alias, block) }
diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/bootstrap3-fluid.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/bootstrap3-fluid.cshtml similarity index 94% rename from Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/bootstrap3-fluid.cshtml rename to Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/bootstrap3-fluid.cshtml index 8400492..b92734e 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/bootstrap3-fluid.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/bootstrap3-fluid.cshtml @@ -7,7 +7,7 @@ Razor helpers located at the bottom of this file *@ -@if (Model != null && Model.GetType() == typeof(JObject) && Model.sections != null) +@if (Model is JObject && Model?.sections is not null) { var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; @@ -55,7 +55,7 @@
@foreach (var control in area.controls) { - if (control != null && control.editor != null && control.editor.view != null) + if (control?.editor?.view != null) { @await Html.PartialAsync("grid/editors/base", (object)control) } diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/bootstrap3.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/bootstrap3.cshtml similarity index 92% rename from Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/bootstrap3.cshtml rename to Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/bootstrap3.cshtml index ebe1cf7..8863788 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/bootstrap3.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/bootstrap3.cshtml @@ -3,9 +3,9 @@ @using Newtonsoft.Json.Linq @inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage -@if (Model != null && Model.GetType() == typeof(JObject) && Model.sections != null) +@if (Model is JObject && Model?.sections is not null) { - var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; + var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
@if (oneColumn) @@ -56,7 +56,7 @@
@foreach (var control in area.controls) { - if (control != null && control.editor != null && control.editor.view != null) + if (control?.editor?.view != null) { @await Html.PartialAsync("grid/editors/base", (object)control) } diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/base.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/base.cshtml similarity index 78% rename from Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/base.cshtml rename to Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/base.cshtml index eca6381..e40543b 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/base.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/base.cshtml @@ -3,7 +3,7 @@ @try { string editor = EditorView(Model); - @await Html.PartialAsync(editor, (object)Model) + @await Html.PartialAsync(editor, Model as object) } catch (Exception ex) { @@ -15,7 +15,7 @@ catch (Exception ex) public static string EditorView(dynamic contentItem) { string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString(); - view = view.ToLower().Replace(".html", ".cshtml"); + view = view.Replace(".html", ".cshtml"); if (!view.Contains("/")) { diff --git a/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/embed.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/embed.cshtml new file mode 100644 index 0000000..74c8fe2 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/embed.cshtml @@ -0,0 +1,11 @@ +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +@if (Model is not null) +{ + string embedValue = Convert.ToString(Model.value); + embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value; + +
+ @Html.Raw(embedValue) +
+} diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/macro.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/macro.cshtml similarity index 92% rename from Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/macro.cshtml rename to Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/macro.cshtml index 0e9661e..a4450d1 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/macro.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/macro.cshtml @@ -1,6 +1,6 @@ @inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage -@if (Model.value != null) +@if (Model?.value is not null) { string macroAlias = Model.value.macroAlias.ToString(); var parameters = new Dictionary(); diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/media.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/media.cshtml similarity index 98% rename from Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/media.cshtml rename to Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/media.cshtml index 4cc31d0..bc3b111 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/media.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/media.cshtml @@ -2,7 +2,8 @@ @using Umbraco.Cms.Core.Media @using Umbraco.Cms.Core.PropertyEditors.ValueConverters @inject IImageUrlGenerator ImageUrlGenerator -@if (Model.value != null) + +@if (Model?.value is not null) { var url = Model.value.image; diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/rte.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/rte.cshtml similarity index 79% rename from Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/rte.cshtml rename to Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/rte.cshtml index e14c6e1..9445666 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/rte.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/rte.cshtml @@ -5,7 +5,7 @@ @inject HtmlImageSourceParser HtmlImageSourceParser; @{ - var value = HtmlLocalLinkParser.EnsureInternalLinks(Model.value.ToString()); + var value = HtmlLocalLinkParser.EnsureInternalLinks(Model?.value.ToString()); value = HtmlUrlParser.EnsureUrls(value); value = HtmlImageSourceParser.EnsureImageSources(value); } diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/textstring.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/textstring.cshtml similarity index 75% rename from Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/textstring.cshtml rename to Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/textstring.cshtml index 42972f6..d4152a5 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/textstring.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Partials/grid/editors/textstring.cshtml @@ -1,7 +1,7 @@ -@using System.Web +@using System.Web @model dynamic -@if (Model.editor.config.markup != null) +@if (Model?.editor.config.markup is not null) { string markup = Model.editor.config.markup.ToString(); markup = markup.Replace("#value#", Html.ReplaceLineBreaks((string)Model.value.ToString()).ToString()); @@ -18,6 +18,6 @@ else { -
@Model.value
+
@Model?.value
} diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/Test.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/Test.cshtml similarity index 99% rename from Our.Umbraco.GMaps.UmbracoV9/Views/Test.cshtml rename to Our.Umbraco.GMaps.UmbracoV12/Views/Test.cshtml index d02667c..072ff1a 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/Test.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/Test.cshtml @@ -44,4 +44,4 @@
  • MapType: @Model.SingleMap.MapConfig.MapType
  • - + \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/_ViewImports.cshtml b/Our.Umbraco.GMaps.UmbracoV12/Views/_ViewImports.cshtml similarity index 89% rename from Our.Umbraco.GMaps.UmbracoV9/Views/_ViewImports.cshtml rename to Our.Umbraco.GMaps.UmbracoV12/Views/_ViewImports.cshtml index 8bfb0df..efd2415 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/_ViewImports.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV12/Views/_ViewImports.cshtml @@ -1,5 +1,5 @@ @using Umbraco.Extensions -@using Our.Umbraco.GMaps.UmbracoV9 +@using Our.Umbraco.GMaps.UmbracoV12 @using Umbraco.Cms.Web.Common.PublishedModels @using Umbraco.Cms.Web.Common.Views @using Umbraco.Cms.Core.Models.PublishedContent diff --git a/Our.Umbraco.GMaps.UmbracoV9/appsettings.Development.json b/Our.Umbraco.GMaps.UmbracoV12/appsettings.Development.json similarity index 56% rename from Our.Umbraco.GMaps.UmbracoV9/appsettings.Development.json rename to Our.Umbraco.GMaps.UmbracoV12/appsettings.Development.json index 912bfc3..91cd2da 100644 --- a/Our.Umbraco.GMaps.UmbracoV9/appsettings.Development.json +++ b/Our.Umbraco.GMaps.UmbracoV12/appsettings.Development.json @@ -1,5 +1,5 @@ { - "$schema": "./umbraco/config/appsettings-schema.json", + "$schema": "./appsettings-schema.json", "Serilog": { "MinimumLevel": { "Default": "Information" @@ -22,25 +22,13 @@ "Content": { "MacroErrors": "Throw" }, - "Global": { - "Smtp": { - "From": "your@email.here", - "Host": "localhost", - "Port": 25 - } - }, "Hosting": { "Debug": true }, "RuntimeMinification": { - "useInMemoryCache": true, - "cacheBuster": "Timestamp" + "UseInMemoryCache": true, + "CacheBuster": "Timestamp" } } - }, - "GoogleMaps": { - "ApiKey": "", - "DefaultLocation": "", - "ZoomLevel": 17 } -} \ No newline at end of file +} diff --git a/Our.Umbraco.GMaps.UmbracoV12/appsettings.json b/Our.Umbraco.GMaps.UmbracoV12/appsettings.json new file mode 100644 index 0000000..0bb34d6 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV12/appsettings.json @@ -0,0 +1,39 @@ +{ + "$schema": "./appsettings-schema.json", + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information", + "System": "Warning" + } + } + }, + "Umbraco": { + "CMS": { + "Global": { + "Id": "f4d079e7-5345-4d27-babb-843b3157d7f1", + "UseHttps": true, + "SanitizeTinyMce": true + }, + "Unattended": { + "UpgradeUnattended": true + }, + "Content": { + "ContentVersionCleanupPolicy": { + "EnableCleanup": true + } + } + } + }, + "ConnectionStrings": { + "umbracoDbDSN": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True", + "umbracoDbDSN_ProviderName": "Microsoft.Data.SQLite" + }, + "GoogleMaps": { + "ApiKey": "", + "DefaultLocation": "", + "ZoomLevel": 17 + } +} \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV12/umbraco/Data/Umbraco.sqlite.db b/Our.Umbraco.GMaps.UmbracoV12/umbraco/Data/Umbraco.sqlite.db new file mode 100644 index 0000000..4fb8fb6 Binary files /dev/null and b/Our.Umbraco.GMaps.UmbracoV12/umbraco/Data/Umbraco.sqlite.db differ diff --git a/Our.Umbraco.GMaps.UmbracoV12/wwwroot/favicon.ico b/Our.Umbraco.GMaps.UmbracoV12/wwwroot/favicon.ico new file mode 100644 index 0000000..c0749dd Binary files /dev/null and b/Our.Umbraco.GMaps.UmbracoV12/wwwroot/favicon.ico differ diff --git a/Our.Umbraco.GMaps.UmbracoV13/.gitignore b/Our.Umbraco.GMaps.UmbracoV13/.gitignore new file mode 100644 index 0000000..408c316 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/.gitignore @@ -0,0 +1,480 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# JetBrains Rider +.idea/ +*.sln.iml + +## +## Visual Studio Code +## +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +## +## Umbraco CMS +## + +# JSON schema file for appsettings.json +appsettings-schema.json + +# Packages created from the backoffice (package.xml/package.zip) +/umbraco/Data/CreatedPackages/ + +# Temp folder containing Examine indexes, NuCache, MediaCache, etc. +/umbraco/Data/TEMP/ + +# SQLite database files +/umbraco/Data/*.sqlite.db-shm +/umbraco/Data/*.sqlite.db-wal + +# Log files +/umbraco/Logs/ + +# Media files +/wwwroot/media/ + +/App_Plugins +appsettings-schema*.json diff --git a/Our.Umbraco.GMaps.UmbracoV13/Controllers/MapTestController.cs b/Our.Umbraco.GMaps.UmbracoV13/Controllers/MapTestController.cs new file mode 100644 index 0000000..402a9ae --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Controllers/MapTestController.cs @@ -0,0 +1,59 @@ +using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json; +using Our.Umbraco.GMaps.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Web.Common.Controllers; + +namespace Our.Umbraco.GMaps.UmbracoV13.Controllers +{ + public class MapTestController : UmbracoApiController + { + private readonly IContentService contentService; + + public MapTestController(IContentService contentService) + { + this.contentService = contentService; + } + + public IActionResult CreateMapEntry() + { + double lat = -35.23989947459226; + double lng = 149.149934680426; + Map gmap = new() + { + Address = new Address + { + Coordinates = new Location + { + Latitude = lat, + Longitude = lng + } + }, + MapConfig = new MapConfig + { + Zoom = 15, + CenterCoordinates = new Location + { + Latitude = lat, + Longitude = lng + } + } + }; + + string json = JsonConvert.SerializeObject(gmap); + + //Hack to get zoom to an int. Probably bug that's a string in model. + //If a string the map won't show up and there is an error saying that zoom is not an int. + json = json.Replace("\"zoom\":\"15\"", "\"zoom\":15"); + + var testContent = contentService.GetRootContent(); + foreach (var n in testContent) + { + n.SetValue("singleMap", json); + contentService.SaveAndPublish(n); + } + + return Ok(); + } + } +} diff --git a/Our.Umbraco.GMaps.UmbracoV13/Our.Umbraco.GMaps.UmbracoV13.csproj b/Our.Umbraco.GMaps.UmbracoV13/Our.Umbraco.GMaps.UmbracoV13.csproj new file mode 100644 index 0000000..68e672d --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Our.Umbraco.GMaps.UmbracoV13.csproj @@ -0,0 +1,30 @@ + + + net8.0 + enable + enable + + + + + + + + + + + + + true + + + + + + + + + false + false + + diff --git a/Our.Umbraco.GMaps.UmbracoV13/Program.cs b/Our.Umbraco.GMaps.UmbracoV13/Program.cs new file mode 100644 index 0000000..aeb839b --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Program.cs @@ -0,0 +1,19 @@ +namespace Our.Umbraco.GMaps.UmbracoV13 +{ + public class Program + { + public static void Main(string[] args) + => CreateHostBuilder(args) + .Build() + .Run(); + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureUmbracoDefaults() + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStaticWebAssets(); + webBuilder.UseStartup(); + }); + } +} diff --git a/Our.Umbraco.GMaps.UmbracoV13/Properties/launchSettings.json b/Our.Umbraco.GMaps.UmbracoV13/Properties/launchSettings.json new file mode 100644 index 0000000..c16c1ac --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Properties/launchSettings.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:17892", + "sslPort": 44325 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Umbraco.Web.UI": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:44325;http://localhost:17892", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Our.Umbraco.GMaps.UmbracoV13/Startup.cs b/Our.Umbraco.GMaps.UmbracoV13/Startup.cs new file mode 100644 index 0000000..1dfb73b --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Startup.cs @@ -0,0 +1,67 @@ +namespace Our.Umbraco.GMaps.UmbracoV13 +{ + public class Startup + { + private readonly IWebHostEnvironment _env; + private readonly IConfiguration _config; + + /// + /// Initializes a new instance of the class. + /// + /// The web hosting environment. + /// The configuration. + /// + /// Only a few services are possible to be injected here https://github.com/dotnet/aspnetcore/issues/9337. + /// + public Startup(IWebHostEnvironment webHostEnvironment, IConfiguration config) + { + _env = webHostEnvironment ?? throw new ArgumentNullException(nameof(webHostEnvironment)); + _config = config ?? throw new ArgumentNullException(nameof(config)); + } + + /// + /// Configures the services. + /// + /// The services. + /// + /// This method gets called by the runtime. Use this method to add services to the container. + /// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940. + /// + public void ConfigureServices(IServiceCollection services) + { + services.AddUmbraco(_env, _config) + .AddBackOffice() // this call registers the Our.Umbraco.GMaps.Core/Controllers/GoogleMapsController.cs + .AddWebsite() + .AddComposers() + .Build(); + } + + /// + /// Configures the application. + /// + /// The application builder. + /// The web hosting environment. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseHttpsRedirection(); + + app.UseUmbraco() + .WithMiddleware(u => + { + u.UseBackOffice(); + u.UseWebsite(); + }) + .WithEndpoints(u => + { + u.UseInstallerEndpoints(); + u.UseBackOfficeEndpoints(); + u.UseWebsiteEndpoints(); + }); + } + } +} diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/area.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/area.cshtml new file mode 100644 index 0000000..3614847 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/area.cshtml @@ -0,0 +1,10 @@ +@using Umbraco.Extensions +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +
    + @await Html.GetBlockGridItemsHtmlAsync(Model) +
    diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/areas.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/areas.cshtml new file mode 100644 index 0000000..30f987c --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/areas.cshtml @@ -0,0 +1,13 @@ +@using Umbraco.Extensions +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage +@{ + if (Model?.Areas.Any() != true) { return; } +} + +
    + @foreach (var area in Model.Areas) + { + @await Html.GetBlockGridItemAreaHtmlAsync(area) + } +
    diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/default.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/default.cshtml new file mode 100644 index 0000000..e25839e --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/default.cshtml @@ -0,0 +1,11 @@ +@using Umbraco.Extensions +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage +@{ + if (Model?.Any() != true) { return; } +} + +
    + @await Html.GetBlockGridItemsHtmlAsync(Model) +
    diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/items.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/items.cshtml new file mode 100644 index 0000000..e6bb230 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blockgrid/items.cshtml @@ -0,0 +1,35 @@ +@using Umbraco.Cms.Core.Models.Blocks +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage> +@{ + if (Model?.Any() != true) { return; } +} + +
    + @foreach (var item in Model) + { +
    + @{ + var partialViewName = "blockgrid/Components/" + item.Content.ContentType.Alias; + try + { + @await Html.PartialAsync(partialViewName, item) + } + catch (InvalidOperationException) + { +

    + Could not render component of type: @(item.Content.ContentType.Alias) +
    + This likely happened because the partial view @partialViewName could not be found. +

    + } + } +
    + } +
    diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blocklist/default.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blocklist/default.cshtml new file mode 100644 index 0000000..accca2e --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/blocklist/default.cshtml @@ -0,0 +1,13 @@ +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage +@{ + if (Model?.Any() != true) { return; } +} +
    + @foreach (var block in Model) + { + if (block?.ContentUdi == null) { continue; } + var data = block.Content; + + @await Html.PartialAsync("blocklist/Components/" + data.ContentType.Alias, block) + } +
    diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/bootstrap3-fluid.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/bootstrap3-fluid.cshtml new file mode 100644 index 0000000..b92734e --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/bootstrap3-fluid.cshtml @@ -0,0 +1,106 @@ +@using System.Web +@using Microsoft.AspNetCore.Html +@using Newtonsoft.Json.Linq +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +@* + Razor helpers located at the bottom of this file +*@ + +@if (Model is JObject && Model?.sections is not null) +{ + var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; + +
    + @if (oneColumn) + { + foreach (var section in Model.sections) + { +
    + @foreach (var row in section.rows) + { + renderRow(row); + } +
    + } + } + else + { +
    + @foreach (var sec in Model.sections) + { +
    +
    + @foreach (var row in sec.rows) + { + renderRow(row); + } +
    +
    + } +
    + } +
    +} + +@functions{ + + private async Task renderRow(dynamic row) + { +
    +
    + @foreach (var area in row.areas) + { +
    +
    + @foreach (var control in area.controls) + { + if (control?.editor?.view != null) + { + @await Html.PartialAsync("grid/editors/base", (object)control) + } + } +
    +
    + } +
    +
    + } +} + +@functions{ + + public static HtmlString RenderElementAttributes(dynamic contentItem) + { + var attrs = new List(); + JObject cfg = contentItem.config; + + if (cfg != null) + { + foreach (JProperty property in cfg.Properties()) + { + var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString()); + attrs.Add(property.Name + "=\"" + propertyValue + "\""); + } + } + + JObject style = contentItem.styles; + + if (style != null) { + var cssVals = new List(); + foreach (JProperty property in style.Properties()) + { + var propertyValue = property.Value.ToString(); + if (string.IsNullOrWhiteSpace(propertyValue) == false) + { + cssVals.Add(property.Name + ":" + propertyValue + ";"); + } + } + + if (cssVals.Any()) + attrs.Add("style='" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "'"); + } + + return new HtmlString(string.Join(" ", attrs)); + } +} diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/bootstrap3.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/bootstrap3.cshtml new file mode 100644 index 0000000..8863788 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/bootstrap3.cshtml @@ -0,0 +1,112 @@ +@using System.Web +@using Microsoft.AspNetCore.Html +@using Newtonsoft.Json.Linq +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +@if (Model is JObject && Model?.sections is not null) +{ + var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; + +
    + @if (oneColumn) + { + foreach (var section in Model.sections) + { +
    + @foreach (var row in section.rows) + { + renderRow(row, true); + } +
    + } + } + else + { +
    +
    + @foreach (var sec in Model.sections) + { +
    +
    + @foreach (var row in sec.rows) + { + renderRow(row, false); + } +
    +
    + } +
    +
    + } +
    +} + +@functions{ + + private async Task renderRow(dynamic row, bool singleColumn) + { +
    + @if (singleColumn) { + @:
    + } +
    + @foreach (var area in row.areas) + { +
    +
    + @foreach (var control in area.controls) + { + if (control?.editor?.view != null) + { + @await Html.PartialAsync("grid/editors/base", (object)control) + } + } +
    +
    + } +
    + @if (singleColumn) { + @:
    + } +
    + } + +} + +@functions{ + + public static HtmlString RenderElementAttributes(dynamic contentItem) + { + var attrs = new List(); + JObject cfg = contentItem.config; + + if (cfg != null) + { + foreach (JProperty property in cfg.Properties()) + { + var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString()); + attrs.Add(property.Name + "=\"" + propertyValue + "\""); + } + } + + JObject style = contentItem.styles; + + if (style != null) + { + var cssVals = new List(); + foreach (JProperty property in style.Properties()) + { + var propertyValue = property.Value.ToString(); + if (string.IsNullOrWhiteSpace(propertyValue) == false) + { + cssVals.Add(property.Name + ":" + propertyValue + ";"); + } + } + + if (cssVals.Any()) + attrs.Add("style=\"" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "\""); + } + + return new HtmlString(string.Join(" ", attrs)); + } +} diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/base.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/base.cshtml new file mode 100644 index 0000000..e40543b --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/base.cshtml @@ -0,0 +1,27 @@ +@model dynamic + +@try +{ + string editor = EditorView(Model); + @await Html.PartialAsync(editor, Model as object) +} +catch (Exception ex) +{ +
    @ex.ToString()
    +} + +@functions{ + + public static string EditorView(dynamic contentItem) + { + string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString(); + view = view.Replace(".html", ".cshtml"); + + if (!view.Contains("/")) + { + view = "grid/editors/" + view; + } + + return view; + } +} diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/embed.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/embed.cshtml new file mode 100644 index 0000000..74c8fe2 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/embed.cshtml @@ -0,0 +1,11 @@ +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +@if (Model is not null) +{ + string embedValue = Convert.ToString(Model.value); + embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value; + +
    + @Html.Raw(embedValue) +
    +} diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/macro.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/macro.cshtml new file mode 100644 index 0000000..a4450d1 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/macro.cshtml @@ -0,0 +1,15 @@ +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage + +@if (Model?.value is not null) +{ + string macroAlias = Model.value.macroAlias.ToString(); + var parameters = new Dictionary(); + foreach (var mpd in Model.value.macroParamsDictionary) + { + parameters.Add(mpd.Name, mpd.Value); + } + + + @await Umbraco.RenderMacroAsync(macroAlias, parameters) + +} diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Media.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/media.cshtml similarity index 80% rename from Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Media.cshtml rename to Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/media.cshtml index dc879fb..bc3b111 100644 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Media.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/media.cshtml @@ -1,14 +1,19 @@ -@model dynamic -@using Umbraco.Core.PropertyEditors.ValueConverters +@model dynamic +@using Umbraco.Cms.Core.Media +@using Umbraco.Cms.Core.PropertyEditors.ValueConverters +@inject IImageUrlGenerator ImageUrlGenerator -@if (Model.value != null) +@if (Model?.value is not null) { var url = Model.value.image; - if(Model.editor.config != null && Model.editor.config.size != null){ + + if (Model.editor.config != null && Model.editor.config.size != null) + { if (Model.value.coordinates != null) { - url = ImageCropperTemplateExtensions.GetCropUrl( + url = ImageCropperTemplateCoreExtensions.GetCropUrl( (string)url, + ImageUrlGenerator, width: (int)Model.editor.config.size.width, height: (int)Model.editor.config.size.height, cropAlias: "default", @@ -32,8 +37,9 @@ } else { - url = ImageCropperTemplateExtensions.GetCropUrl( + url = ImageCropperTemplateCoreExtensions.GetCropUrl( (string)url, + ImageUrlGenerator, width: (int)Model.editor.config.size.width, height: (int)Model.editor.config.size.height, cropDataSet: new ImageCropperValue @@ -50,7 +56,7 @@ var altText = Model.value.altText ?? Model.value.caption ?? string.Empty; @altText - + if (Model.value.caption != null) {

    @Model.value.caption

    diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/rte.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/rte.cshtml new file mode 100644 index 0000000..9445666 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/rte.cshtml @@ -0,0 +1,13 @@ +@using Umbraco.Cms.Core.Templates +@model dynamic +@inject HtmlLocalLinkParser HtmlLocalLinkParser; +@inject HtmlUrlParser HtmlUrlParser; +@inject HtmlImageSourceParser HtmlImageSourceParser; + +@{ + var value = HtmlLocalLinkParser.EnsureInternalLinks(Model?.value.ToString()); + value = HtmlUrlParser.EnsureUrls(value); + value = HtmlImageSourceParser.EnsureImageSources(value); +} + +@Html.Raw(value) diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Textstring.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/textstring.cshtml similarity index 68% rename from Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Textstring.cshtml rename to Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/textstring.cshtml index 0f40a1e..d4152a5 100644 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Textstring.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Partials/grid/editors/textstring.cshtml @@ -1,8 +1,7 @@ -@model dynamic -@using Umbraco.Web.Composing -@using Umbraco.Web.Templates +@using System.Web +@model dynamic -@if (Model.editor.config.markup != null) +@if (Model?.editor.config.markup is not null) { string markup = Model.editor.config.markup.ToString(); markup = markup.Replace("#value#", Html.ReplaceLineBreaks((string)Model.value.ToString()).ToString()); @@ -19,6 +18,6 @@ else { -
    @Model.value
    +
    @Model?.value
    } diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Test.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/Test.cshtml similarity index 78% rename from Our.Umbraco.GMaps.UmbracoV8/Views/Test.cshtml rename to Our.Umbraco.GMaps.UmbracoV13/Views/Test.cshtml index 781a340..072ff1a 100644 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Test.cshtml +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/Test.cshtml @@ -1,7 +1,6 @@ -@inherits Umbraco.Web.Mvc.UmbracoViewPage -@using ContentModels = Umbraco.Web.PublishedModels; +@inherits UmbracoViewPage @{ - Layout = null; + Layout = null; } @@ -34,21 +33,15 @@
  • Zoom: @Model.SingleMap.MapConfig.Zoom
  • CenterCoordinates: - @if (Model.SingleMap.MapConfig.CenterCoordinates != null) - {
    • Latitude: @Model.SingleMap.MapConfig.CenterCoordinates.Latitude
    • Longitude: @Model.SingleMap.MapConfig.CenterCoordinates.Longitude
    - } else { - Center Coordinates IS NULL - } -
  • -
  • Style: +
  • Style:
     @Model.SingleMap.MapConfig.Style
     
  • MapType: @Model.SingleMap.MapConfig.MapType
  • - + \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV13/Views/_ViewImports.cshtml b/Our.Umbraco.GMaps.UmbracoV13/Views/_ViewImports.cshtml new file mode 100644 index 0000000..6074549 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/Views/_ViewImports.cshtml @@ -0,0 +1,9 @@ +@using Umbraco.Extensions +@using Our.Umbraco.GMaps.UmbracoV13 +@using Umbraco.Cms.Web.Common.PublishedModels +@using Umbraco.Cms.Web.Common.Views +@using Umbraco.Cms.Core.Models.PublishedContent +@using Microsoft.AspNetCore.Html +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Smidge +@inject Smidge.SmidgeHelper SmidgeHelper diff --git a/Our.Umbraco.GMaps.UmbracoV13/appsettings.Development.json b/Our.Umbraco.GMaps.UmbracoV13/appsettings.Development.json new file mode 100644 index 0000000..91cd2da --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/appsettings.Development.json @@ -0,0 +1,34 @@ +{ + "$schema": "./appsettings-schema.json", + "Serilog": { + "MinimumLevel": { + "Default": "Information" + }, + "WriteTo": [ + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "Console" + } + ] + } + } + ] + }, + "Umbraco": { + "CMS": { + "Content": { + "MacroErrors": "Throw" + }, + "Hosting": { + "Debug": true + }, + "RuntimeMinification": { + "UseInMemoryCache": true, + "CacheBuster": "Timestamp" + } + } + } +} diff --git a/Our.Umbraco.GMaps.UmbracoV13/appsettings.json b/Our.Umbraco.GMaps.UmbracoV13/appsettings.json new file mode 100644 index 0000000..0bb34d6 --- /dev/null +++ b/Our.Umbraco.GMaps.UmbracoV13/appsettings.json @@ -0,0 +1,39 @@ +{ + "$schema": "./appsettings-schema.json", + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information", + "System": "Warning" + } + } + }, + "Umbraco": { + "CMS": { + "Global": { + "Id": "f4d079e7-5345-4d27-babb-843b3157d7f1", + "UseHttps": true, + "SanitizeTinyMce": true + }, + "Unattended": { + "UpgradeUnattended": true + }, + "Content": { + "ContentVersionCleanupPolicy": { + "EnableCleanup": true + } + } + } + }, + "ConnectionStrings": { + "umbracoDbDSN": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True", + "umbracoDbDSN_ProviderName": "Microsoft.Data.SQLite" + }, + "GoogleMaps": { + "ApiKey": "", + "DefaultLocation": "", + "ZoomLevel": 17 + } +} \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV13/umbraco/Data/Umbraco.sqlite.db b/Our.Umbraco.GMaps.UmbracoV13/umbraco/Data/Umbraco.sqlite.db new file mode 100644 index 0000000..4fb8fb6 Binary files /dev/null and b/Our.Umbraco.GMaps.UmbracoV13/umbraco/Data/Umbraco.sqlite.db differ diff --git a/Our.Umbraco.GMaps.UmbracoV13/wwwroot/favicon.ico b/Our.Umbraco.GMaps.UmbracoV13/wwwroot/favicon.ico new file mode 100644 index 0000000..c0749dd Binary files /dev/null and b/Our.Umbraco.GMaps.UmbracoV13/wwwroot/favicon.ico differ diff --git a/Our.Umbraco.GMaps.UmbracoV8/App_Data/Umbraco.sdf b/Our.Umbraco.GMaps.UmbracoV8/App_Data/Umbraco.sdf deleted file mode 100644 index ba88ad6..0000000 Binary files a/Our.Umbraco.GMaps.UmbracoV8/App_Data/Umbraco.sdf and /dev/null differ diff --git a/Our.Umbraco.GMaps.UmbracoV8/Global.asax b/Our.Umbraco.GMaps.UmbracoV8/Global.asax deleted file mode 100644 index 0831274..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Global.asax +++ /dev/null @@ -1 +0,0 @@ -<%@ Application Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %> diff --git a/Our.Umbraco.GMaps.UmbracoV8/Our.Umbraco.GMaps.UmbracoV8.csproj b/Our.Umbraco.GMaps.UmbracoV8/Our.Umbraco.GMaps.UmbracoV8.csproj deleted file mode 100644 index 4f9a191..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Our.Umbraco.GMaps.UmbracoV8.csproj +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - Debug - AnyCPU - - - 2.0 - {018B5756-1DE0-4460-84A0-142F4AFB38E2} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - Our.Umbraco.GMaps.UmbracoV8 - Our.Umbraco.GMaps.UmbracoV8 - v4.7.2 - true - - 44319 - - - - - - - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - true - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - ..\packages\ClientDependency.1.9.10\lib\net45\ClientDependency.Core.dll - - - ..\packages\ClientDependency-Mvc5.1.9.3\lib\net45\ClientDependency.Core.Mvc.dll - - - ..\packages\CSharpTest.Net.Collections.14.906.1403.1082\lib\net40\CSharpTest.Net.Collections.dll - - - ..\packages\Examine.1.2.2\lib\net452\Examine.dll - - - ..\packages\HtmlAgilityPack.1.8.14\lib\Net45\HtmlAgilityPack.dll - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - - - ..\packages\ImageProcessor.2.9.1\lib\net452\ImageProcessor.dll - - - ..\packages\ImageProcessor.Web.4.12.1\lib\net452\ImageProcessor.Web.dll - - - ..\packages\K4os.Compression.LZ4.1.1.11\lib\net46\K4os.Compression.LZ4.dll - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Mvc.2.0.0\lib\net46\LightInject.Mvc.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\LightInject.WebApi.2.0.0\lib\net46\LightInject.WebApi.dll - - - ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll - - - ..\packages\Markdown.2.2.1\lib\net451\Markdown.dll - - - ..\packages\MessagePack.2.2.85\lib\netstandard2.0\MessagePack.dll - - - ..\packages\MessagePack.Annotations.2.2.85\lib\netstandard2.0\MessagePack.Annotations.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll - - - ..\packages\Microsoft.AspNet.SignalR.Core.2.4.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll - - - ..\packages\Microsoft.Bcl.AsyncInterfaces.1.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.IO.RecyclableMemoryStream.1.2.2\lib\net45\Microsoft.IO.RecyclableMemoryStream.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - - ..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll - - - ..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - - - ..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - - - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.10.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.2\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.1.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.1.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.1.0\lib\net452\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.5\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.5.0\lib\net461\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.1.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.2\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.3.0\lib\net45\Superpower.dll - - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - ..\packages\System.Collections.Immutable.1.7.1\lib\net461\System.Collections.Immutable.dll - - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - - - - ..\packages\System.Text.Encoding.CodePages.4.7.1\lib\net461\System.Text.Encoding.CodePages.dll - - - - ..\packages\System.Threading.Tasks.Dataflow.4.9.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - - - - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll - - - ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - - - ..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - - - - - - - - - - ..\packages\UmbracoCms.Core.8.18.5\lib\net472\Umbraco.Core.dll - - - ..\packages\UmbracoCms.Web.8.18.5\lib\net472\Umbraco.Examine.dll - - - ..\packages\UmbracoCms.Web.8.18.5\lib\net472\Umbraco.ModelsBuilder.Embedded.dll - - - ..\packages\UmbracoCms.Web.8.18.5\lib\net472\Umbraco.Web.dll - - - ..\packages\UmbracoCms.Web.8.18.5\lib\net472\Umbraco.Web.UI.dll - - - - - ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Web.config - - - Web.config - - - - - {3efbe46f-b8b0-467c-8787-82d646ddc84e} - Our.Umbraco.GMaps.Core - - - {d92ffd8f-3f4d-449f-baab-054c22e7e781} - Our.Umbraco.GMaps - - - - - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - - - - - True - True - 9481 - / - https://localhost:44319/ - False - False - - - False - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - xcopy $(SolutionDir)Our.Umbraco.GMaps\App_Plugins\Our.Umbraco.GMaps\*.* $(ProjectDir)App_Plugins\Our.Umbraco.GMaps\ /S /E /Y - - - - \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV8/Properties/AssemblyInfo.cs b/Our.Umbraco.GMaps.UmbracoV8/Properties/AssemblyInfo.cs deleted file mode 100644 index 154b941..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("WebApplication")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WebApplication")] -[assembly: AssemblyCopyright("Copyright © 2020")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("018b5756-1de0-4460-84a0-142f4afb38e2")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/BlockList/Default.cshtml b/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/BlockList/Default.cshtml deleted file mode 100644 index 05851df..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/BlockList/Default.cshtml +++ /dev/null @@ -1,13 +0,0 @@ -@inherits UmbracoViewPage -@using Umbraco.Core.Models.Blocks -@{ - if (!Model.Any()) { return; } -} -
    - @foreach (var block in Model) - { - if (block?.ContentUdi == null) { continue; } - var data = block.Content; - @Html.Partial("BlockList/Components/" + data.ContentType.Alias, block) - } -
    diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Bootstrap3-Fluid.cshtml b/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Bootstrap3-Fluid.cshtml deleted file mode 100644 index bef1b88..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Bootstrap3-Fluid.cshtml +++ /dev/null @@ -1,88 +0,0 @@ -@inherits UmbracoViewPage -@using Umbraco.Web.Templates -@using Newtonsoft.Json.Linq - -@* - Razor helpers located at the bottom of this file -*@ - -@if (Model != null && Model.GetType() == typeof(JObject) && Model.sections != null) -{ - var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; - -
    - @if (oneColumn) - { - foreach (var section in Model.sections) { -
    - @foreach (var row in section.rows) { - @renderRow(row) - } -
    - } - }else { -
    - @foreach (var s in Model.sections) { -
    -
    - @foreach (var row in s.rows) { - @renderRow(row) - } -
    -
    - } -
    - } -
    -} - -@helper renderRow(dynamic row){ -
    -
    - @foreach ( var area in row.areas ) { -
    -
    - @foreach (var control in area.controls) { - if (control !=null && control.editor != null && control.editor.view != null ) { - @Html.Partial("grid/editors/base", (object)control) - } - } -
    -
    } -
    -
    -} - -@functions { - public static MvcHtmlString RenderElementAttributes(dynamic contentItem) - { - var attrs = new List(); - JObject cfg = contentItem.config; - - if(cfg != null) - foreach (JProperty property in cfg.Properties()) - { - var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString()); - attrs.Add(property.Name + "=\"" + propertyValue + "\""); - } - - JObject style = contentItem.styles; - - if (style != null) { - var cssVals = new List(); - foreach (JProperty property in style.Properties()) - { - var propertyValue = property.Value.ToString(); - if (string.IsNullOrWhiteSpace(propertyValue) == false) - { - cssVals.Add(property.Name + ":" + propertyValue + ";"); - } - } - - if (cssVals.Any()) - attrs.Add("style='" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "'"); - } - - return new MvcHtmlString(string.Join(" ", attrs)); - } -} diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Bootstrap3.cshtml b/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Bootstrap3.cshtml deleted file mode 100644 index 801526a..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Bootstrap3.cshtml +++ /dev/null @@ -1,92 +0,0 @@ -@inherits UmbracoViewPage -@using Umbraco.Web.Templates -@using Newtonsoft.Json.Linq - -@if (Model != null && Model.GetType() == typeof(JObject) && Model.sections != null) -{ - var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; - -
    - @if (oneColumn) - { - foreach (var section in Model.sections) { -
    - @foreach (var row in section.rows) { - @renderRow(row, true) - } -
    - } - }else { -
    -
    - @foreach (var s in Model.sections) { -
    -
    - @foreach (var row in s.rows) { - @renderRow(row, false) - } -
    -
    - } -
    -
    - } -
    -} - -@helper renderRow(dynamic row, bool singleColumn){ -
    - @if (singleColumn) { - @:
    - } -
    - @foreach ( var area in row.areas ) { -
    -
    - @foreach (var control in area.controls) { - if (control !=null && control.editor != null && control.editor.view != null ) { - @Html.Partial("grid/editors/base", (object)control) - } - } -
    -
    } -
    - @if (singleColumn) { - @:
    - } -
    -} - -@functions { - public static MvcHtmlString RenderElementAttributes(dynamic contentItem) - { - var attrs = new List(); - JObject cfg = contentItem.config; - - if(cfg != null) - foreach (JProperty property in cfg.Properties()) - { - var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString()); - attrs.Add(property.Name + "=\"" + propertyValue + "\""); - } - - JObject style = contentItem.styles; - - if (style != null) { - var cssVals = new List(); - foreach (JProperty property in style.Properties()) - { - var propertyValue = property.Value.ToString(); - if (string.IsNullOrWhiteSpace(propertyValue) == false) - { - cssVals.Add(property.Name + ":" + propertyValue + ";"); - } - } - - if (cssVals.Any()) - attrs.Add("style=\"" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "\""); - } - - return new MvcHtmlString(string.Join(" ", attrs)); - } -} diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Base.cshtml b/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Base.cshtml deleted file mode 100644 index a86c048..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Base.cshtml +++ /dev/null @@ -1,24 +0,0 @@ -@model dynamic -@using Umbraco.Web.Templates - -@functions { - public static string EditorView(dynamic contentItem) - { - string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString(); - view = view.ToLower().Replace(".html", ".cshtml"); - - if (!view.Contains("/")) { - view = "grid/editors/" + view; - } - - return view; - } -} -@try -{ - string editor = EditorView(Model); - @Html.Partial(editor, (object)Model) -} -catch (Exception ex) { -
    @ex.ToString()
    -} \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Embed.cshtml b/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Embed.cshtml deleted file mode 100644 index 4a915a4..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Embed.cshtml +++ /dev/null @@ -1,10 +0,0 @@ -@model dynamic -@using Umbraco.Web.Templates -@{ - string embedValue = Convert.ToString(Model.value); - embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value; -} - -
    - @Html.Raw(embedValue) -
    diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Macro.cshtml b/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Macro.cshtml deleted file mode 100644 index e082280..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Macro.cshtml +++ /dev/null @@ -1,17 +0,0 @@ -@inherits UmbracoViewPage -@using Umbraco.Web.Templates - - -@if (Model.value != null) -{ - string macroAlias = Model.value.macroAlias.ToString(); - ViewDataDictionary parameters = new ViewDataDictionary(); - foreach (dynamic mpd in Model.value.macroParamsDictionary) - { - parameters.Add(mpd.Name, mpd.Value); - } - - - @Umbraco.RenderMacro(macroAlias, parameters) - -} diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Rte.cshtml b/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Rte.cshtml deleted file mode 100644 index 8364958..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Partials/Grid/Editors/Rte.cshtml +++ /dev/null @@ -1,13 +0,0 @@ -@model dynamic -@using Umbraco.Web.Composing -@using Umbraco.Web.Templates -@{ - var htmlLocalLinkParser = Current.Factory.GetInstance(); - var htmlUrlParser = Current.Factory.GetInstance(); - var htmlImageSourceParser = Current.Factory.GetInstance(); - - var value = htmlLocalLinkParser.EnsureInternalLinks(Model.value.ToString()); - value = htmlUrlParser.EnsureUrls(value); - value = htmlImageSourceParser.EnsureImageSources(value); -} -@Html.Raw(value) diff --git a/Our.Umbraco.GMaps.UmbracoV8/Views/Web.config b/Our.Umbraco.GMaps.UmbracoV8/Views/Web.config deleted file mode 100644 index 4ac79cb..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Views/Web.config +++ /dev/null @@ -1,71 +0,0 @@ - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV8/Web.Debug.config b/Our.Umbraco.GMaps.UmbracoV8/Web.Debug.config deleted file mode 100644 index fae9cfe..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Web.Debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV8/Web.Release.config b/Our.Umbraco.GMaps.UmbracoV8/Web.Release.config deleted file mode 100644 index da6e960..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Web.Release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV8/Web.config b/Our.Umbraco.GMaps.UmbracoV8/Web.config deleted file mode 100644 index da54807..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/Web.config +++ /dev/null @@ -1,285 +0,0 @@ - - - - -
    - -
    -
    - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV8/packages.config b/Our.Umbraco.GMaps.UmbracoV8/packages.config deleted file mode 100644 index 8744b8c..0000000 --- a/Our.Umbraco.GMaps.UmbracoV8/packages.config +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV9/Our.Umbraco.GMaps.UmbracoV9.csproj b/Our.Umbraco.GMaps.UmbracoV9/Our.Umbraco.GMaps.UmbracoV9.csproj deleted file mode 100644 index c5e22ab..0000000 --- a/Our.Umbraco.GMaps.UmbracoV9/Our.Umbraco.GMaps.UmbracoV9.csproj +++ /dev/null @@ -1,49 +0,0 @@ - - - - net5.0 - $(DefaultItemExcludes);App_Plugins/**; - $(DefaultItemExcludes);umbraco/**; - $(DefaultItemExcludes);wwwroot/media/**; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - false - - - - - - - - - diff --git a/Our.Umbraco.GMaps.UmbracoV9/Program.cs b/Our.Umbraco.GMaps.UmbracoV9/Program.cs deleted file mode 100644 index c8b4185..0000000 --- a/Our.Umbraco.GMaps.UmbracoV9/Program.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; - -namespace Our.Umbraco.GMaps.UmbracoV9 -{ - public class Program - { - public static void Main(string[] args) - => CreateHostBuilder(args) - .Build() - .Run(); - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureLogging(x => x.ClearProviders()) - .ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup()); - } -} diff --git a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/embed.cshtml b/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/embed.cshtml deleted file mode 100644 index a383046..0000000 --- a/Our.Umbraco.GMaps.UmbracoV9/Views/Partials/grid/editors/embed.cshtml +++ /dev/null @@ -1,10 +0,0 @@ -@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage - -@{ - string embedValue = Convert.ToString(Model.value); - embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value; -} - -
    - @Html.Raw(embedValue) -
    diff --git a/Our.Umbraco.GMaps.UmbracoV9/appsettings.json b/Our.Umbraco.GMaps.UmbracoV9/appsettings.json deleted file mode 100644 index ab53a04..0000000 --- a/Our.Umbraco.GMaps.UmbracoV9/appsettings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "./umbraco/config/appsettings-schema.json", - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information", - "System": "Warning" - } - } - }, - "ConnectionStrings": { - "umbracoDbDSN": "Data Source=(localdb)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\Umbraco.mdf;Integrated Security=True" - }, - "Umbraco": { - "CMS": { - "Hosting": { - "Debug": false - }, - "Global": { - "Id": "f925049e-2c83-4daf-b4e4-3cb7bcd913e8" - } - } - }, - "GoogleMaps": { - "ApiKey": "", - "DefaultLocation": "", - "ZoomLevel": 17 - } -} \ No newline at end of file diff --git a/Our.Umbraco.GMaps.UmbracoV9/umbraco/Data/Umbraco.mdf b/Our.Umbraco.GMaps.UmbracoV9/umbraco/Data/Umbraco.mdf deleted file mode 100644 index a7791e3..0000000 Binary files a/Our.Umbraco.GMaps.UmbracoV9/umbraco/Data/Umbraco.mdf and /dev/null differ diff --git a/Our.Umbraco.GMaps.UmbracoV9/umbraco/Data/Umbraco_log.ldf b/Our.Umbraco.GMaps.UmbracoV9/umbraco/Data/Umbraco_log.ldf deleted file mode 100644 index ae03627..0000000 Binary files a/Our.Umbraco.GMaps.UmbracoV9/umbraco/Data/Umbraco_log.ldf and /dev/null differ diff --git a/Our.Umbraco.GMaps.sln b/Our.Umbraco.GMaps.sln index f7bb45f..347ef1b 100644 --- a/Our.Umbraco.GMaps.sln +++ b/Our.Umbraco.GMaps.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31912.275 MinimumVisualStudioVersion = 10.0.40219.1 @@ -21,13 +21,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub", "GitHub", "{8EC9B5 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo Sites", "Demo Sites", "{A50C0C52-6F7C-4AB9-AA28-AFC4FDAE4334}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Our.Umbraco.GMaps.UmbracoV9", "Our.Umbraco.GMaps.UmbracoV9\Our.Umbraco.GMaps.UmbracoV9.csproj", "{D46C7CF4-82FC-49B4-B552-F1C4E3B124CB}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Our.Umbraco.GMaps.UmbracoV10", "Our.Umbraco.GMaps.UmbracoV10\Our.Umbraco.GMaps.UmbracoV10.csproj", "{B3441457-6D2B-46FB-B653-F037ACB7C870}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Our.Umbraco.GMaps.UmbracoV11", "Our.Umbraco.GMaps.UmbracoV11\Our.Umbraco.GMaps.UmbracoV11.csproj", "{35519025-06CE-4022-A515-EC801A58377E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.GMaps.UmbracoV8", "Our.Umbraco.GMaps.UmbracoV8\Our.Umbraco.GMaps.UmbracoV8.csproj", "{018B5756-1DE0-4460-84A0-142F4AFB38E2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.GMaps.UmbracoV12", "Our.Umbraco.GMaps.UmbracoV12\Our.Umbraco.GMaps.UmbracoV12.csproj", "{8DD93A7C-7A9F-4F16-8FF9-E94DDC3D5A29}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.GMaps.UmbracoV13", "Our.Umbraco.GMaps.UmbracoV13\Our.Umbraco.GMaps.UmbracoV13.csproj", "{0265E7D4-AECD-4233-A43D-FFFFC404D23E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -43,9 +43,6 @@ Global {3EFBE46F-B8B0-467C-8787-82D646DDC84E}.Debug|Any CPU.Build.0 = Debug|Any CPU {3EFBE46F-B8B0-467C-8787-82D646DDC84E}.Release|Any CPU.ActiveCfg = Release|Any CPU {3EFBE46F-B8B0-467C-8787-82D646DDC84E}.Release|Any CPU.Build.0 = Release|Any CPU - {D46C7CF4-82FC-49B4-B552-F1C4E3B124CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D46C7CF4-82FC-49B4-B552-F1C4E3B124CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D46C7CF4-82FC-49B4-B552-F1C4E3B124CB}.Release|Any CPU.ActiveCfg = Release|Any CPU {B3441457-6D2B-46FB-B653-F037ACB7C870}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B3441457-6D2B-46FB-B653-F037ACB7C870}.Debug|Any CPU.Build.0 = Debug|Any CPU {B3441457-6D2B-46FB-B653-F037ACB7C870}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -54,20 +51,24 @@ Global {35519025-06CE-4022-A515-EC801A58377E}.Debug|Any CPU.Build.0 = Debug|Any CPU {35519025-06CE-4022-A515-EC801A58377E}.Release|Any CPU.ActiveCfg = Release|Any CPU {35519025-06CE-4022-A515-EC801A58377E}.Release|Any CPU.Build.0 = Release|Any CPU - {018B5756-1DE0-4460-84A0-142F4AFB38E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {018B5756-1DE0-4460-84A0-142F4AFB38E2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {018B5756-1DE0-4460-84A0-142F4AFB38E2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {018B5756-1DE0-4460-84A0-142F4AFB38E2}.Release|Any CPU.Build.0 = Release|Any CPU + {8DD93A7C-7A9F-4F16-8FF9-E94DDC3D5A29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8DD93A7C-7A9F-4F16-8FF9-E94DDC3D5A29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8DD93A7C-7A9F-4F16-8FF9-E94DDC3D5A29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8DD93A7C-7A9F-4F16-8FF9-E94DDC3D5A29}.Release|Any CPU.Build.0 = Release|Any CPU + {0265E7D4-AECD-4233-A43D-FFFFC404D23E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0265E7D4-AECD-4233-A43D-FFFFC404D23E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0265E7D4-AECD-4233-A43D-FFFFC404D23E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0265E7D4-AECD-4233-A43D-FFFFC404D23E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {8EC9B5D0-642D-4B70-9DDC-A0E9FB6F14A6} = {DD5500D1-697C-49C5-8517-8BE141A6D7DB} - {D46C7CF4-82FC-49B4-B552-F1C4E3B124CB} = {A50C0C52-6F7C-4AB9-AA28-AFC4FDAE4334} {B3441457-6D2B-46FB-B653-F037ACB7C870} = {A50C0C52-6F7C-4AB9-AA28-AFC4FDAE4334} {35519025-06CE-4022-A515-EC801A58377E} = {A50C0C52-6F7C-4AB9-AA28-AFC4FDAE4334} - {018B5756-1DE0-4460-84A0-142F4AFB38E2} = {A50C0C52-6F7C-4AB9-AA28-AFC4FDAE4334} + {8DD93A7C-7A9F-4F16-8FF9-E94DDC3D5A29} = {A50C0C52-6F7C-4AB9-AA28-AFC4FDAE4334} + {0265E7D4-AECD-4233-A43D-FFFFC404D23E} = {A50C0C52-6F7C-4AB9-AA28-AFC4FDAE4334} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F66CF0AE-70DE-4CE2-BE50-91516A710B04} diff --git a/Our.Umbraco.GMaps/Our.Umbraco.GMaps.csproj b/Our.Umbraco.GMaps/Our.Umbraco.GMaps.csproj index 033d580..b30a8bb 100644 --- a/Our.Umbraco.GMaps/Our.Umbraco.GMaps.csproj +++ b/Our.Umbraco.GMaps/Our.Umbraco.GMaps.csproj @@ -1,58 +1,27 @@ - + - net5.0;net6.0;net7.0;net472 + net6.0;net7.0 + App_Plugins/Our.Umbraco.GMaps true . false true - 2.1.4-pre1 + 2.2.0-pre1 Arnold Visser Arnold Visser Basic Google Maps with autocomplete property editor for Umbraco 8+ Improvements to Property Editor Copyright © Arnold Visser - $(AssemblyName) - Google Maps for Umbraco 8+ + $(AssemblyName) - Google Maps for Umbraco MIT https://github.com/ArnoldV/Our.Umbraco.GMaps - Umbraco Umbraco8 Umbraco9 Umbraco10 Google Maps google-maps umbraco-marketplace + Umbraco Google Maps google-maps umbraco-marketplace en-US README.nuget.md icon.png - - AnyCPU - - - - AnyCPU - - - - AnyCPU - - - - AnyCPU - - - - AnyCPU - - - - AnyCPU - - - - AnyCPU - - - - AnyCPU - - True @@ -67,26 +36,9 @@ - - true - Always - - - - True - buildTransitive - - - True - build - - - - - diff --git a/Our.Umbraco.GMaps/build/Our.Umbraco.GMaps.targets b/Our.Umbraco.GMaps/build/Our.Umbraco.GMaps.targets deleted file mode 100644 index 7568075..0000000 --- a/Our.Umbraco.GMaps/build/Our.Umbraco.GMaps.targets +++ /dev/null @@ -1,27 +0,0 @@ - - - - $(MSBuildThisFileDirectory)..\App_Plugins\Our.Umbraco.GMaps\**\*.* - - - - - - - - - - - - - - - - - - - - diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/css/maps.css b/Our.Umbraco.GMaps/wwwroot/css/maps.css similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/css/maps.css rename to Our.Umbraco.GMaps/wwwroot/css/maps.css diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/js/maps.controller.js b/Our.Umbraco.GMaps/wwwroot/js/maps.controller.js similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/js/maps.controller.js rename to Our.Umbraco.GMaps/wwwroot/js/maps.controller.js diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/js/maps.factory.js b/Our.Umbraco.GMaps/wwwroot/js/maps.factory.js similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/js/maps.factory.js rename to Our.Umbraco.GMaps/wwwroot/js/maps.factory.js diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/js/snazzymaps.controller.js b/Our.Umbraco.GMaps/wwwroot/js/snazzymaps.controller.js similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/js/snazzymaps.controller.js rename to Our.Umbraco.GMaps/wwwroot/js/snazzymaps.controller.js diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/js/snazzymaps.factory.js b/Our.Umbraco.GMaps/wwwroot/js/snazzymaps.factory.js similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/js/snazzymaps.factory.js rename to Our.Umbraco.GMaps/wwwroot/js/snazzymaps.factory.js diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/cs.xml b/Our.Umbraco.GMaps/wwwroot/lang/cs.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/cs.xml rename to Our.Umbraco.GMaps/wwwroot/lang/cs.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/da.xml b/Our.Umbraco.GMaps/wwwroot/lang/da.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/da.xml rename to Our.Umbraco.GMaps/wwwroot/lang/da.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/de.xml b/Our.Umbraco.GMaps/wwwroot/lang/de.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/de.xml rename to Our.Umbraco.GMaps/wwwroot/lang/de.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/en-gb.xml b/Our.Umbraco.GMaps/wwwroot/lang/en-gb.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/en-gb.xml rename to Our.Umbraco.GMaps/wwwroot/lang/en-gb.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/en-us.xml b/Our.Umbraco.GMaps/wwwroot/lang/en-us.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/en-us.xml rename to Our.Umbraco.GMaps/wwwroot/lang/en-us.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/es.xml b/Our.Umbraco.GMaps/wwwroot/lang/es.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/es.xml rename to Our.Umbraco.GMaps/wwwroot/lang/es.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/fr.xml b/Our.Umbraco.GMaps/wwwroot/lang/fr.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/fr.xml rename to Our.Umbraco.GMaps/wwwroot/lang/fr.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/he.xml b/Our.Umbraco.GMaps/wwwroot/lang/he.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/he.xml rename to Our.Umbraco.GMaps/wwwroot/lang/he.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/it.xml b/Our.Umbraco.GMaps/wwwroot/lang/it.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/it.xml rename to Our.Umbraco.GMaps/wwwroot/lang/it.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/ja.xml b/Our.Umbraco.GMaps/wwwroot/lang/ja.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/ja.xml rename to Our.Umbraco.GMaps/wwwroot/lang/ja.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/ko.xml b/Our.Umbraco.GMaps/wwwroot/lang/ko.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/ko.xml rename to Our.Umbraco.GMaps/wwwroot/lang/ko.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/nb.xml b/Our.Umbraco.GMaps/wwwroot/lang/nb.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/nb.xml rename to Our.Umbraco.GMaps/wwwroot/lang/nb.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/nl.xml b/Our.Umbraco.GMaps/wwwroot/lang/nl.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/nl.xml rename to Our.Umbraco.GMaps/wwwroot/lang/nl.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/pl.xml b/Our.Umbraco.GMaps/wwwroot/lang/pl.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/pl.xml rename to Our.Umbraco.GMaps/wwwroot/lang/pl.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/pt.xml b/Our.Umbraco.GMaps/wwwroot/lang/pt.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/pt.xml rename to Our.Umbraco.GMaps/wwwroot/lang/pt.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/ru.xml b/Our.Umbraco.GMaps/wwwroot/lang/ru.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/ru.xml rename to Our.Umbraco.GMaps/wwwroot/lang/ru.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/sv.xml b/Our.Umbraco.GMaps/wwwroot/lang/sv.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/sv.xml rename to Our.Umbraco.GMaps/wwwroot/lang/sv.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/tr.xml b/Our.Umbraco.GMaps/wwwroot/lang/tr.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/tr.xml rename to Our.Umbraco.GMaps/wwwroot/lang/tr.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/zh-tw.xml b/Our.Umbraco.GMaps/wwwroot/lang/zh-tw.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/zh-tw.xml rename to Our.Umbraco.GMaps/wwwroot/lang/zh-tw.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/zh.xml b/Our.Umbraco.GMaps/wwwroot/lang/zh.xml similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/lang/zh.xml rename to Our.Umbraco.GMaps/wwwroot/lang/zh.xml diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/package.manifest b/Our.Umbraco.GMaps/wwwroot/package.manifest similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/package.manifest rename to Our.Umbraco.GMaps/wwwroot/package.manifest diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/views/maps.editor.html b/Our.Umbraco.GMaps/wwwroot/views/maps.editor.html similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/views/maps.editor.html rename to Our.Umbraco.GMaps/wwwroot/views/maps.editor.html diff --git a/Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/views/snazzymaps.prevalue.html b/Our.Umbraco.GMaps/wwwroot/views/snazzymaps.prevalue.html similarity index 100% rename from Our.Umbraco.GMaps/App_Plugins/Our.Umbraco.GMaps/views/snazzymaps.prevalue.html rename to Our.Umbraco.GMaps/wwwroot/views/snazzymaps.prevalue.html