From 7c2ccbb6d7c4ace8a1929cf9b0320d15b44d2cec Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 10 Nov 2018 10:08:14 +0100 Subject: [PATCH] Fix bundle e master --- MP-Site-old/Web.config | 44 ++++++++++++---------- MP-Site/App_Start/BundleConfig.cs | 43 ++++++++++++++++++--- MP-Site/App_Start/MP_Startup.cs | 2 +- MP-Site/Bundle.config | 28 +++++++++++++- MP-Site/Global.asax.cs | 3 ++ MP-Site/MP-Site.csproj | 1 + MP-Site/Web.config | 4 +- MP-Site/WebMasterPages/MAPO_refresh.master | 13 +++---- 8 files changed, 100 insertions(+), 38 deletions(-) diff --git a/MP-Site-old/Web.config b/MP-Site-old/Web.config index 51fb5460..4818bab0 100644 --- a/MP-Site-old/Web.config +++ b/MP-Site-old/Web.config @@ -1,35 +1,39 @@  + -
-
-
-
+
+
+
+
- - - - - + + + + + - + - - - + + + - - - - - + + + + + - - + + diff --git a/MP-Site/App_Start/BundleConfig.cs b/MP-Site/App_Start/BundleConfig.cs index 91474753..10f54e17 100644 --- a/MP-Site/App_Start/BundleConfig.cs +++ b/MP-Site/App_Start/BundleConfig.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.Optimization; -using System.Web.UI; +using System.Web.Optimization; namespace MP_SITE { @@ -33,6 +28,42 @@ namespace MP_SITE // pronti per passare alla produzione, usare lo strumento di compilazione disponibile all'indirizzo https://modernizr.com per selezionare solo i test necessari bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( "~/Scripts/modernizr-*")); + + bundles.Add(new ScriptBundle("~/bundles/jquery").Include( + "~/Scripts/jquery-{version}.js")); + + bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( + "~/Scripts/jquery-ui-{version}.js")); + + //bundles.Add(new ScriptBundle("~/bundles/Global").Include( + // "~/Scripts/jquery-{version}.js", + // "~/Scripts/jquery-ui.js")); + + //bundles.Add(new ScriptBundle("~/bundles/GlobalHead").Include( + // "~/Scripts/modernizr*")); + + //bundles.Add(new StyleBundle("~/Content/Global").Include( + // "~/Content/bootstrap.css", + // "~/Content/Style.css")); + + bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( + "~/Scripts/bootstrap.js")); + + bundles.Add(new StyleBundle("~/Content/css").Include( + "~/Content/bootstrap.css", + "~/Content/Style.css")); + + + bundles.Add(new ScriptBundle("~/bundles/vis").Include( + "~/vis/vis.js")); + + + //bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( + // "~/Scripts/jquery.unobtrusive*", + // "~/Scripts/jquery.validate*")); + + // abilito boundle "forzato"! + BundleTable.EnableOptimizations = true; } } } \ No newline at end of file diff --git a/MP-Site/App_Start/MP_Startup.cs b/MP-Site/App_Start/MP_Startup.cs index 29984f1e..5ee6f625 100644 --- a/MP-Site/App_Start/MP_Startup.cs +++ b/MP-Site/App_Start/MP_Startup.cs @@ -1,6 +1,6 @@ using SteamWare; -namespace MoonPro +namespace MP_SITE { public class MP_Startup { diff --git a/MP-Site/Bundle.config b/MP-Site/Bundle.config index de5e842a..235f638d 100644 --- a/MP-Site/Bundle.config +++ b/MP-Site/Bundle.config @@ -2,6 +2,32 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MP-Site/Global.asax.cs b/MP-Site/Global.asax.cs index 99255cd1..eb66d9e5 100644 --- a/MP-Site/Global.asax.cs +++ b/MP-Site/Global.asax.cs @@ -16,6 +16,9 @@ namespace MP_SITE // Codice eseguito all'avvio dell'applicazione RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); + + // avvio il metodo init x applicazione... + MP_Startup.Init(); } } } \ No newline at end of file diff --git a/MP-Site/MP-Site.csproj b/MP-Site/MP-Site.csproj index 07a4974a..8f940a30 100644 --- a/MP-Site/MP-Site.csproj +++ b/MP-Site/MP-Site.csproj @@ -394,6 +394,7 @@ AnalisiProduzione.aspx + Default.aspx diff --git a/MP-Site/Web.config b/MP-Site/Web.config index a79b8956..61022d20 100644 --- a/MP-Site/Web.config +++ b/MP-Site/Web.config @@ -1,4 +1,4 @@ - +