|
| 1 | +using System.Web; |
| 2 | +using System.Web.Optimization; |
| 3 | + |
| 4 | +namespace ReportsWebFormsSamples |
| 5 | +{ |
| 6 | + public class CssUrlTransformWrapper : IItemTransform |
| 7 | + { |
| 8 | + private readonly CssRewriteUrlTransform _cssRewriteUrlTransform; |
| 9 | + |
| 10 | + public CssUrlTransformWrapper() |
| 11 | + { |
| 12 | + _cssRewriteUrlTransform = new CssRewriteUrlTransform(); |
| 13 | + } |
| 14 | + |
| 15 | + public string Process(string includedVirtualPath, string input) |
| 16 | + { |
| 17 | + return _cssRewriteUrlTransform.Process("~" + VirtualPathUtility.ToAbsolute(includedVirtualPath), input); |
| 18 | + } |
| 19 | + } |
| 20 | + public class BundleConfig |
| 21 | + { |
| 22 | + // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862 |
| 23 | + public static void RegisterBundles(BundleCollection bundles) |
| 24 | + { |
| 25 | + BundleTable.EnableOptimizations = true; |
| 26 | + |
| 27 | + //Vendor scripts for SB main samples |
| 28 | + bundles.Add(new ScriptBundle("~/bundles/main/vendor").Include( |
| 29 | + |
| 30 | + //dependent |
| 31 | + "~/Scripts/dependent/prism.js", |
| 32 | + "~/Scripts/dependent/prism-csharp.min.js", |
| 33 | + "~/Scripts/dependent/jquery.min.js", |
| 34 | + "~/Scripts/dependent/jsrender.min.js", |
| 35 | + "~/Scripts/dependent/popper.min.js", |
| 36 | + "~/Scripts/dependent/bootstrap.min.js", |
| 37 | + |
| 38 | + //bold-reports |
| 39 | + "~/Scripts/bold-reports/common/bold.reports.common.min.js", |
| 40 | + "~/Scripts/bold-reports/common/bold.reports.widgets.min.js", |
| 41 | + "~/Scripts/bold-reports/bold.report-viewer.min.js", |
| 42 | + "~/Scripts/bold-reports/data-visualization/ej.bulletgraph.min.js", |
| 43 | + "~/Scripts/bold-reports/data-visualization/ej.chart.min.js", |
| 44 | + "~/Scripts/bold-reports/data-visualization/ej.circulargauge.min.js", |
| 45 | + "~/Scripts/bold-reports/data-visualization/ej.lineargauge.min.js", |
| 46 | + "~/Scripts/bold-reports/data-visualization/ej.map.min.js")); |
| 47 | + |
| 48 | + //App scripts for SB main samples |
| 49 | + bundles.Add(new ScriptBundle("~/bundles/main/app").Include( |
| 50 | + "~/Scripts/common/global.js", |
| 51 | + "~/Scripts/common/rdlcData.js", |
| 52 | + "~/Scripts/common/header.js", |
| 53 | + "~/Scripts/common/main-content.js", |
| 54 | + "~/Scripts/common/sidebar.js", |
| 55 | + "~/Scripts/common/index.js")); |
| 56 | + |
| 57 | + |
| 58 | + //styles for SB main samples |
| 59 | + bundles.Add(new StyleBundle("~/Content/main") |
| 60 | + .Include("~/Content/css/dependent/bootstrap.min.css") |
| 61 | + .Include("~/Content/css/dependent/prism.css") |
| 62 | + .Include("~/Content/css/common/common.css") |
| 63 | + .Include("~/Content/css/common/header.css") |
| 64 | + .Include("~/Content/css/common/main-content.css") |
| 65 | + .Include("~/Content/css/common/sidebar.css", new CssUrlTransformWrapper()) |
| 66 | + .Include("~/Content/css/common/writer.css", new CssUrlTransformWrapper()) |
| 67 | + .Include("~/Content/css/common/index.css", new CssUrlTransformWrapper()) |
| 68 | + .Include("~/Content/css/bold-reports/bold.widgets.core.material.min.css", new CssUrlTransformWrapper()) |
| 69 | + .Include("~/Content/css/bold-reports/material/bold.theme.min.css", new CssUrlTransformWrapper()) |
| 70 | + ); |
| 71 | + |
| 72 | + //vendor scripts for SB preview samples |
| 73 | + bundles.Add(new ScriptBundle("~/bundles/preview/vendor").Include( |
| 74 | + |
| 75 | + //dependent |
| 76 | + "~/Scripts/dependent/jquery.min.js", |
| 77 | + "~/Scripts/dependent/jsrender.min.js", |
| 78 | + "~/Scripts/dependent/codemirror.js", |
| 79 | + "~/Scripts/dependent/show-hint.js", |
| 80 | + "~/Scripts/dependent/sql-hint.js", |
| 81 | + "~/Scripts/dependent/sql.js", |
| 82 | + "~/Scripts/dependent/vb.js", |
| 83 | + |
| 84 | + //bold-reports |
| 85 | + "~/Scripts/bold-reports/common/bold.reports.common.min.js", |
| 86 | + "~/Scripts/bold-reports/common/bold.reports.widgets.min.js", |
| 87 | + "~/Scripts/bold-reports/bold.report-viewer.min.js", |
| 88 | + "~/Scripts/bold-reports/common/bold.report-designer-widgets.min.js", |
| 89 | + "~/Scripts/bold-reports/bold.report-designer.min.js", |
| 90 | + "~/Scripts/extensions/barcode.js", |
| 91 | + "~/Scripts/extensions/qrbarcode.js", |
| 92 | + "~/Scripts/bold-reports/data-visualization/ej.bulletgraph.min.js", |
| 93 | + "~/Scripts/bold-reports/data-visualization/ej.chart.min.js", |
| 94 | + "~/Scripts/bold-reports/data-visualization/ej.circulargauge.min.js", |
| 95 | + "~/Scripts/bold-reports/data-visualization/ej.lineargauge.min.js", |
| 96 | + "~/Scripts/bold-reports/data-visualization/ej.map.min.js")); |
| 97 | + |
| 98 | + //App scripts for SB preview samples |
| 99 | + bundles.Add(new ScriptBundle("~/bundles/preview/app").Include( |
| 100 | + "~/Scripts/common/global.js", |
| 101 | + "~/Scripts/common/rdlcData.js", |
| 102 | + "~/Scripts/common/preview.js")); |
| 103 | + |
| 104 | + //styles for SB preview samples |
| 105 | + bundles.Add(new StyleBundle("~/Content/preview") |
| 106 | + .Include("~/Content/css/dependent/bootstrap.min.css") |
| 107 | + .Include("~/Content/css/dependent/codemirror.css") |
| 108 | + .Include("~/Content/css/dependent/show-hint.css") |
| 109 | + .Include("~/Content/css/common/common.css") |
| 110 | + .Include("~/Content/css/common/writer.css", new CssUrlTransformWrapper()) |
| 111 | + .Include("~/Content/css/common/preview.css") |
| 112 | + .Include("~/Content/css/bold-reports/bold.widgets.core.material.min.css", new CssUrlTransformWrapper()) |
| 113 | + .Include("~/Content/css/bold-reports/material/bold.theme.min.css", new CssUrlTransformWrapper()) |
| 114 | + .Include("~/Content/css/bold-reports/bold.reportdesigner.core.material.min.css", new CssUrlTransformWrapper()) |
| 115 | + .Include("~/Content/css/bold-reports/material/bold.reportdesigner.theme.min.css", new CssUrlTransformWrapper()) |
| 116 | + .Include("~/Content/extensions/barcode.css", new CssUrlTransformWrapper())); |
| 117 | + } |
| 118 | + |
| 119 | + } |
| 120 | +} |
0 commit comments