From a3744f812ea75b03e3f8f453bd6242b6455081af Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 20 Aug 2020 15:25:24 +0300 Subject: [PATCH 01/19] CmsKit: Should focus on the comment area after login and return back https://github.com/abpframework/abp/issues/5073 --- .../CmsKit/Shared/Components/Commenting/Default.cshtml | 2 +- .../CmsKit/Shared/Components/Commenting/default.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml index 5246f9a0f1..b8118e99ca 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml @@ -87,7 +87,7 @@ ; } -
+

diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js index 2950f8239b..8cce108ee5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js @@ -135,6 +135,14 @@ }); } + function focusOnHash($container) { + if (location.hash === ''){ + return; + } + + $('html, body').animate({ scrollTop: $(location.hash).offset().top + $(this).height() / 2 }, 'slow'); + } + function init() { registerReplyLinks($widget); registerEditLinks($widget); @@ -142,6 +150,8 @@ registerUpdateOfNewComment($widget); registerSubmissionOfNewComment($widget); + + focusOnHash($widget); } return { From d6173997caaa056eaf6d1af16249a16ff8036aa0 Mon Sep 17 00:00:00 2001 From: Erol Arkat Date: Mon, 24 Aug 2020 10:03:49 +0300 Subject: [PATCH 02/19] version update --- common.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.props b/common.props index eea8755d42..1d2d986131 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 3.1.0 + 3.1.0-rc.1 $(NoWarn);CS1591 https://abp.io/assets/abp_nupkg.png https://abp.io From d59dd4a28821c018e11ba993e9650dc3cc137158 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 24 Aug 2020 10:19:35 +0300 Subject: [PATCH 03/19] pull/5134 requested changes --- .../Pages/CmsKit/Shared/Components/Commenting/default.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js index 8cce108ee5..f7bf554638 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/default.js @@ -136,11 +136,15 @@ } function focusOnHash($container) { - if (location.hash === ''){ + if (!location.hash.toLowerCase().startsWith('#cms-comment')){ return; } - $('html, body').animate({ scrollTop: $(location.hash).offset().top + $(this).height() / 2 }, 'slow'); + $('html, body').animate( + { + scrollTop: $(location.hash).offset().top + $(this).height() / 2 + }, + 'slow'); } function init() { From ae9f593b5e990a27f40b67eadcfb15f24d54d5cb Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 24 Aug 2020 15:42:57 +0800 Subject: [PATCH 04/19] Add abp.luxon.js --- .../Packages/Luxon/LuxonScriptContributor.cs | 1 + npm/packs/luxon/abp.resourcemapping.js | 1 + npm/packs/luxon/package.json | 1 + npm/packs/luxon/src/abp.luxon.js | 48 +++++++++++++++++++ .../wwwroot/libs/abp/luxon/abp.luxon.js | 48 +++++++++++++++++++ .../wwwroot/libs/abp/luxon/abp.luxon.js | 48 +++++++++++++++++++ .../wwwroot/libs/abp/luxon/abp.luxon.js | 48 +++++++++++++++++++ .../wwwroot/libs/abp/luxon/abp.luxon.js | 48 +++++++++++++++++++ .../wwwroot/libs/abp/luxon/abp.luxon.js | 48 +++++++++++++++++++ .../wwwroot/libs/abp/luxon/abp.luxon.js | 48 +++++++++++++++++++ .../wwwroot/libs/abp/luxon/abp.luxon.js | 48 +++++++++++++++++++ 11 files changed, 387 insertions(+) create mode 100644 npm/packs/luxon/src/abp.luxon.js create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/luxon/abp.luxon.js create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/luxon/abp.luxon.js create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/luxon/abp.luxon.js create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/luxon/abp.luxon.js create mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/luxon/abp.luxon.js create mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/luxon/abp.luxon.js create mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/luxon/abp.luxon.js diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Luxon/LuxonScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Luxon/LuxonScriptContributor.cs index 3d2a1dc774..afa3ed3994 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Luxon/LuxonScriptContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Luxon/LuxonScriptContributor.cs @@ -8,6 +8,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Luxon public override void ConfigureBundle(BundleConfigurationContext context) { context.Files.AddIfNotContains("/libs/luxon/luxon.min.js"); + context.Files.AddIfNotContains("/libs/abp/luxon/abp.luxon.js"); } } } diff --git a/npm/packs/luxon/abp.resourcemapping.js b/npm/packs/luxon/abp.resourcemapping.js index a037c5bf64..0afc74f204 100644 --- a/npm/packs/luxon/abp.resourcemapping.js +++ b/npm/packs/luxon/abp.resourcemapping.js @@ -1,5 +1,6 @@ module.exports = { mappings: { "@node_modules/luxon/build/global/*.*": "@libs/luxon/" + "@node_modules/@abp/luxon/src/*.*": "@libs/abp/luxon/" } } \ No newline at end of file diff --git a/npm/packs/luxon/package.json b/npm/packs/luxon/package.json index 57a6053319..4fd02d0e18 100644 --- a/npm/packs/luxon/package.json +++ b/npm/packs/luxon/package.json @@ -5,6 +5,7 @@ "access": "public" }, "dependencies": { + "@abp/core": "~3.0.5", "luxon": "^1.24.1" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431" diff --git a/npm/packs/luxon/src/abp.luxon.js b/npm/packs/luxon/src/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/npm/packs/luxon/src/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/luxon/abp.luxon.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/luxon/abp.luxon.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/luxon/abp.luxon.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/luxon/abp.luxon.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/luxon/abp.luxon.js b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/luxon/abp.luxon.js b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/luxon/abp.luxon.js b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); From 155f72f2f3d765a60578e978a769238c5797631e Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 24 Aug 2020 16:07:45 +0800 Subject: [PATCH 05/19] Add abp.luxon.js to modules --- .../wwwroot/libs/abp/luxon/abp.luxon.js | 48 +++++++++++++++++++ .../wwwroot/libs/abp/luxon/abp.luxon.js | 48 +++++++++++++++++++ .../wwwroot/libs/abp/luxon/abp.luxon.js | 48 +++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/luxon/abp.luxon.js create mode 100644 modules/docs/app/VoloDocs.Web/wwwroot/libs/abp/luxon/abp.luxon.js create mode 100644 modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/abp/luxon/abp.luxon.js diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/luxon/abp.luxon.js b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); diff --git a/modules/docs/app/VoloDocs.Web/wwwroot/libs/abp/luxon/abp.luxon.js b/modules/docs/app/VoloDocs.Web/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/abp/luxon/abp.luxon.js b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 0000000000..15f8cd57be --- /dev/null +++ b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,48 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + /* NOTIFICATION *********************************************/ + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + {locale: abp.localization.currentCulture.cultureName} + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + +})(jQuery); From 571c08fc6d9bc8e32ec8984d08b01bd94465a584 Mon Sep 17 00:00:00 2001 From: bnymncoskuner Date: Mon, 24 Aug 2020 13:33:44 +0300 Subject: [PATCH 06/19] build: ts-toolbelt version is fixed at 6.15.4 --- npm/ng-packs/package.json | 2 +- npm/ng-packs/yarn.lock | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index 9ec24387d0..552af1182a 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -88,7 +88,7 @@ "snq": "^1.0.3", "symlink-manager": "^1.5.0", "ts-node": "~7.0.0", - "ts-toolbelt": "^6.9.9", + "ts-toolbelt": "6.15.4", "tsickle": "^0.38.1", "tslint": "~6.1.0", "typescript": "~3.9.5", diff --git a/npm/ng-packs/yarn.lock b/npm/ng-packs/yarn.lock index ffaf8fcb65..cd90d0ffb9 100644 --- a/npm/ng-packs/yarn.lock +++ b/npm/ng-packs/yarn.lock @@ -13241,6 +13241,11 @@ ts-pnp@^1.1.6: resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== +ts-toolbelt@6.15.4: + version "6.15.4" + resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-6.15.4.tgz#f7fad584e197d0f495f77b5e3ee75a8f4c4dd3da" + integrity sha512-Ifp2yNo4I8q5UwNARUBMnBiFpv5DEtTbCtS8RCjjLOz+PNcThbjUsPJCK3hRnz0dTygM1Fi3Mgvnt/DoKUTU2g== + ts-toolbelt@^6.9.9: version "6.15.5" resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz#cb3b43ed725cb63644782c64fbcad7d8f28c0a83" From a221fa0738e8b5c46215f8b54c71b99974064743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 24 Aug 2020 14:14:05 +0300 Subject: [PATCH 07/19] Update Post.md --- docs/en/Blog-Posts/2020-08-20 v3_1_Release/Post.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Blog-Posts/2020-08-20 v3_1_Release/Post.md b/docs/en/Blog-Posts/2020-08-20 v3_1_Release/Post.md index b61d77e3c8..0dcfb183b7 100644 --- a/docs/en/Blog-Posts/2020-08-20 v3_1_Release/Post.md +++ b/docs/en/Blog-Posts/2020-08-20 v3_1_Release/Post.md @@ -66,7 +66,7 @@ If you already have a solution and want to use/test the latest RC/Preview versio ### ABP Commercial Only -* We've **moved favicons** into `/wwwroot/images/favicon/` folder for the ASP.NET Core **MVC / Razor Page UI** applications. There are 10 favicon related files (including the `favicon.ico`) under this directory to better work with different browser and cases. You can create a new application to check this folder and copy the files into your own application. Then you can customize the icons for your own brand. +* We've **moved favicons** into `/wwwroot/images/favicon/` folder for the ASP.NET Core **MVC / Razor Page UI** applications. There are 10 favicon related files (including the `favicon.ico`) under this directory to better work with different browser and cases. You can create a new application to check this folder and copy the files into your own application. Then you can customize the icons for your own brand (hint: you can use a tool [like that](https://realfavicongenerator.net/) to create the favicons with various formats). * Removed direct **Twitter & Facebook social login integrations** from the [account module](https://commercial.abp.io/modules/Volo.Account.Pro), for **MVC / Razor Pages UI**. Follow [this documentation](https://github.com/abpframework/abp/blob/dev/docs/en/Authentication/Social-External-Logins.md) to easily add social logins to your applications if you need. The account module provides all the infrastructure to handle social/external logins, you just need to configure it. ## What's New with the ABP Framework 3.1 RC.1 From 12b4f79559d314bcddcf4ec17fce6a33db2b5281 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 24 Aug 2020 15:36:35 +0300 Subject: [PATCH 08/19] cmskit: focus after login improvements --- .../Components/Commenting/Default.cshtml | 10 +++-- .../Shared/Components/Commenting/default.js | 38 ++++++++++--------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml index c9fee7e7d8..790a66fcd4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml @@ -60,7 +60,7 @@ { @if (CurrentUser.IsAuthenticated) { - + @L["Reply"] } @@ -87,7 +87,7 @@ }

-