From 9c027157b3375398d2ecef1341fda48833ef1961 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Thu, 14 Jun 2018 17:18:04 +0300 Subject: [PATCH] Added TuiEditor bundle contributors --- .../TuiEditor/TuiEditorScriptContributor.cs | 25 +++++++++++++++++++ .../TuiEditor/TuiEditorStyleContributor.cs | 21 ++++++++++++++++ .../SharedThemeGlobalScriptContributor.cs | 4 +-- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs create mode 100644 src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorStyleContributor.cs diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs new file mode 100644 index 0000000000..586bcd3db9 --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.Packages.Codemirror; +using Volo.Abp.AspNetCore.Mvc.UI.Packages.HighlightJs; +using Volo.Abp.AspNetCore.Mvc.UI.Packages.MarkdownIt; +using Volo.Abp.Modularity; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.TuiEditor +{ + [DependsOn( + typeof(HighlightJsScriptContributor), + typeof(CodemirrorScriptContributor), + typeof(MarkdownItScriptContributor) + )] + public class TuiEditorScriptContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.AddIfNotContains("/libs/to-mark/to-mark.min.js"); + context.Files.AddIfNotContains("/libs/tui-code-snippet/tui-code-snippet.min.js"); + context.Files.AddIfNotContains("/libs/squire-rte/squire.js"); + context.Files.AddIfNotContains("/libs/tui-editor/tui-editor-Editor.min.js"); + } + } +} diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorStyleContributor.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorStyleContributor.cs new file mode 100644 index 0000000000..64f818ad6d --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorStyleContributor.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.Packages.Codemirror; +using Volo.Abp.AspNetCore.Mvc.UI.Packages.HighlightJs; +using Volo.Abp.Modularity; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.TuiEditor +{ + [DependsOn( + typeof(CodemirrorStyleContributor), + typeof(HighlightJsStyleContributor) + )] + public class TuiEditorStyleContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.AddIfNotContains("/libs/tui-editor/tui-editor.min.css"); + context.Files.AddIfNotContains("/libs/tui-editor/tui-editor-contents.min.css"); + } + } +} \ No newline at end of file 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 036cefe200..2d35d82ff6 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 @@ -19,11 +19,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling typeof(LodashScriptContributor), typeof(JQueryValidationUnobtrusiveScriptContributor), typeof(JQueryFormScriptContributor), + typeof(Select2ScriptContributor), typeof(DatatablesNetBs4ScriptContributor), typeof(SweetalertScriptContributor), typeof(ToastrScriptBundleContributor), - typeof(TimeagoScriptContributor), - typeof(Select2ScriptContributor))] + typeof(TimeagoScriptContributor))] public class SharedThemeGlobalScriptContributor : BundleContributor { public override void ConfigureBundle(BundleConfigurationContext context)