From d16f4e7f2c733e64b7446ccb225fc40afce907cc Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Mon, 11 Jun 2018 00:37:14 +0300 Subject: [PATCH] Added Abp packages --- .../SharedThemeGlobalScriptContributor.cs | 11 ++++------- .../SharedThemeGlobalStyleContributor.cs | 1 + .../Abp/Core/AbpCoreScriptContributor.cs | 10 ++++++++++ .../Abp/JQuery/AbpJQueryScriptContributor.cs | 16 ++++++++++++++++ 4 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI/UI/Bundling/Libraries/Abp/Core/AbpCoreScriptContributor.cs create mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI/UI/Bundling/Libraries/Abp/JQuery/AbpJQueryScriptContributor.cs diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs index 026d118771..0c4b90c0bc 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs @@ -1,4 +1,6 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Libraries.Abp.Core; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Libraries.Abp.JQuery; using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Libraries.Bootstrap; using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Libraries.DatatablesNet; using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Libraries.DatatablesNetBs4; @@ -13,12 +15,11 @@ using Volo.Abp.Modularity; namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling { [DependsOn( - typeof(JQueryScriptContributor), + typeof(AbpCoreScriptContributor), + typeof(AbpJQueryScriptContributor), typeof(BootstrapScriptContributor), - typeof(JQueryValidationScriptContributor), typeof(JQueryValidationUnobtrusiveScriptContributor), typeof(JQueryFormScriptContributor), - typeof(DatatablesNetScriptContributor), typeof(DatatablesNetBs4ScriptContributor), typeof(SweetalertScriptContributor), typeof(ToastrScriptBundleContributor) @@ -29,10 +30,6 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling { context.Files.AddRange(new[] { - //TODO: Move to their own contributors, but first consider to change abp.js a bit - "/libs/abp/core/abp.js", - "/libs/abp/jquery/abp.jquery.js", - "/libs/abp/aspnetcore.mvc.ui.theme.shared/jquery/jquery-extensions.js", "/libs/abp/aspnetcore.mvc.ui.theme.shared/jquery-form/jquery-form-extensions.js", "/libs/abp/aspnetcore.mvc.ui.theme.shared/bootstrap/dom-event-handlers.js", diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs index 3bc2702144..b40668c697 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs @@ -17,6 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling { public override void ConfigureBundle(BundleConfigurationContext context) { + //TODO: Should this go to Basic Theme??? context.Files.Add("/libs/abp/aspnetcore.mvc.ui.theme.shared/datatables/datatables.css"); } } diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI/UI/Bundling/Libraries/Abp/Core/AbpCoreScriptContributor.cs b/src/Volo.Abp.AspNetCore.Mvc.UI/UI/Bundling/Libraries/Abp/Core/AbpCoreScriptContributor.cs new file mode 100644 index 0000000000..e4a502e32c --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI/UI/Bundling/Libraries/Abp/Core/AbpCoreScriptContributor.cs @@ -0,0 +1,10 @@ +namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Libraries.Abp.Core +{ + public class AbpCoreScriptContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.Add("/libs/abp/core/abp.js"); + } + } +} diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI/UI/Bundling/Libraries/Abp/JQuery/AbpJQueryScriptContributor.cs b/src/Volo.Abp.AspNetCore.Mvc.UI/UI/Bundling/Libraries/Abp/JQuery/AbpJQueryScriptContributor.cs new file mode 100644 index 0000000000..6d06301b63 --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI/UI/Bundling/Libraries/Abp/JQuery/AbpJQueryScriptContributor.cs @@ -0,0 +1,16 @@ +using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Libraries.Abp.Core; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Libraries.JQuery; +using Volo.Abp.Modularity; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Libraries.Abp.JQuery +{ + [DependsOn(typeof(AbpCoreScriptContributor))] + [DependsOn(typeof(JQueryScriptContributor))] + public class AbpJQueryScriptContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.Add("/libs/abp/jquery/abp.jquery.js"); + } + } +}