From 967676629befc0f5aeb2a443b67a8b9c4f497589 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Sat, 26 Sep 2020 11:51:07 +0200 Subject: [PATCH 01/11] Bump version number for 4.3 beta --- appveyor.yml | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d4f0e60..9233d4f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ image: Visual Studio 2017 # Version format -version: 4.2.0.{build} +version: 4.3.0.{build} branches: only: @@ -9,7 +9,7 @@ branches: - master init: - - set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=rtm + - set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta assembly_info: patch: true diff --git a/src/Dawoe.OEmbedPickerPropertyEditor.Web/Properties/AssemblyInfo.cs b/src/Dawoe.OEmbedPickerPropertyEditor.Web/Properties/AssemblyInfo.cs index b434676..e2db127 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor.Web/Properties/AssemblyInfo.cs +++ b/src/Dawoe.OEmbedPickerPropertyEditor.Web/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.2.0.0")] -[assembly: AssemblyFileVersion("4.2.0.0")] +[assembly: AssemblyVersion("4.3.0.0")] +[assembly: AssemblyFileVersion("4.3.0.0")] diff --git a/src/Dawoe.OEmbedPickerPropertyEditor/Properties/AssemblyInfo.cs b/src/Dawoe.OEmbedPickerPropertyEditor/Properties/AssemblyInfo.cs index 7a9dcd0..21e699b 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor/Properties/AssemblyInfo.cs +++ b/src/Dawoe.OEmbedPickerPropertyEditor/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.2.0.0")] -[assembly: AssemblyFileVersion("4.2.0.0")] +[assembly: AssemblyVersion("4.3.0.0")] +[assembly: AssemblyFileVersion("4.3.0.0")] From 97ce6bee90e51e6dcae76c3e9dfb553afbe511a4 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Mon, 19 Oct 2020 12:38:21 +0200 Subject: [PATCH 02/11] New nuget api key --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 9233d4f..74363ae 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -68,7 +68,7 @@ deploy: - provider: NuGet server: api_key: - secure: nbR13qs8xp+iOGpuDFDsz7AtYFcltXswOXo9N8fhqx+oJoRdkzHk3pjubFbfO6dx + secure: f5ijMJdo8hygOHm+RRD4pCBcRqj6uw4AWqDgG4MvA1x5sgdmcuRxvdtN1Cn2NB6I artifact: /.*\.nupkg/ on: branch: master From 2a42eaa8cdfd3204a920d1e9425693509bf4d88d Mon Sep 17 00:00:00 2001 From: jake williamson Date: Wed, 11 Nov 2020 11:01:43 +1000 Subject: [PATCH 03/11] tweaks to allow the 'inter' value to be null or an empty string --- .../ValueConverters/OEmbedPickerValueConverter.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Dawoe.OEmbedPickerPropertyEditor/ValueConverters/OEmbedPickerValueConverter.cs b/src/Dawoe.OEmbedPickerPropertyEditor/ValueConverters/OEmbedPickerValueConverter.cs index 4217048..4c1b346 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor/ValueConverters/OEmbedPickerValueConverter.cs +++ b/src/Dawoe.OEmbedPickerPropertyEditor/ValueConverters/OEmbedPickerValueConverter.cs @@ -46,18 +46,16 @@ public override object ConvertIntermediateToObject( object inter, bool preview) { - var allowMultipe = propertyType.DataType.ConfigurationAs().AllowMultiple; + var allowMultiple = propertyType.DataType.ConfigurationAs().AllowMultiple; - if (inter == null) + if (string.IsNullOrWhiteSpace(inter.ToString())) { - return allowMultipe ? Enumerable.Empty() : null; + return allowMultiple ? Enumerable.Empty() : null; } - var items = new List(); + var items = JsonConvert.DeserializeObject>(inter.ToString()); - items = JsonConvert.DeserializeObject>(inter.ToString()); - - if (allowMultipe) + if (allowMultiple) { return items; } From fb7a9674bb4b2c9946887abad0ab11b6aa6e49bb Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 13 Jan 2021 10:27:21 +0100 Subject: [PATCH 04/11] Accessibility enhancements (cherry picked from commit db7828e25aee3daf11dba0e60d327d6266fbde71) --- .../views/editor.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html index 0007914..b36a89c 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html +++ b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html @@ -2,15 +2,21 @@
-
+
+ +
- +
- +
From 7dfc61da6cf9a5ac4b9c56f3c1aee7bf7496a3bd Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 13 Jan 2021 10:36:33 +0100 Subject: [PATCH 05/11] Prepare edit embed dialog (cherry picked from commit 73a7ad194aef17516aeb0d26252347932b5fa867) --- .../scripts/editor.controller.js | 19 ++++++++++++++++++- .../views/editor.html | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/scripts/editor.controller.js b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/scripts/editor.controller.js index 68cdcd0..ba7f593 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/scripts/editor.controller.js +++ b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/scripts/editor.controller.js @@ -22,7 +22,6 @@ }; editorService.embed(embedDialog); - } function trustHtml(html) { @@ -44,6 +43,23 @@ }); } + function editEmbed(index, evt) { + evt.preventDefault(); + + var embed = vm.items[index]; + + openEmbedDialog(embed, + (newEmbed) => { + vm.items.push({ + 'url': newEmbed.url, + 'width': newEmbed.width, + 'height': newEmbed.height, + 'preview': newEmbed.preview + }); + updateModelValue(); + }); + } + function removeEmbed(index, evt) { evt.preventDefault(); @@ -74,6 +90,7 @@ } vm.add = addEmbed; + vm.edit = editEmbed; vm.remove = removeEmbed; vm.trustHtml = trustHtml; vm.validateMandatory = validate; diff --git a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html index b36a89c..9650589 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html +++ b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html @@ -8,6 +8,9 @@
+ From f725d1d496350453dc3037fd147e266e567d689b Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 13 Jan 2021 16:48:27 +0100 Subject: [PATCH 06/11] Update styling with edit button --- .../css/editor.styles.css | 19 +++++++++++++------ .../views/editor.html | 14 ++++++++------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/css/editor.styles.css b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/css/editor.styles.css index c8ac625..ab5d2cb 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/css/editor.styles.css +++ b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/css/editor.styles.css @@ -50,20 +50,27 @@ top: 0 } +.Dawoe-OEmbedPicker .umb-sortable-thumbnails__actions { + position: absolute; + right: -18px; + top: -12px; +} + .Dawoe-OEmbedPicker .umb-node-preview__action { background: #fff; border-radius: 100%; box-shadow: 0 1px 2px rgba(0,0,0,.25); color: #d42054; font-size: 16px; - height: 25px; - line-height: 26px; - position: absolute; - right: -18px; + height: 25px; + line-height: 26px; text-align: center; text-decoration: none; - top: -12px; - width: 25px + width: 25px; +} + +.Dawoe-OEmbedPicker .umb-node-preview__action.umb-node-preview__action--red { + color: #d42054; } /* Overwrite default margin */ diff --git a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html index 9650589..1ff0b43 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html +++ b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/views/editor.html @@ -8,12 +8,14 @@
- - +
+ + +
From 835acc927152e74729c71b62fc15b421deef6cd7 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 13 Jan 2021 17:40:38 +0100 Subject: [PATCH 07/11] Remove red color from edit button --- .../Dawoe.OEmbedPickerPropertyEditor/css/editor.styles.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/css/editor.styles.css b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/css/editor.styles.css index ab5d2cb..fbb4b34 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/css/editor.styles.css +++ b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/css/editor.styles.css @@ -60,7 +60,6 @@ background: #fff; border-radius: 100%; box-shadow: 0 1px 2px rgba(0,0,0,.25); - color: #d42054; font-size: 16px; height: 25px; line-height: 26px; From 23f00a7732492123f46756099079780e021f6566 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 13 Jan 2021 17:42:47 +0100 Subject: [PATCH 08/11] Modify embed object --- .../scripts/editor.controller.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/scripts/editor.controller.js b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/scripts/editor.controller.js index ba7f593..d8b784e 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/scripts/editor.controller.js +++ b/src/Dawoe.OEmbedPickerPropertyEditor.Web/App_Plugins/Dawoe.OEmbedPickerPropertyEditor/scripts/editor.controller.js @@ -10,8 +10,13 @@ function openEmbedDialog(embed, onSubmit) { + // Pass in a clone of embed object to embed infinite editor. + // We set both "orignal" and "modify" properties as it changed in Umbraco v8.2 + const clone = _.clone(embed); + const embedDialog = { - embed: _.clone(embed), + modify: clone, + original: clone, submit: function (model) { onSubmit(model.embed); editorService.close(); @@ -50,12 +55,14 @@ openEmbedDialog(embed, (newEmbed) => { - vm.items.push({ + + vm.items[index] = { 'url': newEmbed.url, 'width': newEmbed.width, 'height': newEmbed.height, 'preview': newEmbed.preview - }); + }; + updateModelValue(); }); } From 0e921bee8d83fedb91258a4eed32df55e2f9d3dd Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Wed, 13 Jan 2021 22:24:17 +0100 Subject: [PATCH 09/11] Include file in project --- .../Dawoe.OEmbedPickerPropertyEditor.Web.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Dawoe.OEmbedPickerPropertyEditor.Web/Dawoe.OEmbedPickerPropertyEditor.Web.csproj b/src/Dawoe.OEmbedPickerPropertyEditor.Web/Dawoe.OEmbedPickerPropertyEditor.Web.csproj index 1243dfb..b36d9d2 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor.Web/Dawoe.OEmbedPickerPropertyEditor.Web.csproj +++ b/src/Dawoe.OEmbedPickerPropertyEditor.Web/Dawoe.OEmbedPickerPropertyEditor.Web.csproj @@ -159,6 +159,7 @@ + From 97c23883911f275ee2fa9945779c0c64aa5c4f6a Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Fri, 22 Jan 2021 11:35:59 +0100 Subject: [PATCH 10/11] Check for inter being null --- .../ValueConverters/OEmbedPickerValueConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dawoe.OEmbedPickerPropertyEditor/ValueConverters/OEmbedPickerValueConverter.cs b/src/Dawoe.OEmbedPickerPropertyEditor/ValueConverters/OEmbedPickerValueConverter.cs index 4c1b346..1bb730f 100644 --- a/src/Dawoe.OEmbedPickerPropertyEditor/ValueConverters/OEmbedPickerValueConverter.cs +++ b/src/Dawoe.OEmbedPickerPropertyEditor/ValueConverters/OEmbedPickerValueConverter.cs @@ -48,7 +48,7 @@ public override object ConvertIntermediateToObject( { var allowMultiple = propertyType.DataType.ConfigurationAs().AllowMultiple; - if (string.IsNullOrWhiteSpace(inter.ToString())) + if (string.IsNullOrWhiteSpace(inter?.ToString())) { return allowMultiple ? Enumerable.Empty() : null; } From 2e19f29923f5b35c28ed4fee0e7e6be572decaa2 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Fri, 22 Jan 2021 11:59:37 +0100 Subject: [PATCH 11/11] Set build to release --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 74363ae..e98604b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ branches: - master init: - - set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta + - set UMBRACO_PACKAGE_PRERELEASE_SUFFIX=rtm assembly_info: patch: true