Exemplo n.º 1
0
        private static void AddAppBundles(BundleCollection bundles)
        {
            var scriptBundle = new ScriptBundle(ScriptsBundleVirtualPath);
#if (DEBUG && LOCAL)
            var adminAppDirFullPath = Path.Combine(HttpRuntime.AppDomainAppPath, AdminAppDir);

            // Create the .NET bundle, then use that list to generate an actual bundle.js file
            if (Directory.Exists(adminAppDirFullPath))
            {
                scriptBundle.Include(
                    // Order matters, so get the core app setup first
                    string.Format("~/{0}/app.core.module.js", AdminAppDir),
                    string.Format("~/{0}/app.module.js", AdminAppDir))
                    // then get any other top level js files
                    .IncludeDirectory(string.Format("~/{0}", AdminAppDir), "*.js", false)
                    // then get all nested module js files
                    .IncludeDirectory(string.Format("~/{0}", AdminAppDir), "*-module.js", true)
                    // finally, get all the other js files
                    .IncludeDirectory(string.Format("~/{0}", AdminAppDir), "*.js", true);

                bundles.Add(scriptBundle);

                // Generate a new bundle script.  This should only be done on a local box as running from the build server causes issues.
                GenerateBundleJS(scriptBundle, bundles);
            }
#elif (DEBUG && !LOCAL)
            scriptBundle.Include(string.Format("~/{0}/briandevlin.bundled.js", "scripts"));
            bundles.Add(scriptBundle);
#elif !DEBUG
            scriptBundle.Include(string.Format("~/{0}/briandevlin.bundled.js", "scripts"));
            bundles.Add(scriptBundle);
#endif
        }
Exemplo n.º 2
0
		private static void IncludeSharedScripts(ScriptBundle jsBundle)
		{
			jsBundle.Include("~/Assets/Scripts/shared/bootbox.js");
			jsBundle.Include("~/Assets/Scripts/shared/head.js");
			jsBundle.Include("~/Assets/Scripts/shared/tagmanager.js");
			jsBundle.Include("~/Assets/Scripts/shared/toastr.js");
		}
Exemplo n.º 3
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/js").Include(
                        "~/Scripts/jquery-1.10.2.min.js",
                        "~/Scripts/jquery.signalR-2.1.1.min.js"));

            var tsBundle = new ScriptBundle("~/bundles/ts");
            tsBundle.Include(
                        "~/Scripts/ts/Component.js",
                        "~/Scripts/ts/Animator.js",
                        "~/Scripts/ts/Hub.js",
                        "~/Scripts/ts/Models/Player.js",
                        "~/Scripts/ts/Models/DataModel.js",
                        "~/Scripts/ts/Application.js",
                        "~/Scripts/ts/Components/Connecting.js",
                        "~/Scripts/ts/Components/Hello.js",
                        "~/Scripts/ts/Components/PlayUI.js");
            #if DEBUG
            tsBundle.Include("~/Scripts/ts/Debug.js");
            #endif
            bundles.Add(tsBundle);

            bundles.Add(new StyleBundle("~/Content/bundles/css").Include(
                      "~/Content/css/Site.css", new CssRewriteUrlTransform()));

            // Set EnableOptimizations to false for debugging. For more information,
            // visit http://go.microsoft.com/fwlink/?LinkId=301862
            #if DEBUG
            BundleTable.EnableOptimizations = false;
            #else
            BundleTable.EnableOptimizations = true;
            #endif
        }
Exemplo n.º 4
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Clear();
            bundles.ResetAll();

            ScriptBundle loginBundle = new ScriptBundle("~/js/login");
            loginBundle.Include("~/Content/js/lib/jquery-1.8.0.min.js");
            loginBundle.Include("~/Views/Documentation/Login.js");

            bundles.Add(loginBundle);

            ScriptBundle sandboxBundle = new ScriptBundle("~/js/sandbox");
            sandboxBundle.Include("~/Content/js/lib/jquery-1.8.0.min.js");
            sandboxBundle.Include("~/Content/js/lib/jquery.slideto.min.js");
            sandboxBundle.Include("~/Content/js/lib/jquery.wiggle.min.js");
            sandboxBundle.Include("~/Content/js/lib/jquery.ba-bbq.min.js");
            sandboxBundle.Include("~/Content/js/lib/handlebars-2.0.0.js");
            sandboxBundle.Include("~/Content/js/lib/underscore-min.js");
            sandboxBundle.Include("~/Content/js/lib/backbone-min.js");
            sandboxBundle.Include("~/Content/js/swagger-ui.js");
            sandboxBundle.Include("~/Content/js/lib/highlight.7.3.pack.js");
            sandboxBundle.Include("~/Content/js/lib/marked.js");
            sandboxBundle.Include("~/Content/js/lib/swagger-oauth.js");
            sandboxBundle.Include("~/Views/Documentation/Sandbox.js");

            bundles.Add(sandboxBundle);

            bundles.Add(new StyleBundle("~/css/login").Include("~/Content/css/login.css"));

            bundles.Add(new StyleBundle("~/css/sandbox").Include("~/Content/css/reset.css",
                                                                       "~/content/css/typography.css",
                                                                       "~/content/css/screen.css"));
        }
Exemplo n.º 5
0
 protected void Application_Start(object sender, EventArgs args)
 {
     var scriptBundle = new ScriptBundle("~/Scripts/combined");
     scriptBundle.Include("~/Scripts/libs/*.js");
     scriptBundle.Include("~/Scripts/*.ts");
     scriptBundle.Transforms.Add(new JsTransformer());
     scriptBundle.Orderer = new ScriptDependencyOrderer();
     BundleTable.Bundles.Add(scriptBundle);
 }
Exemplo n.º 6
0
        private static void PluginsBundle(BundleCollection bundles)
        {
            var plugins = new ScriptBundle("~/bundles/plugins");

            plugins.Include("~/Scripts/plugins/angular.min.js");
            plugins.Include("~/Scripts/plugins/velocity.min.js");
            plugins.Include("~/Scripts/plugins/moment-with-locales.min.js");
            plugins.Include("~/Scripts/plugins/lumx.min.js");

            bundles.Add(plugins);
        }
Exemplo n.º 7
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            StyleBundle estilos = new StyleBundle("~/bundles/estilos");
            estilos.Include("~/Content/bootstrap/css/bootstrap.css");
            estilos.Include("~/Content/Style.css");
            bundles.Add(estilos);

            ScriptBundle scripts = new ScriptBundle("~/bundles/scripts");
            scripts.Include("~/Scripts/jquery-2.1.1.js");
            scripts.Include("~/Scripts/jquery.validate.js");
            scripts.Include("~/Scripts/jquery.validate.unobtrusive.js");
            bundles.Add(scripts);
        }
Exemplo n.º 8
0
        public static void Config(BundleCollection bundles)
        {
            var scriptBundle = new ScriptBundle(Path);

            scriptBundle.Include("~/Scripts/angular.js");
            scriptBundle.Include("~/Scripts/angular-ui-router.js");
            scriptBundle.Include("~/Scripts/angular-resource.js");
            scriptBundle.Include("~/Scripts/angular-cookies.js");
            scriptBundle.IncludeDirectory("~/Angular/Modules", "*.js", true);
            scriptBundle.IncludeDirectory("~/Angular/Services", "*.js", true);
            scriptBundle.IncludeDirectory("~/Angular/Controllers", "*.js", true);

            bundles.Add(scriptBundle);
        }
Exemplo n.º 9
0
 private static void IncludeJQueryScripts(ScriptBundle jsBundle)
 {
     jsBundle.Include("~/Assets/Scripts/jquery/additional-methods.js");
     jsBundle.Include("~/Assets/Scripts/jquery/jquery-1.9.1.js");
     jsBundle.Include("~/Assets/Scripts/jquery/jquery-ui-1.10.3.custom.js");
     jsBundle.Include("~/Assets/Scripts/jquery/jquery.fieldSelection.js");
     jsBundle.Include("~/Assets/Scripts/jquery/jquery.fileupload.js");
     jsBundle.Include("~/Assets/Scripts/jquery/jquery.form-extensions.js");
     jsBundle.Include("~/Assets/Scripts/jquery/jquery.iframe-transport.js");
     jsBundle.Include("~/Assets/Scripts/jquery/jquery.timeago.js");
     jsBundle.Include("~/Assets/Scripts/jquery/jquery.validate.js");
 }
Exemplo n.º 10
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/Bundles/js").Include(
                "~/scripts/jquery-{version}.js",
                "~/scripts/bootstrap.js"));

            var appBundle = new ScriptBundle("~/Bundles/app").Include(
               "~/scripts/angular.js",
                "~/scripts/angular-animate.js",
                "~/scripts/angular-messages.js",
                "~/scripts/angular-resource.js",
                "~/scripts/angular-route.js",
                "~/scripts/angular-sanitize.js",
                "~/scripts/angular-ui-router.js",
                "~/scripts/angular-ui/ui-bootstrap.js",
                "~/scripts/angular-ui/ui-bootstrap-tpls.js",
                "~/Scripts/html5shiv.js",
                "~/Scripts/respond.js",
                "~/scripts/ngToast.min.js",
                "~/scripts/ngToast.min.js");

            appBundle.Include(System.Configuration.ConfigurationManager.AppSettings["UseTestData"] == "true"
                ? "~/scripts/settings-test.js"
                : "~/scripts/settings-prod.js");

            appBundle.IncludeDirectory("~/app", "*.js", true);

            bundles.Add(appBundle);

            bundles.Add(new StyleBundle("~/Bundles/css").Include(
                "~/content/bootstrap.css",
                "~/content/bootstrap2-icons.css",
                "~/content/ngToast.min.css",
                "~/content/Site.css"));
        }
Exemplo n.º 11
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            {
                bundles.UseCdn = true;

                StyleBundle siteCSS = new StyleBundle("~/Content/siteCSS");
                siteCSS.Include("~/Content/navbar_style.css",
                  "~/Content/site_style.css");
                bundles.Add(siteCSS);

                StyleBundle bootstrapCSS = new StyleBundle("~/Content/bootstrapCSS", "//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css");
                bootstrapCSS.Include("~/Content/bootstrap.min.css");
                bundles.Add(bootstrapCSS);

                StyleBundle fontawesomeCSS = new StyleBundle("~/Content/fontawesomeCSS", "//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css");
                fontawesomeCSS.Include("~/Content/font-awesome.css");
                bundles.Add(fontawesomeCSS);

                ScriptBundle siteJS = new ScriptBundle("~/Scripts/siteJS");
                siteJS.Include("~/Scripts/jquery-2.1.4.min.js", "~/Scripts/bootstrap.min.js");
                bundles.Add(siteJS);

                BundleTable.EnableOptimizations = true;
            }
        }
Exemplo n.º 12
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssBundle = new StyleBundle("~/bundle/styles").IncludeDirectory("~/css/", "*.css");
            bundles.Add(cssBundle);

            var JQWidgetsBundle = new ScriptBundle("~/bundle/scripts/widgets").IncludeDirectory("~/scripts/JQwidgets/", "*.js");
            bundles.Add(JQWidgetsBundle);

            var VueComponents = new ScriptBundle("~/bundle/scripts/VUEComponents").IncludeDirectory("~/scripts/VUEComponents/", "*.js");
            VueComponents.Transforms.Clear();
            bundles.Add(VueComponents);

            var VueComponents2 = new ScriptBundle("~/bundle/scripts/VUE_Components").IncludeDirectory("~/scripts/Vue_Components/", "*.js");
            VueComponents2.Transforms.Clear();
            bundles.Add(VueComponents2);

            var jsCommon = new ScriptBundle("~/bundle/scripts/common");
            jsCommon.Transforms.Clear();
            jsCommon.Include(new string[]{

                 "~/scripts/common/moment.js",
                 "~/scripts/common/chart.js",
                 "~/scripts/common/materialize.js",
                 "~/scripts/common/velocity.js",
                 "~/scripts/common/vue.js",
                 "~/scripts/common/VueApp.js"
            });

            bundles.Add(jsCommon);
        }
Exemplo n.º 13
0
        public static void Register(IKernel kernel)
        {
            if (!CurrentRequestData.DatabaseIsInstalled)
                return;

            foreach (IStylesheetBundle bundle in kernel.GetAll<IStylesheetBundle>())
            {
                var styleBundle = new StyleBundle(bundle.Url);
                foreach (string file in bundle.Files)
                {
                    styleBundle.Include(file);
                }
                BundleTable.Bundles.Add(styleBundle);
            }
            foreach (IScriptBundle bundle in kernel.GetAll<IScriptBundle>())
            {
                var styleBundle = new ScriptBundle(bundle.Url);
                foreach (string file in bundle.Files)
                {
                    styleBundle.Include(file);
                }
                BundleTable.Bundles.Add(styleBundle);
            }
            BundleTable.EnableOptimizations = kernel.Get<BundlingSettings>().EnableOptimisations;
        }
Exemplo n.º 14
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            var libs = new ScriptBundle("~/bundles/libs");

            libs.Include(
                "~/wwwroot/lib/jquery/dist/jquery.js",
                "~/wwwroot/lib/lodash/lodash.js",
                "~/wwwroot/lib/angular/angular.js",
                "~/wwwroot/lib/angular-ui-router/release/angular-ui-router.js",
                "~/wwwroot/lib/angular-bootstrap/ui-bootstrap-tpls.js",
                "~/wwwroot/lib/angular-local-storage/dist/angular-local-storage.js"
                );

            var app = new ScriptBundle("~/bundles/app");

            // Ensure the order is correct
            app.Include(
                "~/app/app.js",
                "~/app/Router.js"
                );

            app.IncludeDirectory("~/app/", "*.js", true);

            bundles.Add(libs);
            bundles.Add(app);
        }
Exemplo n.º 15
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            StyleBundle cssBundle = new StyleBundle("~/Content/IntelliDocsCSS");
            cssBundle.Include(
                "~/Content/bootstrap.css",
                "~/Content/font-awesome.css",
                "~/Content/jquery.auto-complete.css",
                "~/Content/IntelliDocs.css"
                );
            bundles.Add(cssBundle);

            ScriptBundle jsBundle = new ScriptBundle("~/Scripts/IntelliDocsJS");
            jsBundle.Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/jquery.form.js",
                "~/Scripts/jquery.auto-complete.js",
                "~/Scripts/bootstrap.js",
                "~/Scripts/IntelliDocs/IntelliDocs.js"
                );
            bundles.Add(jsBundle);

            ScriptBundle jqueryValBundle = new ScriptBundle("~/Scripts/jQueryVal");
            jqueryValBundle.Include(
                "~/Scripts/jquery.validate.js",
                "~/Scripts/jquery.validate.unobtrusive.js"
                );
            bundles.Add(jqueryValBundle);
        }
Exemplo n.º 16
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var frontpageAll = new ScriptBundle("~/bundles/js");

            frontpageAll.Include("~/Scripts/lib/jquery-{version}.js")
                .Include(
                    "~/Scripts/lib/jquery.ui.core.js",
                    "~/Scripts/lib/jquery.ui.widget.js",
                    "~/Scripts/lib/jquery.ui.position.js",
                    "~/Scripts/lib/jquery.ui.dialog.js",
                    "~/Scripts/lib/jquery.ui.mouse.js",
                    "~/Scripts/lib/jquery.ui.sortable.js",
                    "~/Scripts/handlebars.js")
                .Include("~/Scripts/bootstrap.js")
                .IncludeDirectory("~/Scripts/frontpage", "*.js");

            var frontpage = new NontestBundle("~/bundles/frontpage", frontpageAll);
            var frontpageTest = new TestBundle("~/bundles/frontpage-test", frontpageAll);

            bundles.Add(frontpage);
            bundles.Add(frontpageTest);

            var southStreetTheme = new StyleBundle("~/Content/themes/south-street/all.css")
                .IncludeDirectory("~/Content/themes/south-street/", "*.css")
                .Include("~/Content/bootstrap.css");

            bundles.Add(southStreetTheme);
        }
Exemplo n.º 17
0
 public static void RegisterBundles(BundleCollection bundles)
 {
     var bundle = new ScriptBundle("~/Scripts/chartup-min");
     bundle.Include("~/Scripts/charts/chart.js");
     bundle.IncludeDirectory("~/Scripts/", "*.js", true);
     bundles.Add(bundle);
 }
    public static void RegisterTylerUiComponentsBundles()
    {
      var componentUrl = "~/Scripts/tylerui/components/";
      var tylerUiComponentsJsBundle = new ScriptBundle("~/bundles/TylerUiComponentsJs");
      tylerUiComponentsJsBundle.Include(
        componentUrl + "tt-components.js",
        componentUrl + "tt-notes.js",
        componentUrl + "tt-btn-group.js",
        componentUrl + "tt-timeline.js",
        componentUrl + "tt-smooth-scroll.js",
        componentUrl + "tt-focus.js",
        componentUrl + "tt-focus-manager.js",
        componentUrl + "tt-focus-group.js",
        componentUrl + "tt-focus-container.js",
        componentUrl + "tt-focus-item.js",
        componentUrl + "tt-label-value.js",
        componentUrl + "tt-filters.js",
        componentUrl + "tt-steps.js",
        componentUrl + "tt-pagination.js",
        componentUrl + "tt-calendar.js",
        componentUrl + "tt-facet.js",
        "~/bower_components/Chart.js/Chart.js",
        "~/bower_components/angular-chart.js/angular-chart.js"
        );

      BundleTable.Bundles.Add(tylerUiComponentsJsBundle);

    }
Exemplo n.º 19
0
		// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
		public static void RegisterBundles(BundleCollection bundles)
		{
			bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
						"~/Scripts/jquery.validate*"));

			// Use the development version of Modernizr to develop with and learn from. Then, when you're
			// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
			bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
						"~/Scripts/modernizr-*"));


			var bundle = new ScriptBundle("~/bundles/app")
			{
				Orderer = new CompositionRootJsLastOrderer()
			};
			bundle.Include(
				"~/Scripts/jquery-{version}.js",
				"~/Scripts/jquery.signalr-{version}.js",
				"~/Scripts/underscore.js",
				"~/Scripts/moment.js",
				"~/Scripts/bootstrap.js",
				"~/Scripts/angular.js",
				"~/Scripts/LogR.js",
				"~/Scripts/jMess.js",
				"~/Scripts/respond.js",
				"~/App/*.js");
			bundles.Add(bundle);

			bundles.Add(new StyleBundle("~/Content/css").Include(
					  "~/Content/bootstrap.css",
					  "~/Content/site.css"));
		}
Exemplo n.º 20
0
        private static ScriptBundle IncludeCommonComponentsScripts()
        {
            var bundle = new ScriptBundle("~/bundles/common-components");
            bundle.Include("~/Scripts/Components/*.js");

            return bundle;
        }
Exemplo n.º 21
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            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/jqueryval").Include(
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/jquery.validate*"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));

            bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                        "~/Content/themes/base/jquery.ui.core.css",
                        "~/Content/themes/base/jquery.ui.resizable.css",
                        "~/Content/themes/base/jquery.ui.selectable.css",
                        "~/Content/themes/base/jquery.ui.accordion.css",
                        "~/Content/themes/base/jquery.ui.autocomplete.css",
                        "~/Content/themes/base/jquery.ui.button.css",
                        "~/Content/themes/base/jquery.ui.dialog.css",
                        "~/Content/themes/base/jquery.ui.slider.css",
                        "~/Content/themes/base/jquery.ui.tabs.css",
                        "~/Content/themes/base/jquery.ui.datepicker.css",
                        "~/Content/themes/base/jquery.ui.progressbar.css",
                        "~/Content/themes/base/jquery.ui.theme.css"));

            var mugScript = new ScriptBundle("~/bundles/mug");
            mugScript.Include("~/Scripts/knockout-2.1.0.debug.js");
            mugScript.Include("~/Scripts/mustache.js");
            mugScript.Include("~/Scripts/ko.mustache.js");
            mugScript.Include("~/Scripts/script.js");
            mugScript.IncludeDirectory("~/Scripts/ViewModel", "*.js");
            mugScript.IncludeDirectory("~/Scripts/Utils", "*.js");
            bundles.Add(mugScript);

            var bundle = new Bundle("~/Content/template");
            bundle.Transforms.Add(new TemplateTransform());
            bundle.IncludeDirectory("~/Views", "*.mustache", true);
            bundles.Add(bundle);
        }
Exemplo n.º 22
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js",
                        "~/Scripts/jquery-migrate-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                        "~/Scripts/jquery-ui-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/jquery.validate*"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            var CustomBund = new ScriptBundle("~/bundles/custom");
            CustomBund.Include("~/Scripts/jmp3.js");
            //CustomBund.Include("~/Scripts/gallery.js");
            CustomBund.Include("~/Scripts/Easing.js");
            CustomBund.Include("~/Scripts/jqFancyTransitions.1.8.js");

            bundles.Add(CustomBund);

            var Bund = new StyleBundle("~/Content/css");
            Bund.Include("~/Content/site.css");
            Bund.Include("~/Content/calendar.css");

            bundles.Add(Bund);

            bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                        "~/Content/themes/base/jquery-ui.css",
                        "~/Content/themes/base/jquery.ui.core.css",
                        "~/Content/themes/base/jquery.ui.resizable.css",
                        "~/Content/themes/base/jquery.ui.selectable.css",
                        "~/Content/themes/base/jquery.ui.accordion.css",
                        "~/Content/themes/base/jquery.ui.autocomplete.css",
                        "~/Content/themes/base/jquery.ui.button.css",
                        "~/Content/themes/base/jquery.ui.dialog.css",
                        "~/Content/themes/base/jquery.ui.slider.css",
                        "~/Content/themes/base/jquery.ui.tabs.css",
                        "~/Content/themes/base/jquery.ui.datepicker.css",
                        "~/Content/themes/base/jquery.ui.progressbar.css",
                        "~/Content/themes/base/jquery.ui.theme.css"));
        }
Exemplo n.º 23
0
        public static void Configure()
        {
            BundleTable.Bundles.IgnoreList.Clear();
            //if (!Debugger.IsAttached)
            //{
            //    BundleTable.EnableOptimizations = true;
            //}
            BundleTable.EnableOptimizations = false;
            var jsShivBundle = new ScriptBundle("~/Assets/js/compatibility");
            jsShivBundle.Include("~/Assets/js/libs/json2.js");
            jsShivBundle.Include("~/Assets/js/libs/modernizr-2.6.2.js");
            BundleTable.Bundles.Add(jsShivBundle);

            var jsBundle = new ScriptBundle("~/Assets/js/bundle");
            jsBundle.Include("~/Assets/js/jquery-2.0.3.min.js",
                "~/Assets/js/jquery-ui-1.9.0.min.js",
                "~/Assets/js/jquery.layout-latest.js",
                "~/Assets/js/lodash.compat.js",
                "~/Assets/js/bootstrap.min.js",
                "~/Assets/js/infobox.js");

            BundleTable.Bundles.Add(jsBundle);

            var ngBundle = new ScriptBundle("~/Assets/ng-libs");
            ngBundle.Include(
                "~/Assets/js/angular/angular.min.js",
                "~/Assets/js/angular/event.js",
                "~/Assets/js/angular/angular-ui-router.min.js");

            BundleTable.Bundles.Add(ngBundle);

            var appBundle = new ScriptBundle("~/Assets/app");
            appBundle.Include(
                "~/App/app.config.js",
                "~/App/app.main.js"
                );
            appBundle.IncludeDirectory("~/App", "*.js", true);
            BundleTable.Bundles.Add(appBundle);

            var cssBundle = new StyleBundle("~/Assets/css/styles");
            cssBundle.Include(
                "~/Assets/css/bootstrap.css",
                "~/Assets/css/layout-default-latest.css",
                "~/Assets/css/app.css"
                );
            BundleTable.Bundles.Add(cssBundle);
        }
Exemplo n.º 24
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;
            var cssTransformer = new StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            var cssBundle = new StyleBundle("~/bundles/css");
            cssBundle.Include("~/Content/Site.less", "~/Content/bootstrap/bootstrap.less");
            cssBundle.Transforms.Add(cssTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);

            var jqueryBundle = new ScriptBundle("~/bundles/jquery");
            jqueryBundle.Include("~/Scripts/jquery-{version}.js");
            jqueryBundle.Transforms.Add(jsTransformer);
            jqueryBundle.Orderer = nullOrderer;
            bundles.Add(jqueryBundle);

            var jqueryvalBundle = new ScriptBundle("~/bundles/jqueryval");
            jqueryvalBundle.Include("~/Scripts/jquery.validate*");
            jqueryvalBundle.Transforms.Add(jsTransformer);
            jqueryvalBundle.Orderer = nullOrderer;
            bundles.Add(jqueryvalBundle);

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.

            var modernizrBundle = new ScriptBundle("~/bundles/modernizr");
            modernizrBundle.Include("~/Scripts/modernizr-*");
            modernizrBundle.Transforms.Add(jsTransformer);
            modernizrBundle.Orderer = nullOrderer;
            bundles.Add(modernizrBundle);

            var bootstrapBundle = new ScriptBundle("~/bundles/bootstrap");
            bootstrapBundle.Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js");
            bootstrapBundle.Transforms.Add(jsTransformer);
            bootstrapBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapBundle);

            var jqueryperiodic = new ScriptBundle("~/bundles/jqueryperiodic");
            jqueryBundle.Include("~/Scripts/jquery.periodic.js");
            jqueryBundle.Transforms.Add(jsTransformer);
            jqueryBundle.Orderer = nullOrderer;
            bundles.Add(jqueryBundle);
        }
Exemplo n.º 25
0
        private static void AppBundle(BundleCollection bundles)
        {
            var app = new ScriptBundle("~/bundles/app");
     
            app.Include("~/Scripts/app/app.js");

            bundles.Add(app);
        }
Exemplo n.º 26
0
        private static void RegisterBundles(BundleCollection bundleCollection)
        {
            ///Comecando a miniicar os script
            var jQeuryBundle = new ScriptBundle("~/Bundles/jquery");

            jQeuryBundle.Include("~/Scripts/jquery-1.7.1.intellisense.js");

            bundleCollection.Add(jQeuryBundle);
        }
Exemplo n.º 27
0
        RegisterBundles(
            BundleCollection bundles)
        {
            if (bundles == null)
                throw new ArgumentNullException(nameof(bundles));

            var jqueryBundle = new ScriptBundle("~/bundles/jquery");

            jqueryBundle.Include("~/Scripts/jquery-{version}.js");
            jqueryBundle.Include("~/Scripts/jquery.validate.js");
            jqueryBundle.Include("~/Scripts/jquery.validate.unobtrusive.js");
            jqueryBundle.Include("~/Scripts/jquery.unobtrusive-ajax.js");

            bundles.Add(jqueryBundle);
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include("~/Scripts/modernizr-*"));
            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js"));
            bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/bootstrap.css", "~/Content/site.css"));
        }
Exemplo n.º 28
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;
            var cssTransformer = new StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            var cssBundle = new StyleBundle("~/bundles/css");
            cssBundle.Include("~/Content/Site.less", "~/Content/bootstrap/bootstrap.less");
            cssBundle.Transforms.Add(cssTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);

            var jqueryBundle = new ScriptBundle("~/bundles/jquery");
            jqueryBundle.Include("~/Scripts/jquery-{version}.js");
            jqueryBundle.Transforms.Add(jsTransformer);
            jqueryBundle.Orderer = nullOrderer;
            bundles.Add(jqueryBundle);

            var jqueryvalBundle = new ScriptBundle("~/bundles/jqueryval");
            jqueryvalBundle.Include("~/Scripts/jquery.validate*");
            jqueryvalBundle.Transforms.Add(jsTransformer);
            jqueryvalBundle.Orderer = nullOrderer;
            bundles.Add(jqueryvalBundle);

            var modernizrBundle = new ScriptBundle("~/bundles/modernizr");
            modernizrBundle.Include("~/Scripts/modernizr-*");
            modernizrBundle.Transforms.Add(jsTransformer);
            modernizrBundle.Orderer = nullOrderer;
            bundles.Add(modernizrBundle);

            var bootstrapBundle = new ScriptBundle("~/bundles/bootstrap");
            bootstrapBundle.Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js");
            bootstrapBundle.Transforms.Add(jsTransformer);
            bootstrapBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapBundle);

            var knockout = new ScriptBundle("~/bundles/ko");
            knockout.Include("~/Scripts/knockout-3.3.0.js");
            knockout.Include("~/Scripts/underscore.min.js");
            knockout.Transforms.Add(jsTransformer);
            knockout.Orderer = nullOrderer;
            bundles.Add(knockout);
        }
        public static void RegisterScriptBundles(BundleCollection bundles)
        {
            Bundle bundle = new ScriptBundle(ScriptsGlobal);
            bundle.Orderer = new AsIsBundleOrderer();
            bundle.Include(
                "~/Scripts/require.js",
                "~/Scripts/require.config.js");

            bundles.Add(bundle);
        }
Exemplo n.º 30
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var scriptBundle = new ScriptBundle("~/bundles/js");
            scriptBundle.Include("~/Scripts/jquery-{version}.js");
            scriptBundle.Include("~/Scripts/jquery.signalR-{version}.js");

            bundles.Add(scriptBundle);
            //bundles.Add(new ScriptBundle("~/Scripts/jquery").Include(
            //    "~/Scripts/Lib/jquery/jquery-{version}.js",
            //    "~/Scripts/Lib/jquery/jquery.*"
            //    //,"~/Scripts/Lib/jquery/jquery-ui-{version}.js"
            //    )
            //);

            //bundles.Add(new ScriptBundle("~/Scripts/knockout").Include(
            //     "~/Scripts/Lib/knockout/knockout-{version}.js",
            //     "~/Scripts/Lib/knockout/knockout-deferred-updates.js")
            //);
        }
Exemplo n.º 31
0
        /// <summary>
        /// 资源文件捆绑
        /// </summary>
        /// <remarks>
        ///  2013-11-23 22:44 Created By iceStone
        /// </remarks>
        /// <exception cref="System.Exception">
        /// 未配置/Config/Bundle.config文件
        /// </exception>
        public static void RegisterBundles(BundleCollection bundles)
        {
            var doc      = new XmlDocument();
            var settings = new XmlReaderSettings {
                IgnoreComments = true, IgnoreWhitespace = true
            };

            // var configPath = MachineHelper.MapPath(BundleConfigPath);
            if (!File.Exists(BundleConfigPath))
            {
                return;
            }

            using (var reader = XmlReader.Create(BundleConfigPath, settings))
            {
                doc.Load(reader);
            }

            XmlNode root = doc.DocumentElement;

            if (root == null)
            {
                throw new Exception(string.Format("未配置{0}文件", Config.GetString("bundle_config_file", "bundle.config")));
            }

            // Regester Style
            var styleList = root.ChildNodes[0].ChildNodes; // .SelectNodes("styles/item");

            if (styleList.Count > 0)
            {
                foreach (XmlNode node in styleList)
                {
                    string path = CheckNodeRegedit(node);
                    if (string.IsNullOrEmpty(path))
                    {
                        continue;
                    }

                    var bound = new StyleBundle(path);
                    var files = GetFilesFormNode(node);
                    if (!files.Any())
                    {
                        continue;
                    }

                    bound.Include(files.ToArray());
                    bundles.Add(bound);
                }
            }

            // Regester Script
            var scriptList = root.ChildNodes[1].ChildNodes;

            if (scriptList.Count > 0)
            {
                foreach (XmlNode node in scriptList)
                {
                    string path = CheckNodeRegedit(node);
                    if (string.IsNullOrEmpty(path))
                    {
                        continue;
                    }

                    var bound = new ScriptBundle(path);
                    var files = GetFilesFormNode(node);
                    if (!files.Any())
                    {
                        continue;
                    }

                    bound.Include(files.ToArray());
                    bundles.Add(bound);
                }
            }

            // BundleTable.EnableOptimizations = true;
        }
Exemplo n.º 32
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new StyleBundle("~/css/default.bundle.css").Include(
                            "~/js/google-code-prettify/prettify.css",
                            "~/css/bootstrap-datetimepicker.min.css",
                            "~/css/rateit.css",
                            "~/css/portal.css",
                            "~/css/timeline.css",
                            "~/css/comments.css",
                            "~/css/map.css",
                            "~/css/webforms.css",
                            "~/css/ckmenu.css",
                            "~/Areas/Search/css/facet.css",
                            "~/Areas/Search/css/search-content.css"));

            var preformBundle = new ScriptBundle("~/js/default.preform.bundle.js");

            preformBundle.Include("~/js/jquery-1.12.4.min.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/jquery-migrate-{version}.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/respond.min.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/underscore-min.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/moment-with-locales.min.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/moment-with-locales_zh-hk.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/DateFormat.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/URI.min.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/bootstrap-datetimepicker.min.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/ckeditor-basepath.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/ckeditor/ckeditor.js");                         // Skip minification. ckeditor.js is already minified and performing another minification will actually throw error.
            preformBundle.Include("~/js/antiforgerytoken.js", new JsMinifySingleItem());
            preformBundle.Include("~/js/ckoverwriteclass.js", new JsMinifySingleItem());
            preformBundle.Transforms.Clear();
            bundles.Add(preformBundle);
        }
Exemplo n.º 33
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            #region Styles

            var           styleBundle = new StyleBundle("~/client/css");
            List <string> styleList   = new List <string>
            {
                //"~/Content/client/css/site.css",
                "~/Content/map/assets/smartonclimate/css/smartonclimate.css",
                "~/Content/map/assets/ourstory/css/ourstory.css",
                "~/Content/map/assets/credits/css/credits.css",
                "~/Content/map/assets/loadingScreen/css/loadingScreen.css",
                "~/Content/map/sidepanels/smartonclimate/css/smartonclimate_sidepanel.css",
                "~/Content/map/sidepanels/ourstory/css/ourstory_sidepanel.css",
                "~/Content/map/sidepanels/credits/css/credits_sidepanel.css",
                "~/Content/map/other/videostrip/css/videostrip.css",
                "~/Content/map/other/videostrip/css/video-background.css",
                "~/Content/map/other/videostrip/css/youtube-video.css",
                "~/Content/map/assets/base/css/base.css",
                "~/Content/map/assets/base/css/socialinks.css",
                "~/Content/client/css/perfectScrollbar/css/perfect-scrollbar.css",
                "~/Content/map/assets/facesofclimate/css/facesofclimate.css",
                "~/Content/client/css/lazyYT.css"
            };

            styleBundle.Include(styleList.ToArray()).Orderer = new CustomBundleOrderer();
            styleBundle.Transforms.Add(new StyleTransformer(new YuiCssMinifier()));

            // TODO: add css transformer

            bundles.Add(styleBundle);

            #endregion

            #region Scripts

            var           scriptBundle = new ScriptBundle("~/client/js");
            List <string> scriptList   = new List <string>
            {
                // Independent modules
                "~/Content/client/js/lib/jquery-2.1.3.js",
                "~/Content/client/js/lib/lodash.js",
                "~/Content/client/js/lib/TweenMax/TweenMax.js",
                "~/Content/client/js/lib/PxLoader.js",
                "~/Content/client/js/lib/PxLoaderImage.js",


                // Dependant modules
                // Tween Max Plugins
                "~/Content/client/js/lib/perfectScrollbar/js/perfect-scrollbar.jquery.js",
                "~/Content/client/js/lib/TweenMax/TimelineMax.js",
                "~/Content/client/js/lib/TweenMax/TextPlugin.js",
                "~/Content/client/js/lib/TweenMax/ScrollToPlugin.js",
                "~/Content/client/js/lib/TweenMax/RoundPropsPlugin.js",
                "~/Content/client/js/lib/TweenMax/DirectionalRotationPlugin.js",
                "~/Content/client/js/lib/TweenMax/CSSRulePlugin.js",
                "~/Content/client/js/lib/TweenMax/ColorPropsPlugin.js",
                "~/Content/client/js/lib/TweenMax/AttrPlugin.js",
                "~/Content/client/js/lib/TweenMax/Draggable.js",

                // Youtube
                //"~/Content/client/js/lib/YT_iframe_api.js",
                "~/Content/client/js/lib/lazyYT.js",

                // Require JS Modules
                "~/Content/client/js/lib/require.js"
            };

            scriptBundle.Include(scriptList.ToArray()).Orderer = new CustomBundleOrderer();

            scriptBundle.IncludeDirectory("~/Content/client/js/modules", "*.js", true);
            scriptBundle.IncludeDirectory("~/Content/client/js/cities", "*.js", true);

            scriptBundle.Include("~/Content/client/js/common.js");

            scriptBundle.Transforms.Add(new ScriptTransformer(new YuiJsMinifier()));

            bundles.Add(scriptBundle);

            #endregion

            bundles.IgnoreList.Clear();
            BundleTable.EnableOptimizations = true;
        }
Exemplo n.º 34
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;
            var cssTransformer = new StyleTransformer();
            var jsTransformer  = new ScriptTransformer();
            var nullOrderer    = new NullOrderer();


            var cssBundle = new StyleBundle("~/bundles/css");

            cssBundle.Include("~/css/bootstrap.min.css",
                              "~/css/owl.theme.css",
                              "~/css/owl.carousel.css",
                              "~/css/jquery.vegas.min.css",
                              "~/css/animate.min.css",
                              "~/assets/icon-fonts/styles.css",
                              "~/css/pixeden-icons.css",
                              "~/css/font-awesome.css",
                              "~/css/styles.css",
                              "~/css/responsive.css"
                              );
            cssBundle.Transforms.Add(cssTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);


            var jqueryBundle = new ScriptBundle("~/bundles/jquery");

            jqueryBundle.Include(
                "~/js/wow.min.js",
                "~/js/jquery.nav.js",
                "~/js/jquery.knob.js",
                "~/js/owl.carousel.min.js",
                "~/js/smoothscroll.js",
                "~/js/jquery.vegas.min.js",
                "~/js/zerif.js"
                );
            jqueryBundle.Transforms.Add(jsTransformer);
            jqueryBundle.Orderer = nullOrderer;
            bundles.Add(jqueryBundle);

            var modernizrBundle = new ScriptBundle("~/bundles/modernizr");

            modernizrBundle.Include("~/Scripts/modernizr-*");
            modernizrBundle.Transforms.Add(jsTransformer);
            modernizrBundle.Orderer = nullOrderer;
            bundles.Add(modernizrBundle);

            var bootstrapBundle = new ScriptBundle("~/bundles/bootstrap");

            bootstrapBundle.Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js");
            bootstrapBundle.Transforms.Add(jsTransformer);
            bootstrapBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapBundle);

            bundles.Add(new StyleBundle("~/content/toastr", "http://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css")
                        .Include("~/Content/toastr.css"));

            bundles.Add(new ScriptBundle("~/bundles/toastr", "http://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js")
                        .Include("~/Scripts/toastr.js"));

            //bundles.Add(new ScriptBundle("~/bundles/jquery", "http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js")
            //  .Include("~/Scripts/jquery-2.1.3.js"));

            /*
             * var cssBundle = new StyleBundle("~/bundles/css");
             * cssBundle.Include("~/Content/Site.less", "~/Content/bootstrap/bootstrap.less");
             * cssBundle.Transforms.Add(cssTransformer);
             * cssBundle.Orderer = nullOrderer;
             * bundles.Add(cssBundle);
             *
             * var jqueryBundle = new ScriptBundle("~/bundles/jquery");
             * jqueryBundle.Include("~/Scripts/jquery-{version}.js");
             * jqueryBundle.Transforms.Add(jsTransformer);
             * jqueryBundle.Orderer = nullOrderer;
             * bundles.Add(jqueryBundle);
             *
             * var jqueryvalBundle = new ScriptBundle("~/bundles/jqueryval");
             * jqueryvalBundle.Include("~/Scripts/jquery.validate*");
             * jqueryvalBundle.Transforms.Add(jsTransformer);
             * jqueryvalBundle.Orderer = nullOrderer;
             * bundles.Add(jqueryvalBundle);
             *
             * // Use the development version of Modernizr to develop with and learn from. Then, when you're
             * // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
             *
             * var modernizrBundle = new ScriptBundle("~/bundles/modernizr");
             * modernizrBundle.Include("~/Scripts/modernizr-*");
             * modernizrBundle.Transforms.Add(jsTransformer);
             * modernizrBundle.Orderer = nullOrderer;
             * bundles.Add(modernizrBundle);
             *
             * var bootstrapBundle = new ScriptBundle("~/bundles/bootstrap");
             * bootstrapBundle.Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js");
             * bootstrapBundle.Transforms.Add(jsTransformer);
             * bootstrapBundle.Orderer = nullOrderer;
             * bundles.Add(bootstrapBundle);
             *
             *
             */
        }
Exemplo n.º 35
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            var scriptbundle = new ScriptBundle("~/Script/bundle");
            var stylebundle  = new StyleBundle("~/Content/bundle");

            scriptbundle
            // Bootstrap core JavaScript
            .Include("~/Assets/vendor/jquery/jquery.min.js")
            .Include("~/Assets/vendor/bootstrap/js/bootstrap.bundle.min.js")
            // Core plugin JavaScript
            .Include("~/Assets/vendor/jquery-easing/jquery.easing.min.js")
            // Custom scripts for all pages
            .Include("~/Assets/js/sb-admin-2.min.js")
            // Custom scripts for datatables
            .Include("~/Assets/js/demo/datatables-demo.js")
            .Include("~/Assets/vendor/datatables/jquery.dataTables.min.js")
            .Include("~/Assets/vendor/datatables/dataTables.bootstrap4.min.js");
            stylebundle
            // Custom fonts for this template
            .Include("~/Assets/vendor/fontawesome-free/css/all.min.css")
            .Include("~/Assets/vendor/fontawesome-free/css/font.css")
            // Custom styles for this template
            .Include("~/Assets/css/sb-admin-2.min.css")
            // Custom styles for datatables
            .Include("~/Assets/vendor/datatables/dataTables.bootstrap4.min.css");
            bundles.Add(scriptbundle);
            bundles.Add(stylebundle);

            // datatable
            bundles.Add(new ScriptBundle("~/bundles/datatable").Include(
                            "~/Scripts/dataTable/datatables.min.js"));
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                            "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                            "~/Scripts/jquery.validate*"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                            "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                            "~/Scripts/bootstrap.js",
                            "~/Scripts/respond.js",
                            "~/Scripts/customjs/activedatatable.js"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                            "~/Content/bootstrap.css",
                            "~/Content/bootstrap.min.css",
                            "~/Content/bootstrap.css.map",
                            "~/Content/boostrap.min.css.map",
                            "~/Content/css/font-awesome.min.css",
                            "~/Content/css/account.css",
                            "~/Content/site.css",
                            "~/Content/css/index.css"));
            bundles.Add(new StyleBundle("~/Content/Admin/css").Include(
                            "~/Content/bootstrap.css",
                            "~/Content/bootstrap.min.css",
                            "~/Content/bootstrap.css.map",
                            "~/Content/boostrap.min.css.map",
                            "~/Content/datatables.min.css",
                            "~/Content/css/font-awesome.min.css",
                            "~/Content/sb-admin.css",
                            "~/Assets/vendor/fontawesome-free/css/all.min.css",
                            "~/Assets/vendor/fontawesome-free/css/font.css",
                            "~/Assets/css/sb-admin-2.min.css"));
            bundles.Add(new ScriptBundle("~/Scripts/Admin/js").Include(
                            "~/Assets/vendor/jquery/jquery.min.js",
                            "~/Assets/vendor/bootstrap/js/bootstrap.bundle.min.js",
                            "~/Assets/vendor/jquery-easing/jquery.easing.min.js",
                            "~/Assets/js/sb-admin-2.min.js",
                            "~/Assets/vendor/chart.js/Chart.min.js",
                            "~/Assets/js/demo/chart-area-demo.js",
                            "~/Assets/js/demo/chart-pie-demo.js"));
        }
Exemplo n.º 36
0
        public virtual string GenerateScripts(UrlHelper urlHelper, ResourceLocation location, bool?bundleFiles = null)
        {
            if (!_scriptParts.ContainsKey(location) || _scriptParts[location] == null)
            {
                return("");
            }

            if (_scriptParts.Count == 0)
            {
                return("");
            }

            if (!bundleFiles.HasValue)
            {
                //use setting if not value is specified
                bundleFiles = _seoSettings.EnableJsBundling;
            }
            if (bundleFiles.Value)
            {
                var partsToBundle = _scriptParts[location]
                                    .Where(x => !x.ExcludeFromBundle)
                                    .Select(x => x.Part)
                                    .Distinct()
                                    .ToArray();
                var partsToDontBundle = _scriptParts[location]
                                        .Where(x => x.ExcludeFromBundle)
                                        .Select(x => x.Part)
                                        .Distinct()
                                        .ToArray();


                var result = new StringBuilder();

                if (partsToBundle.Length > 0)
                {
                    //IMPORTANT: Do not use bundling in web farms or Windows Azure
                    string bundleVirtualPath = GetBundleVirtualPath("~/bundles/scripts/", ".js", partsToBundle);
                    //create bundle
                    lock (s_lock)
                    {
                        var bundleFor = BundleTable.Bundles.GetBundleFor(bundleVirtualPath);
                        if (bundleFor == null)
                        {
                            var bundle = new ScriptBundle(bundleVirtualPath);
                            //bundle.Transforms.Clear();

                            //"As is" ordering
                            bundle.Orderer = new AsIsBundleOrderer();
                            //disable file extension replacements. renders scripts which were specified by a developer
                            bundle.EnableFileExtensionReplacements = false;
                            bundle.Include(partsToBundle);
                            BundleTable.Bundles.Add(bundle);
                            //we clear ignore list because System.Web.Optimization library adds ignore patterns such as "*.min", "*.debug".
                            //we think it's bad decision and should be disabled by default
                            BundleTable.Bundles.IgnoreList.Clear();
                        }
                    }

                    //parts to bundle
                    result.AppendLine(Scripts.Render(bundleVirtualPath).ToString());
                }

                //parts to do not bundle
                foreach (var path in partsToDontBundle)
                {
                    result.AppendFormat("<script src=\"{0}\" type=\"text/javascript\"></script>", urlHelper.Content(path));
                    result.Append(Environment.NewLine);
                }
                return(result.ToString());
            }
            else
            {
                //bundling is disabled
                var result = new StringBuilder();
                foreach (var path in _scriptParts[location].Select(x => x.Part).Distinct())
                {
                    result.AppendFormat("<script src=\"{0}\" type=\"text/javascript\"></script>", urlHelper.Content(path));
                    result.Append(Environment.NewLine);
                }
                return(result.ToString());
            }
        }
Exemplo n.º 37
0
        public virtual string GenerateScripts(UrlHelper urlHelper, ResourceLocation location, bool?bundleFiles = null)
        {
            if (!_scriptParts.ContainsKey(location) || _scriptParts[location] == null)
            {
                return("");
            }

            if (_scriptParts.Count == 0)
            {
                return("");
            }

            if (!bundleFiles.HasValue)
            {
                //use setting if not value is specified
                bundleFiles = _seoSettings.EnableJsBundling;
            }
            if (bundleFiles.Value)
            {
                var partsToBundle = _scriptParts[location]
                                    .Where(x => !x.ExcludeFromBundle)
                                    .Select(x => x.Part)
                                    .Distinct()
                                    .ToArray();
                var partsToDontBundle = _scriptParts[location]
                                        .Where(x => x.ExcludeFromBundle)
                                        .Select(x => x.Part)
                                        .Distinct()
                                        .ToArray();


                var result = new StringBuilder();

                if (partsToBundle.Length > 0)
                {
                    //IMPORTANT: Do not use bundling in web farms or Windows Azure
                    string bundleVirtualPath = GetBundleVirtualPath("~/bundles/scripts/", ".js", partsToBundle);
                    //System.Web.Optimization library does not support dynamic bundles yet.
                    //But we know how System.Web.Optimization library stores cached results.
                    //so let's clear the cache because we add new file references dynamically based on a page
                    //until it's officially supported in System.Web.Optimization we have to "workaround" it manually
                    //var cacheKey = (string)typeof(Bundle)
                    //    .GetMethod("GetCacheKey", BindingFlags.Static | BindingFlags.NonPublic)
                    //    .Invoke(null, new object[] { bundleVirtualPath });
                    //or use the code below
                    //TODO: ...but periodically ensure that cache key which we use is valid (decompile Bundle.GetCacheKey method)
                    //var cacheKey = "System.Web.Optimization.Bundle:" + bundleVirtualPath;

                    //if (_httpContext.Cache[cacheKey] != null)
                    //    _httpContext.Cache.Remove(cacheKey);

                    //create bundle
                    lock (s_lock)
                    {
                        var bundleFor = BundleTable.Bundles.GetBundleFor(bundleVirtualPath);
                        if (bundleFor == null)
                        {
                            var bundle = new ScriptBundle(bundleVirtualPath);
                            //bundle.Transforms.Clear();

                            //"As is" ordering
                            bundle.Orderer = new AsIsBundleOrderer();
                            //disable file extension replacements. renders scripts which were specified by a developer
                            bundle.EnableFileExtensionReplacements = false;
                            bundle.Include(partsToBundle);
                            BundleTable.Bundles.Add(bundle);
                            //we clear ignore list because System.Web.Optimization library adds ignore patterns such as "*.min", "*.debug".
                            //we think it's bad decision and should be disabled by default
                            BundleTable.Bundles.IgnoreList.Clear();
                        }
                    }

                    //parts to bundle
                    result.AppendLine(Scripts.Render(bundleVirtualPath).ToString());
                }

                //parts to do not bundle
                foreach (var path in partsToDontBundle)
                {
                    result.AppendFormat("<script src=\"{0}\" type=\"text/javascript\"></script>", urlHelper.Content(path));
                    result.Append(Environment.NewLine);
                }
                return(result.ToString());
            }
            else
            {
                //bundling is disabled
                var result = new StringBuilder();
                foreach (var path in _scriptParts[location].Select(x => x.Part).Distinct())
                {
                    result.AppendFormat("<script src=\"{0}\" type=\"text/javascript\"></script>", urlHelper.Content(path));
                    result.Append(Environment.NewLine);
                }
                return(result.ToString());
            }
        }
Exemplo n.º 38
0
        // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            //bundles.UseCdn = true;

            NullBuilder       nullBuilder       = new NullBuilder();
            StyleTransformer  styleTransformer  = new StyleTransformer();
            ScriptTransformer scriptTransformer = new ScriptTransformer();
            NullOrderer       nullOrderer       = new NullOrderer();

            // Replace a default bundle resolver in order to the debugging HTTP-handler
            // can use transformations of the corresponding bundle
            BundleResolver.Current = new CustomBundleResolver();

            //Styles
            var bundleTemplate = new StyleBundle("~/bundles/Template");

            bundleTemplate.Include("~/Content/Template/theme-default.css",
                                   "~/Content/typeahead.css");
            bundleTemplate.Builder = nullBuilder;
            bundleTemplate.Transforms.Add(styleTransformer);
            bundleTemplate.Orderer = nullOrderer;
            bundles.Add(bundleTemplate);

            var bundleContent = new StyleBundle("~/Content/css");

            bundleContent.Include(
                "~/Content/bootstrap.min.css",
                "~/Content/site.css",
                "~/Content/Template/jquery/jquery-ui.min.css",
                "~/Content/Template/jquery-confirm/jquery-confirm.min.css");
            bundleContent.Builder = nullBuilder;
            bundleContent.Transforms.Add(styleTransformer);
            bundleContent.Orderer = nullOrderer;
            bundles.Add(bundleContent);

            var bundleJQuery = new ScriptBundle("~/bundles/jquery");

            bundleJQuery.Include(
                "~/Scripts/jquery-{version}.js");
            bundleJQuery.Builder = nullBuilder;
            bundleJQuery.Transforms.Add(scriptTransformer);
            bundleJQuery.Orderer = nullOrderer;
            bundles.Add(bundleJQuery);

            var TypeHead = new ScriptBundle("~/bundles/TypeHead");

            TypeHead.Include("~/Scripts/typeahead.bundle.min.js",
                             "~/Scripts/bloodhound.min.js",
                             "~/Scripts/bloodhound.js",
                             "~/Scripts/typeahead.mvc.model.js");
            TypeHead.Builder = nullBuilder;
            TypeHead.Transforms.Add(scriptTransformer);
            TypeHead.Orderer = nullOrderer;
            bundles.Add(TypeHead);

            var bundleBootstrap = new ScriptBundle("~/bundles/bootstrap");

            bundleBootstrap.Include(
                "~/Scripts/bootstrap.min.js",
                "~/Scripts/respond.min.js");
            bundleBootstrap.Builder = nullBuilder;
            bundleBootstrap.Transforms.Add(scriptTransformer);
            bundleBootstrap.Orderer = nullOrderer;
            bundles.Add(bundleBootstrap);

            var bundleApp = new ScriptBundle("~/bundles/App");

            bundleApp.Include("~/Scripts/Template/plugins/jquery/jquery-ui.min.js",
                              "~/Scripts/Template/plugins/icheck/icheck.min.js",
                              "~/Scripts/Template/plugins/mcustomscrollbar/jquery.mCustomScrollbar.min.js",
                              "~/Scripts/Template/settings.js",
                              "~/Scripts/Template/plugins.js",
                              "~/Scripts/Template/actions.js",
                              "~/Scripts/Template/plugins/noty/jquery.noty.js",
                              "~/Scripts/Template/plugins/noty/layouts/bottomRight.js",
                              "~/Scripts/Template/plugins/noty/layouts/center.js",
                              "~/Scripts/Template/plugins/noty/layouts/top.js",
                              "~/Scripts/Template/plugins/noty/themes/default.js",
                              "~/Scripts/Template/plugins/noty/themes/relax.js",
                              "~/Scripts/Template/plugins/noty/themes/bootstrapTheme.js",
                              "~/Scripts/jquery.mask.js",
                              "~/Scripts/Template/plugins/summernote/summernote.js",
                              "~/Scripts/Template/plugins/bootstrap/bootstrap-datepicker.js",
                              "~/Scripts/Template/plugins/bootstrap/bootstrap-timepicker.min.js",
                              "~/Scripts/Template/plugins/jquery/jquery-ui.min.js",
                              "~/Scripts/Template/plugins/owl/owl.carousel.min.js",
                              "~/Scripts/Template/plugins/treeview/tree-custom.min.js",
                              "~/Scripts/Template/plugins/datatables/jquery.dataTables.min.js",
                              "~/Scripts/Template/plugins/tableexport/tableExport.js",
                              "~/Scripts/Template/plugins/tableexport/jquery.base64.js",
                              "~/Scripts/Template/plugins/datatables/dataTables.fixedColumns.min.js",
                              "~/Scripts/TestePratico.js",
                              "~/Scripts/Template/plugins/bootstrap/bootstrap-select.js",
                              "~/Scripts/Template/plugins/morris/raphael-min.js",
                              "~/Scripts/Template/plugins/morris/morris.min.js",
                              "~/Scripts/maskMoney/jquery.maskMoney.js",
                              "~/Scripts/Template/plugins/jquery-confirm/jquery-confirm.min.js");
            bundleApp.Builder = nullBuilder;
            bundleApp.Transforms.Add(scriptTransformer);
            bundleApp.Orderer = nullOrderer;
            bundles.Add(bundleApp);

            //bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
            //            "~/Scripts/jquery.validate*"));

            //bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
            //            "~/Scripts/jquery-{version}.js"));

            //bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
            //            "~/Scripts/jquery.validate*"));

            // Use a versão em desenvolvimento do Modernizr para desenvolver e aprender. Em seguida, quando estiver
            // ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                            "~/Scripts/modernizr-*"));

            //bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
            //          "~/Scripts/bootstrap.js",
            //          "~/Scripts/respond.js"));

            //bundles.Add(new StyleBundle("~/Content/css").Include(
            //          "~/Content/bootstrap.css",
            //          "~/Content/site.css"));
        }
        public static void RegisterBundles(BundleCollection bundles)
        {
            var scriptBundle = new ScriptBundle("~/Scripts/DevExtremeBundle");
            var styleBundle  = new StyleBundle("~/Content/DevExtremeBundle");

            // CLDR scripts
            scriptBundle
            .Include("~/Scripts/cldr.js")
            .Include("~/Scripts/cldr/event.js")
            .Include("~/Scripts/cldr/supplemental.js")
            .Include("~/Scripts/cldr/unresolved.js");

            // Globalize 1.x
            scriptBundle
            .Include("~/Scripts/globalize.js")
            .Include("~/Scripts/globalize/message.js")
            .Include("~/Scripts/globalize/number.js")
            .Include("~/Scripts/globalize/currency.js")
            .Include("~/Scripts/globalize/date.js");

            // jQuery
            //scriptBundle
            //    .Include("~/Scripts/jquery-2.2.3.js");

            // DevExtreme + extensions
            scriptBundle
            .Include("~/Scripts/dx.all.js")
            .Include("~/Scripts/aspnet/dx.aspnet.data.js")
            .Include("~/Scripts/aspnet/dx.aspnet.mvc.js");

            // Underscore.js, for templates
            scriptBundle
            .Include("~/Scripts/underscore.js");

            // dxVectorMap data (http://js.devexpress.com/Documentation/Guide/Data_Visualization/VectorMap/Providing_Data/#Data_for_Areas)
            //scriptBundle
            //    .Include("~/Scripts/vectormap-data/africa.js")
            //    .Include("~/Scripts/vectormap-data/canada.js")
            //    .Include("~/Scripts/vectormap-data/eurasia.js")
            //    .Include("~/Scripts/vectormap-data/europe.js")
            //    .Include("~/Scripts/vectormap-data/usa.js")
            //    .Include("~/Scripts/vectormap-data/world.js");

            // JSZip for client side export
            //scriptBundle
            //    .Include("~/Scripts/jszip.js");

            // DevExtreme
            // NOTE: see the available theme list here: http://js.devexpress.com/Documentation/Guide/Themes/Predefined_Themes/
            styleBundle
            .Include("~/Content/dx.common.css")
            .Include("~/Content/dx.light.css");


            bundles.Add(scriptBundle);
            bundles.Add(styleBundle);

#if !DEBUG
            BundleTable.EnableOptimizations = true;
#endif
        }
Exemplo n.º 40
0
        // 有关 Bundling 的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            //为了减少太多的Bundles命名,定义的CSS的Bundle为:"~/Content/css"、"~/Content/jquerytools"
            //定义的Script的Bundles为:"~/bundles/jquery"、"~/bundles/jquerytools"

            //Jquery必备的StyleBundle和ScriptBundle
            StyleBundle  css    = new StyleBundle("~/Content/css");
            ScriptBundle jquery = new ScriptBundle("~/bundles/jquery");

            jquery.Orderer = new AsIsBundleOrderer();

            #region EasyUI样式和JS文件引用
            bool useNewVersion = true;

            if (useNewVersion)
            {
                //添加Jquery EasyUI的样式
                css.Include("~/Content/JqueryEasyUI-New/themes/default/easyui.css",
                            "~/Content/JqueryEasyUI-New/themes/icon.css");

                //添加Jquery,EasyUI和easyUI的语言包的JS文件,
                jquery.Include("~/Content/JqueryEasyUI-New/jquery.min.js",
                               "~/Content/jquery.serializejson.min.js",
                               "~/Content/JqueryEasyUI-New/jquery.easyui.min.js",
                               "~/Content/JqueryEasyUI-New/locale/easyui-lang-zh_CN.js");
            }
            else
            {
                //添加Jquery EasyUI的样式
                css.Include("~/Content/JqueryEasyUI/themes/default/easyui.css",
                            "~/Content/JqueryEasyUI/themes/icon.css");

                //添加Jquery,EasyUI和easyUI的语言包的JS文件,
                jquery.Include("~/Content/JqueryEasyUI/jquery.min.js",
                               "~/Content/jquery.serializejson.min.js",
                               "~/Content/JqueryEasyUI/jquery.easyui.min.js",
                               "~/Content/JqueryEasyUI/locale/easyui-lang-zh_CN.js");
            }
            #endregion
            //执行增加的样式
            css.Include("~/Content/icons-customed/16/icon.css",
                        "~/Content/icons-customed/24/icon.css",
                        "~/Content/icons-customed/32/icon.css",
                        "~/Content/themes/Default/style.css",
                        "~/Content/themes/Default/default.css");
            //日期格式的引用
            jquery.Include("~/Content/datapattern.js");

            //扩展的StyleBundle和ScriptBundle
            StyleBundle  cssExtend    = new StyleBundle("~/Content/jquerytools");
            ScriptBundle jqueryExtend = new ScriptBundle("~/bundles/jquerytools");
            jqueryExtend.Orderer = new AsIsBundleOrderer();

            //引用EasyUI扩展
            cssExtend.Include("~/Content/JQueryTools/jQuery.easyui-extend/extend/themes/easyui.extend.css",
                              "~/Content/JQueryTools/jQuery.easyui-extend/extend/themes/icon.css");
            jqueryExtend.Include("~/Content/JQueryTools/jQuery.easyui-extend/jquery.easyui.extend.min.js");

            //引用消息提示控件jNotify
            cssExtend.Include("~/Content/JQueryTools/jNotify/jquery/jNotify.jquery.css");
            jqueryExtend.Include("~/Content/JQueryTools/jNotify/jquery/jNotify.jquery.js");

            //Tag标签的控件应用
            cssExtend.Include("~/Content/JQueryTools/Tags-Input/jquery.tagsinput.css");
            jqueryExtend.Include("~/Content/JQueryTools/Tags-Input/jquery.tagsinput.js");

            //添加对uploadify控件的支持
            cssExtend.Include("~/Content/JQueryTools/uploadify/uploadify.css");
            jqueryExtend.Include("~/Content/JQueryTools/uploadify/jquery.uploadify.js");

            //添加LODOP控件支持
            jqueryExtend.Include("~/Content/JQueryTools/LODOP/CheckActivX.js");

            //添加对ckeditor的支持
            //jqueryExtend.Include("~/Content/JQueryTools/ckeditor/ckeditor.js",
            //    "~/Content/JQueryTools/ckeditor/adapters/jquery.js");


            //其他一些辅助脚本和样式
            //1、图表JS文件应用
            bundles.Add(new ScriptBundle("~/bundles/jquerytools/highcharts").Include(
                            "~/Content/JQueryTools/Highcharts/js/highcharts.js",
                            "~/Content/JQueryTools/Highcharts/js/modules/exporting.js",
                            "~/Content/JQueryTools/Highcharts/js/themes/grid.js",
                            "~/Content/JQueryTools/Highcharts/js/highcharts-more.js",
                            "~/Content/JQueryTools/Highcharts/js/highcharts-3d.js"));



            //全部增加到集合里面去
            bundles.Add(css);
            bundles.Add(jquery);
            bundles.Add(cssExtend);
            bundles.Add(jqueryExtend);
            //BundleTable.EnableOptimizations = true;
        }
Exemplo n.º 41
0
        //Called from the Razor-Views or master page
        public static Scripts KraftScripts(this Profile profile, string moduleDepStartFile = RESOURCEDEPENDENCY_FILE_NAME)
        {
            if (!profile.HasScriptBundle(profile.Key + "-scripts"))
            {
                ScriptBundle  scriptBundle     = new ScriptBundle(profile.Key + "-scripts", new PhysicalFileProvider(_ModulesCollection.KraftGlobalConfigurationSettings.EnvironmentSettings.ContentRootPath));
                StringBuilder contentTemplates = new StringBuilder(10000);
                bool          appendDiv        = false;

                //try to get the target module
                KraftModule profileTargetModule = _ModulesCollection.GetModule(profile.Key);
                if (profileTargetModule == null)
                {
                    throw new Exception($"No CoreKraft module found for bundle target \"{profile.Key}\"!");
                }

                void Dive(KraftModule kmodule, HashSet <KraftModule> deps)
                {
                    foreach (var dep in kmodule.Dependencies)
                    {
                        Dive(dep.Value as KraftModule, deps);
                    }
                    deps.Add(kmodule);
                }

                HashSet <KraftModule> targetDeps = new HashSet <KraftModule>();
                Dive(profileTargetModule, targetDeps);
                List <KraftModule> targetDepsSorted = targetDeps.OrderBy(x => x.DependencyOrderIndex).ToList <KraftModule>();

                foreach (KraftModule kraftDepModule in targetDepsSorted)
                {
                    kraftDepModule.ConstructResources(_CachingService, _KraftGlobalConfigurationSettings, moduleDepStartFile, true);
                    if (kraftDepModule.ScriptKraftBundle != null)
                    {
                        using (KraftProfiler.Current.Step($"Time loading {kraftDepModule.Key}: "))
                        {
                            scriptBundle.Include(new KraftRequireTransformation().Process(kraftDepModule.ScriptKraftBundle, _Logger));
                        }
                    }

                    if (kraftDepModule.TemplateKraftBundle != null && kraftDepModule.TemplateKraftBundle.TemplateFiles.Count > 0)
                    {
                        if (appendDiv)
                        {
                            contentTemplates.Append(",");
                        }
                        else
                        {
                            appendDiv = true;
                        }
                        HtmlTransformation htmlTransformation = new HtmlTransformation();
                        Func <StringBuilder, ILogger, StringBuilder> minifyHtml = htmlTransformation.Process;
                        contentTemplates.Append(new KraftHtml2JsAssocArrayTransformation().Process(kraftDepModule.TemplateKraftBundle, minifyHtml, _Logger));
                    }
                }

                scriptBundle.IncludeContent("Registers.addRegister(new TemplateRegister(\"module_templates\")); Registers.getRegister(\"module_templates\").$collection= {" + contentTemplates.Append("}"));

                profile.Add(scriptBundle);
                return(profile.Scripts);
            }
            else
            {
                return(profile.Scripts);
            }
        }
Exemplo n.º 42
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;
            var cssTransformer = new StyleTransformer();
            var jsTransformer  = new ScriptTransformer();
            var nullOrderer    = new NullOrderer();

            var cssBundle = new StyleBundle("~/bundles/css");

            cssBundle.Include("~/Content/Site.less", "~/Content/bootstrap/bootstrap.less");
            cssBundle.Transforms.Add(cssTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);

            var cssRtlBundle = new StyleBundle("~/bundles/css-rtl");

            cssRtlBundle.Include("~/Content/Site.less", "~/Content/RTL-Bootstrap-Less/bootstrap.less");
            // cssRtlBundle.Include("~/Content/SiteBase.css","~/Content/css/bootstrap-rtl.css");
            cssRtlBundle.Transforms.Add(cssTransformer);
            cssRtlBundle.Orderer = nullOrderer;
            bundles.Add(cssRtlBundle);

            var jqueryBundle = new ScriptBundle("~/bundles/jquery");

            jqueryBundle.Include("~/Scripts/jquery-{version}.js");
            jqueryBundle.Transforms.Add(jsTransformer);
            jqueryBundle.Orderer = nullOrderer;
            bundles.Add(jqueryBundle);

            var jqueryvalBundle = new ScriptBundle("~/bundles/jqueryval");

            jqueryvalBundle.Include("~/Scripts/jquery.validate*");
            jqueryvalBundle.Transforms.Add(jsTransformer);
            jqueryvalBundle.Orderer = nullOrderer;
            bundles.Add(jqueryvalBundle);


            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.

            var modernizrBundle = new ScriptBundle("~/bundles/modernizr");

            modernizrBundle.Include("~/Scripts/modernizr-*");
            modernizrBundle.Transforms.Add(jsTransformer);
            modernizrBundle.Orderer = nullOrderer;
            bundles.Add(modernizrBundle);

            var bootstrapBundle = new ScriptBundle("~/bundles/bootstrap");

            bootstrapBundle.Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js");
            bootstrapBundle.Transforms.Add(jsTransformer);
            bootstrapBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapBundle);

            var bootstrapRtlBundle = new ScriptBundle("~/bundles/bootstrap-rtl");

            bootstrapRtlBundle.Include("~/Scripts/bootstrap-rtl.js", "~/Scripts/respond.js");
            bootstrapRtlBundle.Transforms.Add(jsTransformer);
            bootstrapRtlBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapRtlBundle);

            var angularBundle = new ScriptBundle("~/bundles/angular");

            angularBundle.Include("~/Scripts/angular.min.js", "~/Scripts/Graph/ng-google-chart.js", "~/Scripts/angular-ui/ui-bootstrap.min.js", "~/Scripts/angular-ui/ui-bootstrap-tpls.min.js");
            angularBundle.Transforms.Add(jsTransformer);
            angularBundle.Orderer = nullOrderer;
            bundles.Add(angularBundle);


            var myBundle = new ScriptBundle("~/bundles/my");

            myBundle.Include("~/Scripts/my/GraphLoad.js");
            myBundle.Transforms.Add(jsTransformer);
            myBundle.Orderer = nullOrderer;
            bundles.Add(myBundle);

            var cssMyBundle = new StyleBundle("~/bundles/mycss");

            cssMyBundle.Include("~/Content/countdown/countdown.css", "~/Content/sharing/Sharing.css");
            cssMyBundle.Transforms.Add(cssTransformer);
            cssMyBundle.Orderer = nullOrderer;
            bundles.Add(cssMyBundle);
        }
Exemplo n.º 43
0
        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "VIS_default",
                "VIS/{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                , new[] { "VIS.Controllers" }
                );


            StyleBundle style = new StyleBundle("~/Areas/VIS/Content/VISstyle");
            //StyleBundle styleRTL = new StyleBundle("~/Areas/VIS/Content/VISstyleRTL");

            ScriptBundle modScript = new ScriptBundle("~/Areas/VIS/Script/VISjs");

            //modScript.Include(
            //    "~/Areas/VIS/Scripts/app/native-extension.js",
            //    "~/Areas/VIS/Scripts/app/utility.js",
            //    "~/Areas/VIS/Scripts/app/logger.js",
            //    "~/Areas/VIS/Scripts/app/controls.js",
            //    "~/Areas/VIS/Scripts/app/classes.js",
            //    "~/Areas/VIS/Scripts/app/desktopmgr.js",
            //    "~/Areas/VIS/Scripts/app/viewmanager.js",
            //    "~/Areas/VIS/Scripts/app/context.js",
            //    "~/Areas/VIS/Scripts/app/i18N.js",
            //    "~/Areas/VIS/Scripts/app/role.js",
            //    "~/Areas/VIS/Scripts/app/adialog.js",
            //    "~/Areas/VIS/Scripts/app/lookup.js",
            //    "~/Areas/VIS/Scripts/app/treepanel.js",
            //    "~/Areas/VIS/Scripts/app/windowframe.js",
            //    "~/Areas/VIS/Scripts/app/controller.js",
            //    "~/Areas/VIS/Scripts/app/formframe.js",
            //    "~/Areas/VIS/Scripts/app/processframe.js",
            //    "~/Areas/VIS/Scripts/processengine/processctl.js",
            //    "~/Areas/VIS/Scripts/processengine/processinfo.js",
            //    "~/Areas/VIS/Scripts/processengine/processparameter.js",
            //    "~/Areas/VIS/Scripts/forms/form.js",
            //    "~/Areas/VIS/Scripts/app/datacontext.js",
            //    "~/Areas/VIS/Scripts/app/calloutengine.js",
            //    "~/Areas/VIS/Scripts/model/callouts.js",
            //    "~/Areas/VIS/Scripts/home/home.js",
            //    "~/Areas/VIS/Scripts/home/changeuserimage.js",
            //    "~/Areas/VIS/Scripts/home/shortcut.js",
            //    "~/Areas/VIS/Scripts/app/historymgr.js",
            //    "~/Areas/VIS/Scripts/app/secure-engine.js",
            //    "~/Areas/VIS/Scripts/app/Framework/userpreference.js",
            //    "~/Areas/VIS/Scripts/app/Framework/vimageform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/help.js",
            //    "~/Areas/VIS/Scripts/app/Framework/ini.js",
            //    "~/Areas/VIS/Scripts/app/Framework/locationform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/locatorform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/valuepreference.js",
            //    "~/Areas/VIS/Scripts/app/Framework/pattributesform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/pattributeinstance.js",
            //    "~/Areas/VIS/Scripts/app/Framework/genralattributeform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/accountform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/archiveviewer.js",
            //    "~/Areas/VIS/Scripts/app/child-dialog.js",
            //    "~/Areas/VIS/Scripts/app/Framework/chat.js",
            //    "~/Areas/VIS/Scripts/app/Framework/infomenu.js",
            //    "~/Areas/VIS/Scripts/app/Framework/infowindow.js",
            //    "~/Areas/VIS/Scripts/app/Framework/infogeneral.js",
            //    "~/Areas/VIS/Scripts/app/Framework/infoproduct.js",
            //    "~/Areas/VIS/Scripts/app/Framework/infoscanform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/attachmentform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/help.js",
            //    "~/Areas/VIS/Scripts/app/Framework/wfactivity.js",
            //    "~/Areas/VIS/Scripts/app/Framework/vdocaction.js",
            //    "~/Areas/VIS/Scripts/app/Framework/appointments.js",
            //    "~/Areas/VIS/Scripts/app/Framework/vpayment.js",
            //    "~/Areas/VIS/Scripts/app/forms/form.js",
            //    "~/Areas/VIS/Scripts/app/forms/vcreatefrom.js",
            //    "~/Areas/VIS/Scripts/app/forms/vcreatefrominvoice.js",
            //    "~/Areas/VIS/Scripts/app/forms/vcreatefromshipment.js",
            //    "~/Areas/VIS/Scripts/app/forms/vcreatefromstatement.js",
            //    "~/Areas/VIS/Scripts/app/forms/generatexmodel.js",
            //    "~/Areas/VIS/Scripts/app/forms/acctviewer.js",
            //    "~/Areas/VIS/Scripts/app/forms/vinoutgen.js",
            //    "~/Areas/VIS/Scripts/app/forms/vinvoicegen.js",
            //     "~/Areas/VIS/Scripts/app/forms/vmatch.js",
            //     "~/Areas/VIS/Scripts/app/forms/vcharge.js",
            //     "~/Areas/VIS/Scripts/app/forms/vattributegrid.js",
            //     "~/Areas/VIS/Scripts/app/forms/vpayselect.js",
            //      "~/Areas/VIS/Scripts/app/forms/vpayprint.js",
            //      "~/Areas/VIS/Scripts/app/forms/vBOMdrop.js",
            //      "~/Areas/VIS/Scripts/app/forms/vtrxmaterial.js",
            //    "~/Areas/VIS/Scripts/app/Framework/find.js",
            //    "~/Areas/VIS/Scripts/app/azoomacross.js",
            //    "~/Areas/VIS/Scripts/app/Framework/sms.js",

            //     "~/Areas/VIS/Scripts/app/arequest.js",
            //     "~/Areas/VIS/Scripts/app/Framework/vsetup.js",
            //       "~/Areas/VIS/Scripts/home/favourite.js",
            //       "~/Areas/VIS/Scripts/app/Framework/bpartner.js",
            //        "~/Areas/VIS/Scripts/app/Framework/contactInfo.js",
            //        "~/Areas/VIS/Scripts/app/favouritehelper.js",
            //     "~/Areas/VIS/Scripts/app/Framework/email.js",
            //     "~/Areas/VIS/Scripts/app/Framework/newmailformat.js",
            //     "~/Areas/VIS/Scripts/app/Framework/openmailformats.js",
            //     "~/Areas/VIS/Scripts/app/areport.js",
            //        "~/Areas/VIS/Scripts/app/Framework/attachmentHistory.js",
            //        "~/Areas/VIS/Scripts/app/Framework/recordaccessdialog.js",
            //               "~/Areas/VIS/Scripts/app/forms/vallocation.js",

            //    "~/areas/vis/scripts/app/grouprights/group.js",
            //    "~/areas/vis/scripts/app/grouprights/createuser.js",
            //    "~/areas/vis/scripts/app/grouprights/orgaccess.js",
            //    "~/areas/vis/scripts/app/grouprights/groupinfo.js",
            //    "~/areas/vis/scripts/app/grouprights/createrole.js",
            //    "~/areas/vis/scripts/app/grouprights/gmailcontactsetting.js",
            //    "~/areas/vis/scripts/app/grouprights/importcontacts.js",
            //      "~/areas/vis/scripts/app/orgstructure/orgstructure.js",
            //        "~/Areas/VIS/Scripts/app/initialize.js" // bottom one
            //       );

            //style.Include("~/Areas/VIS/Content/Site.css",
            //    "~/Areas/VIS/Content/VISAD.css",
            //    "~/Areas/VIS/Content/PrefStyle.css",
            //    "~/Areas/VIS/Content/Home.css",
            //    "~/Areas/VIS/Content/PaymentRule.css",
            //    "~/Areas/VIS/Content/Style.css",
            //    "~/Areas/VIS/Content/ClientSetup.css",
            //    "~/Areas/VIS/Content/Find.css",
            //    "~/Areas/VIS/Content/Email.css",
            //    "~/Areas/VIS/Content/VPaySelect.css",
            //     "~/Areas/VIS/Content/reportstyle.css",
            //     "~/Areas/VIS/Content/RecordAccessDialog.css",
            //    "~/Areas/VIS/Content/GroupStyle.css"
            //    );

            //styleRTL.Include("~/Areas/VIS/Content/VIS.rtl.css");

            style.Include("~/Areas/VIS/Content/VIS.all.min.css");
            modScript.Include("~/Areas/VIS/Scripts/VIS.all.min.js");

            VAdvantage.ModuleBundles.RegisterScriptBundle(modScript, "VIS", -1);
            VAdvantage.ModuleBundles.RegisterStyleBundle(style, "VIS", -1);
            //VAdvantage.ModuleBundles.RegisterRTLStyleBundle(styleRTL, "VIS", -1);
        }
Exemplo n.º 44
0
        private static void RegisterJsBundles(BundleCollection bundles)
        {
            ScriptBundle accountsBundle = new ScriptBundle("~/earn/scripts/accountsscriptBundle");

            accountsBundle.Include("~/offers/earn/content/js/configuration.js");
            accountsBundle.Include("~/offers/earn/content/js/helper.js");
            accountsBundle.Include("~/offers/earn/content/js/cookie.js");
            accountsBundle.Include("~/offers/earn/content/js/messaging.js");
            accountsBundle.Include("~/offers/earn/content/js/bouxAnalytics.js");
            accountsBundle.Include("~/offers/earn/content/js/socialPlugin.js");
            accountsBundle.Include("~/offers/earn/content/js/userServices.js");
            accountsBundle.Include("~/offers/earn/content/js/cardInfo.js");
            accountsBundle.Include("~/offers/earn/content/js/login.js");
            accountsBundle.Include("~/offers/earn/content/js/referralCodeViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/cardsControllerProxy.js");
            accountsBundle.Include("~/offers/earn/content/js/businessViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/dealViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/contactInfoViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/registeredCardsViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/localDealsViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/supportViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/settingsViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/notification.js");
            accountsBundle.Include("~/offers/earn/content/js/notificationsViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/bingMapViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/referralsViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/transactionHistoryViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/accountMainViewModel.js");
            accountsBundle.Include("~/offers/earn/content/js/enrollViewModel.js");
            bundles.Add(accountsBundle);
        }
Exemplo n.º 45
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            // bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
            //             "~/Scripts/neon/jquery-{version}.js"));

            // bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
            //             "~/Scripts/jquery.validate*"));

            // // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            // bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
            //             "~/Scripts/modernizr-*"));

            // bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
            //           "~/Scripts/neon/bootstrap.js",
            //           "~/Scripts/respond.js"));


            var bundle = new StyleBundle("~/assets/js/jquery-ui/css/no-theme/virtual.css");

            bundle.Include("~/assets/js/jquery-ui/css/no-theme/jquery-ui-1.10.3.custom.css",
                           "~/assets/js/jquery-ui/css/no-theme/jquery.ui.theme.css");
            bundles.Add(bundle);

            bundle = new StyleBundle("~/assets/css/font-icons/entypo/css/virtual.css");
            bundle.Include("~/assets/css/font-icons/entypo/css/entypo.css");
            bundles.Add(bundle);

            bundle = new StyleBundle("~/assets/css/font-icons/font-awesome/css/virtual.css");
            bundle.Include("~/assets/css/font-icons/font-awesome/css/font-awesome.css");
            bundles.Add(bundle);

            bundle = new StyleBundle("~/assets/css/virtual.css");
            bundle.Include(
                "~/assets/css/bootstrap.css",
                "~/assets/css/neon-core.css",
                "~/assets/css/neon-theme.css",
                "~/assets/css/neon-forms.css",
                "~/assets/css/custom.css",
                "~/assets/js/select2/select2.css"
                );
            bundles.Add(bundle);


            var bundle1 = new ScriptBundle("~/assests/js/virtual.js");

            bundle1.Include(
                "~/assets/js/jquery-1.11.0.min.js",
                "~/assets/js/bootstrap.js",
                "~/assets/js/neon-custom.js",
                "~/assets/js/gsap/main-gsap.js",
                "~/assets/js/jquery-ui/js/jquery-ui-1.10.3.minimal.min.js",
                "~/assets/js/joinable.js",
                "~/assets/js/resizeable.js",
                "~/assets/js/neon-api.js",
                "~/assets/js/jquery.validate.min.js",
                "~/assets/js/neon-login.js",
                "~/assets/js/neon-demo.js"
                );
            bundles.Add(bundle1);
        }
Exemplo n.º 46
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            // 20171229 wjm 删除min前缀,不然会引起资源加载不正常
            //为了减少太多的Bundles命名,定义的CSS的Bundle为:"~/Content/css"、"~/Content/jquerytools"
            //定义的Script的Bundles为:"~/bundles/jquery"、"~/bundles/jquerytools"
            StyleBundle css_metronic = new StyleBundle("~/metronic/css");

            css_metronic.Include("~/Content/metronic/assets/global/plugins/font-awesome/css/font-awesome.css",          // font-awesome.min.css
                                 "~/Content/metronic/assets/global/plugins/simple-line-icons/simple-line-icons.css",    // simple-line-icons.min.css
                                 "~/Content/metronic/assets/global/plugins/bootstrap/css/bootstrap.css",                // bootstrap.min.css
                                 "~/Content/metronic/assets/global/plugins/uniform/css/uniform.default.css",
                                 "~/Content/metronic/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.css",  // bootstrap-switch.min.css

                                 "~/Content/metronic/assets/global/plugins/bootstrap-select/bootstrap-select.css",      // bootstrap-select.min.css
                                 "~/Content/metronic/assets/global/plugins/select2/select2.css",
                                 "~/Content/metronic/assets/global/plugins/jquery-multi-select/css/multi-select.css",

                                 "~/Content/metronic/assets/global/plugins/icheck/skins/all.css",
                                 "~/Content/MyPlugins/sweetalert/dist/sweetalert.css",

                                 "~/Content/metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css",
                                 "~/Content/metronic/assets/global/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css",
                                 "~/Content/metronic/assets/global/plugins/bootstrap-modal/css/bootstrap-modal.css",

                                 "~/Content/metronic/assets/global/plugins/jstree/dist/themes/default/style.css",       // style.min.css

                                 "~/Content/metronic/assets/global/css/components-rounded.css",
                                 "~/Content/metronic/assets/global/css/plugins.css",
                                 "~/Content/metronic/assets/admin/layout2/css/layout.css",
                                 "~/Content/metronic/assets/admin/layout2/css/themes/blue.css",
                                 "~/Content/metronic/assets/admin/layout2/css/custom.css",

                                 //增加自定义图标样式
                                 "~/Content/icons-customed/16/icon.css",
                                 "~/Content/icons-customed/24/icon.css",
                                 "~/Content/icons-customed/32/icon.css"
                                 );


            ScriptBundle js_metronic = new ScriptBundle("~/metronic/js");

            js_metronic.Orderer = new AsIsBundleOrderer();                                                       //按添加先后次序排列,否则容易出现:Uncaught ReferenceError: jQuery is not defined
            js_metronic.Include(
                "~/Content/metronic/assets/global/plugins/bootstrap/js/bootstrap.js",                            // bootstrap.min.js
                "~/Content/metronic/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js", // bootstrap-hover-dropdown.min.js
                "~/Content/metronic/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.js",               // jquery.slimscroll.min.js
                "~/Content/metronic/assets/global/plugins/jquery.blockui-min.js",                                // jquery.blockui.min.js
                "~/Content/metronic/assets/global/plugins/jquery.cokie-min.js",                                  // jquery.cokie.min.js
                "~/Content/metronic/assets/global/plugins/uniform/jquery.uniform.js",                            // jquery.uniform.min.js
                "~/Content/metronic/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.js",              // bootstrap-switch.min.js

                "~/Content/metronic/assets/global/plugins/fuelux/js/spinner.js",                                 // spinner.min.js
                "~/Content/metronic/assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.js",

                "~/Content/metronic/assets/global/plugins/bootstrap-select/bootstrap-select.js",                    // bootstrap-select.min.js
                "~/Content/metronic/assets/global/plugins/select2/select2.js",                                      // select2.min.js
                "~/Content/metronic/assets/global/plugins/select2/select2_locale_zh-CN.js",
                "~/Content/metronic/assets/global/plugins/jquery-multi-select/js/jquery.multi-select.js",

                "~/Content/metronic/assets/global/plugins/datatables/media/js/jquery.dataTables.js",                // jquery.dataTables.min.js
                "~/Content/metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js",

                "~/Content/metronic/assets/global/plugins/jquery-validation/js/jquery.validate.js",                 // jquery.validate.min.js
                "~/Content/metronic/assets/global/plugins/jquery-validation/js/additional-methods.js",              // additional-methods.min.js
                "~/Content/metronic/assets/global/plugins/jquery-validation/js/localization/messages_zh.js",        // messages_zh.min.js

                "~/Content/metronic/assets/global/plugins/bootbox/bootbox-min.js",                                  // bootbox.min.js
                "~/Content/metronic/assets/global/plugins/bootstrap-modal/js/bootstrap-modalmanager.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-modal/js/bootstrap-modal.js",

                "~/Content/metronic/assets/global/plugins/jstree/dist/jstree.js",                                   // jstree.min.js
                "~/Content/metronic/assets/global/plugins/icheck/icheck.js",                                        // icheck.min.js
                "~/Content/MyPlugins/sweetalert/dist/sweetalert-dev.js",                                            // sweetalert.min.js

                "~/Content/metronic/assets/global/scripts/metronic.js",
                "~/Content/metronic/assets/admin/layout2/scripts/layout.js",
                "~/Content/metronic/assets/admin/layout2/scripts/demo.js",

                "~/Content/metronic/assets/admin/pages/scripts/table-managed.js",
                "~/Content/metronic/assets/admin/pages/scripts/ui-extended-modals.js"
                );


            //引用分页控件控件paginator
            js_metronic.Include("~/Content/MyPlugins/bootstrap-paginator/bootstrap-paginator.js");

            //引用消息提示控件toastr
            css_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-toastr/toastr.css");           // toastr.min.css
            js_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-toastr/toastr.js");             // toastr.min.js

            //引用消息提示控件jNotify
            css_metronic.Include("~/Content/JQueryTools/jNotify/jquery/jNotify.jquery.css");
            js_metronic.Include("~/Content/JQueryTools/jNotify/jquery/jNotify.jquery.js");

            //Tag标签的控件应用
            css_metronic.Include("~/Content/JQueryTools/Tags-Input/jquery.tagsinput.css");
            js_metronic.Include("~/Content/JQueryTools/Tags-Input/jquery.tagsinput.js");

            //添加对uploadify控件的支持
            css_metronic.Include("~/Content/JQueryTools/uploadify/uploadify.css");
            js_metronic.Include("~/Content/JQueryTools/uploadify/jquery.uploadify.js");

            //添加LODOP控件支持
            js_metronic.Include("~/Content/JQueryTools/LODOP/CheckActivX.js");

            //添加对bootstrap-summernote的支持
            css_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-summernote/summernote.css");
            js_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-summernote/summernote.js");     // summernote.min.js
            js_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-summernote/lang/summernote-zh-CN.js");

            //添加对bootstrap-fileinput控件的支持
            css_metronic.Include("~/Content/MyPlugins/bootstrap-fileinput/css/fileinput.css");                      // fileinput.min.css
            js_metronic.Include("~/Content/MyPlugins/bootstrap-fileinput/js/fileinput.js");                         // fileinput.min.js
            js_metronic.Include("~/Content/MyPlugins/bootstrap-fileinput/js/fileinput_locale_zh.js");

            //添加对fancybox控件的支持
            css_metronic.Include("~/Content/metronic/assets/global/plugins/fancybox/source/jquery.fancybox.css");
            css_metronic.Include("~/Content/metronic/assets/admin/pages/css/portfolio.css");
            js_metronic.Include("~/Content/metronic/assets/global/plugins/jquery-mixitup/jquery.mixitup-min.js");   // jquery.mixitup.min.js
            js_metronic.Include("~/Content/metronic/assets/global/plugins/fancybox/source/jquery.fancybox.pack.js");


            //执行增加的样式
            //css_metronic.Include("~/Content/icons-customed/16/icon.css",
            //    "~/Content/icons-customed/24/icon.css",
            //    "~/Content/icons-customed/32/icon.css",
            //    "~/Content/themes/Default/style.css",
            //    "~/Content/themes/Default/default.css");

            bundles.Add(css_metronic);
            bundles.Add(js_metronic);

            //当进行css和JS压缩处理,不过会导致图片路径有问题,停用!!
            BundleTable.EnableOptimizations = false;
        }
Exemplo n.º 47
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var Layout = IOT.MVCWebMis.Controllers.ConfigData.Layout.ToString();//可选值: layout,layout2,layout3

            //为了减少太多的Bundles命名,定义的CSS的Bundle为:"~/Content/css"、"~/Content/jquerytools"
            //定义的Script的Bundles为:"~/bundles/jquery"、"~/bundles/jquerytools"
            StyleBundle css_metronic = new StyleBundle("~/metronic/css");

            //开始全局必需样式引用
            css_metronic.Include("~/Content/metronic/assets/global/plugins/font-awesome/css/font-awesome.min.css",
                                 "~/Content/metronic/assets/global/plugins/simple-line-icons/simple-line-icons.min.css",
                                 "~/Content/metronic/assets/global/plugins/bootstrap/css/bootstrap.min.css",
                                 "~/Content/metronic/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css",

                                 #region 样式文件
                                 //开启页面样式引用
                                 "~/Content/metronic/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css",
                                 "~/Content/metronic/assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.css",
                                 "~/Content/metronic/assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css",
                                 "~/Content/metronic/assets/global/plugins/morris/morris.css",
                                 "~/Content/metronic/assets/global/plugins/fullcalendar/fullcalendar.min.css",
                                 //"~/Content/metronic/assets/global/plugins/jqvmap/jqvmap/jqvmap.css",

                                 //其他页面样式
                                 "~/Content/metronic/assets/global/plugins/bootstrap-select/css/bootstrap-select.min.css",
                                 "~/Content/metronic/assets/global/plugins/select2/css/select2.min.css",
                                 "~/Content/metronic/assets/global/plugins/select2/css/select2-bootstrap.min.css",
                                 "~/Content/metronic/assets/global/plugins/jquery-multi-select/css/multi-select.css",
                                 "~/Content/metronic/assets/global/plugins/icheck/skins/all.css",
                                 "~/Content/metronic/assets/global/plugins/bootstrap-sweetalert/sweetalert.css",
                                 "~/Content/metronic/assets/global/plugins/cubeportfolio/css/cubeportfolio.css",

                                 //引用bootstrap-table样式
                                 "~/Content/metronic/assets/global/plugins/bootstrap-table/bootstrap-table.min.css",

                                 "~/Content/metronic/assets/global/plugins/datatables/datatables.min.css",
                                 "~/Content/metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css",
                                 //"~/Content/metronic/assets/global/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css",
                                 //"~/Content/metronic/assets/global/plugins/bootstrap-modal/css/bootstrap-modal.css",
                                 "~/Content/metronic/assets/global/plugins/jstree/dist/themes/default/style.min.css",

                                 //主题全局样式
                                 "~/Content/metronic/assets/global/css/components-rounded.css",
                                 "~/Content/metronic/assets/global/css/plugins.min.css",
                                 //主题布局样式
                                 "~/Content/metronic/assets/layouts/" + Layout + "/css/layout.css",
                                 "~/Content/metronic/assets/layouts/" + Layout + "/css/themes/default.min.css",
                                 "~/Content/metronic/assets/layouts/" + Layout + "/css/custom.min.css"

                                 //增加自定义图标样式
                                 //"~/Content/icons-customed/16/icon.css",
                                 //"~/Content/icons-customed/24/icon.css",
                                 //"~/Content/icons-customed/32/icon.css"
                                 #endregion
                                 );

            ScriptBundle js_metronic = new ScriptBundle("~/metronic/js");
            js_metronic.Orderer = new AsIsBundleOrderer();//按添加先后次序排列,否则容易出现:Uncaught ReferenceError: jQuery is not defined
            js_metronic.Include(
                //核心JS插件
                "~/Content/metronic/assets/global/plugins/bootstrap/js/bootstrap.min.js",
                //"~/Content/metronic/assets/global/plugins/js.cookie.min.js", //页面已加
                "~/Content/metronic/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js",//
                "~/Content/metronic/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js",
                "~/Content/metronic/assets/global/plugins/jquery.blockui.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js",

                #region 脚本文件
                //页面级JS插件
                "~/Content/metronic/assets/global/plugins/moment.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js",
                "~/Content/metronic/assets/global/plugins/morris/morris.min.js",
                "~/Content/metronic/assets/global/plugins/morris/raphael-min.js",
                "~/Content/metronic/assets/global/plugins/counterup/jquery.waypoints.min.js",
                "~/Content/metronic/assets/global/plugins/counterup/jquery.counterup.min.js",
                "~/Content/metronic/assets/global/plugins/fullcalendar/fullcalendar.min.js",
                "~/Content/metronic/assets/global/plugins/flot/jquery.flot.min.js",
                "~/Content/metronic/assets/global/plugins/flot/jquery.flot.resize.min.js",
                "~/Content/metronic/assets/global/plugins/flot/jquery.flot.categories.min.js",
                "~/Content/metronic/assets/global/plugins/jquery-easypiechart/jquery.easypiechart.min.js",
                "~/Content/metronic/assets/global/plugins/jquery.sparkline.min.js",
                //"~/Content/metronic/assets/global/plugins/jqvmap/jqvmap/jquery.vmap.js",
                //"~/Content/metronic/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.russia.js",
                //"~/Content/metronic/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.world.js",
                //"~/Content/metronic/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.europe.js",
                //"~/Content/metronic/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.germany.js",
                //"~/Content/metronic/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.usa.js",
                //"~/Content/metronic/assets/global/plugins/jqvmap/jqvmap/data/jquery.vmap.sampledata.js",

                "~/Content/metronic/assets/global/plugins/fuelux/js/spinner.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-touchspin/bootstrap.touchspin.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-select/js/bootstrap-select.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-select/js/i18n/defaults-zh_CN.min.js",
                "~/Content/metronic/assets/global/plugins/select2/js/select2.full.min.js",
                "~/Content/metronic/assets/global/plugins/select2/js/i18n/zh-CN.js",
                "~/Content/metronic/assets/global/plugins/jquery-multi-select/js/jquery.multi-select.js",

                "~/Content/metronic/assets/global/plugins/datatables/datatables.min.js",
                "~/Content/metronic/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js",

                //引用bootstrap-table
                "~/Content/metronic/assets/global/plugins/bootstrap-table/bootstrap-table.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js",

                "~/Content/metronic/assets/global/plugins/jquery-validation/js/jquery.validate.min.js",
                "~/Content/metronic/assets/global/plugins/jquery-validation/js/additional-methods.min.js",
                "~/Content/metronic/assets/global/plugins/jquery-validation/js/localization/messages_zh.min.js",

                "~/Content/metronic/assets/global/plugins/bootbox/bootbox.min.js",
                //"~/Content/metronic/assets/global/plugins/bootstrap-modal/js/bootstrap-modalmanager.js",
                //"~/Content/metronic/assets/global/plugins/bootstrap-modal/js/bootstrap-modal.js",

                "~/Content/metronic/assets/global/plugins/jstree/dist/jstree.min.js",
                "~/Content/metronic/assets/global/plugins/icheck/icheck.min.js",
                "~/Content/metronic/assets/global/plugins/bootstrap-sweetalert/sweetalert.min.js",
                "~/Content/metronic/assets/global/plugins/cubeportfolio/js/jquery.cubeportfolio.min.js",

                "~/Content/metronic/assets/global/scripts/app.min.js",
                "~/Content/metronic/assets/pages/scripts/dashboard.min.js",
                "~/Content/metronic/assets/pages/scripts/table-datatables-managed.min.js",
                "~/Content/metronic/assets/pages/scripts/components-select2.min.js",

                //主题样式脚本
                "~/Content/metronic/assets/layouts/" + Layout + "/scripts/layout.min.js",
                "~/Content/metronic/assets/layouts/" + Layout + "/scripts/demo.min.js",
                "~/Content/metronic/assets/layouts/global/scripts/quick-sidebar.min.js",
                "~/Content/metronic/assets/layouts/global/scripts/quick-nav.min.js"
                #endregion
                );

            //引入多Tab展示插件btabs
            //css_metronic.Include("~/Content/MyPlugins/bTabs/b.tabs.css");
            //js_metronic.Include("~/Content/MyPlugins/bTabs/b.tabs.min.js");

            //引用分页控件控件paginator
            js_metronic.Include("~/Content/MyPlugins/bootstrap-paginator/bootstrap-paginator.js");

            //引用消息提示控件toastr
            css_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-toastr/toastr.min.css");
            js_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-toastr/toastr.min.js");

            //引用消息提示控件jNotify
            css_metronic.Include("~/Content/JQueryTools/jNotify/jquery/jNotify.jquery.css");
            js_metronic.Include("~/Content/JQueryTools/jNotify/jquery/jNotify.jquery.js");

            //内置标签的tagsinput控件应用
            css_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-tagsinput/bootstrap-tagsinput.css");
            js_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-tagsinput/bootstrap-tagsinput.js");

            //Tag标签的控件应用
            css_metronic.Include("~/Content/JQueryTools/Tags-Input/jquery.tagsinput.css");
            js_metronic.Include("~/Content/JQueryTools/Tags-Input/jquery.tagsinput.js");

            //添加对uploadify控件的支持
            css_metronic.Include("~/Content/JQueryTools/uploadify/uploadify.css");
            js_metronic.Include("~/Content/JQueryTools/uploadify/jquery.uploadify.js");

            //添加LODOP控件支持
            js_metronic.Include("~/Content/JQueryTools/LODOP/CheckActivX.js");

            //添加对bootstrap-summernote的支持
            css_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-summernote/summernote.css");
            js_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-summernote/summernote.min.js");
            js_metronic.Include("~/Content/metronic/assets/global/plugins/bootstrap-summernote/lang/summernote-zh-CN.min.js");

            //添加对bootstrap-fileinput控件的支持
            css_metronic.Include("~/Content/MyPlugins/bootstrap-fileinput/css/fileinput.min.css");
            js_metronic.Include("~/Content/MyPlugins/bootstrap-fileinput/js/fileinput.min.js");
            js_metronic.Include("~/Content/MyPlugins/bootstrap-fileinput/js/locales/zh.js");

            //添加对fancybox控件的支持
            css_metronic.Include("~/Content/metronic/assets/global/plugins/fancybox/source/jquery.fancybox.css");
            css_metronic.Include("~/Content/metronic/assets/pages/css/portfolio.css");
            js_metronic.Include("~/Content/metronic/assets/global/plugins/jquery-mixitup/jquery.mixitup.min.js");
            js_metronic.Include("~/Content/metronic/assets/global/plugins/fancybox/source/jquery.fancybox.pack.js");

            bundles.Add(css_metronic);
            bundles.Add(js_metronic);

            //当进行css和JS压缩处理,不过会导致图片路径有问题,停用!!
            //BundleTable.EnableOptimizations = true;
        }
Exemplo n.º 48
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.IgnoreList.Clear();

            bundles.Add(new StyleBundle("~/syspages/Css")
            {
                Orderer = new AsIsBundleOrderer()
            }
                        //zui component start
                        .Include("~/Content/Lib/zui/css/zui.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/zui/css/zui-theme.css", new CssRewriteUrlTransform())
                        //语法高亮
                        .Include("~/Content/Lib/component/codeprettify/css/prettify.css")
                        .Include("~/Content/Lib/component/codeprettify/css/atelier-dune-light.css")
                        //语法高亮
                        .Include("~/Content/Lib/zui/lib/datatable/zui.datatable.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/zui/lib/datetimepicker/datetimepicker.css", new CssRewriteUrlTransform())
                        //zui component end
                        .Include("~/Content/Lib/angularjs/angular-strap/angular-strap.min.css", new CssRewriteUrlTransform())
                        //.Include("~/Content/Lib/bootstrap-3.3.5/css/bootstrap.min.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/pnotify/pnotify.custom.min.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/component/tooltip/tooltip.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/component/jstree/themes/default/style.min.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/component/select2/select2.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/trNgGrid/trNgGrid.css", new CssRewriteUrlTransform())
                        .Include("~/App/SysPages/Global/app.css", new CssRewriteUrlTransform())
                        .IncludeDirectory("~/Content/Lib/miniabp/framework", "*.css", true)
                        .IncludeDirectory("~/Content/Lib/miniabp/auto", "*.css", true)
                        .IncludeDirectory("~/Content/Lib/miniabp/auto", "*.css", true)
                        //组织树相关css
                        .Include("~/Content/Lib/org-tree/orgChart.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/smartMenu/smartMenu.css", new CssRewriteUrlTransform())
                        //组织树相关css
                        //设计器相关

                        //共享相关
                        .IncludeDirectory("~/App/_shared/css", "*.css", true)
                        .IncludeDirectory("~/App/SysPages", "*.css", true)

                        //设计器相关
                        .IncludeDirectory("~/App/SysPages/Global", "*.css", true)
                        //延锋电子专用样式
                        .Include("~/AppPages/Css/DefaultPage.css", new CssRewriteUrlTransform()));



            var bundleGlobal = new ScriptBundle("~/syspages/js")
            {
                Orderer = new AsIsBundleOrderer()
            };

            bundleGlobal
            .Include("~/Content/Lib/jquery-1.11.3/jquery-1.11.3.js")
            //charts
            .Include("~/Content/Lib/ECharts/echarts.min.js")
            //语法高亮
            .Include("~/Content/Lib/component/codeprettify/js/prettify.js")
            .Include("~/Content/Lib/component/codeprettify/js/lang-sql.js")
            .Include("~/Content/Lib/component/sheetJs/xlsx.core.min.js")
            //语法高亮
            //zui component start
            .Include("~/Content/Lib/component/tooltip/tooltip.js")
            .Include("~/Content/Lib/zui/js/zui.js", new CssRewriteUrlTransform())
            .Include("~/Content/Lib/zui/lib/datatable/zui.datatable.js")
            //zui component end
            .Include("~/Content/Lib/lodash/lodash-3.10.1.min.js")
            .Include("~/Content/Lib/moment/moment.min.js")
            .Include("~/Content/Lib/angularjs/angular.js")
            .Include("~/Content/Lib/angularjs/angular-translate.js")
            .Include("~/Content/Lib/moment/moment-with-locales.js")
            .Include("~/Content/Lib/moment/moment-timezone-with-data.js")
            .Include("~/Content/Lib/zui/lib/datetimepicker/datetimepicker.js")
            .Include("~/Content/Lib/ng-sortable/Sortable.js")
            .Include("~/Content/Lib/ng-sortable/ng-sortable.js")

            .Include("~/Content/Lib/component/jstree/jstree.min.js")
            .Include("~/Content/Lib/component/select2/select2.js")
            .Include("~/Content/Lib/angularjs/angular-sanitize.min.js")
            .Include("~/Content/Lib/angularjs/angular-ui/angular-ui-router.min.js")
            .Include("~/Content/Lib/angularjs/angular-strap/angular-strap.js")
            .Include("~/Content/Lib/angularjs/angular-strap/angular-strap.tpl.js")
            .Include("~/Content/Lib/angularjs/angular-file-upload.min.js")
            .Include("~/Content/Lib/angularjs/angular-ui/angular-animate.min.js")
            .Include("~/Content/Lib/angularjs/angular-ui/ui-bootstrap.min.js")
            .Include("~/Content/Lib/angularjs/angular-ui/ui-bootstrap-tpls.min.js")
            .Include("~/Content/Lib/angularjs/ocLazyLoad/ocLazyLoad.min.js")
            .Include("~/Content/Lib/component/w5cvalidator/w5cvalidator.js")
            .Include("~/Content/Lib/trNgGrid/trNgGrid.js")
            .Include("~/Content/Lib/pnotify/pnotify.custom.min.js")
            .Include("~/Content/Lib/Backstretch/jquery.backstretch.min.js")
            //组织树相关js
            .Include("~/Content/Lib/smartMenu/jquery-smartMenu.js")
            .Include("~/Content/Lib/requirejs/requirejs-2.1.11.min.js")
            .Include("~/Content/Lib/zrender/zrender.min.js")
            .Include("~/Content/Lib/org-tree/orgChart.js")
            .Include("~/Content/Lib/org-tree/orgChartDirective.js")
            .Include("~/Content/Lib/SimpleExcel/simple-excel.js")
            //设计器相关
            .Include("~/Content/Lib/miniabp/framework/mabp.js")
            .IncludeDirectory("~/Content/Lib/miniabp/framework", "*.js", true)
            .IncludeDirectory("~/Content/Lib/miniabp/auto", "*.js", true)
            .Include("~/App/_shared/shared.js")
            .IncludeDirectory("~/App/_shared", "*.js", true)
            .IncludeDirectory("~/App/_form", "*.js", true)
            .Include("~/App/SysPages/app.js")
            .IncludeDirectory("~/App/SysPages", "*.js", true);

            //设计器引用js
            var designerGlobal = new ScriptBundle("~/SysDesinger/js")
            {
                Orderer = new AsIsBundleOrderer()
            };

            designerGlobal.Include("~/Content/Lib/jquery-1.11.3/jquery-1.11.3.js")
            //zui component start
            .Include("~/Content/Lib/component/tooltip/tooltip.js")
            .Include("~/Content/Lib/zui/js/zui.js", new CssRewriteUrlTransform())
            //zui component end
            .Include("~/Content/Lib/moment/moment.min.js")
            .Include("~/Content/Lib/lodash/lodash-3.10.1.min.js")
            //.Include("~/Content/Lib/bootstrap-3.3.5/bootstrap.min.js")
            .Include("~/Content/Lib/component/select2/select2.js")
            .Include("~/Content/Lib/angularjs/angular.js")
            .Include("~/Content/Lib/angularjs/angular-translate.js")
            .Include("~/Content/Lib/ng-sortable/Sortable.js")
            .Include("~/Content/Lib/ng-sortable/ng-sortable.js")
            .Include("~/Content/Lib/angularjs/angular-sanitize.min.js")
            .Include("~/Content/Lib/angularjs/angular-ui/angular-ui-router.min.js")
            .Include("~/Content/Lib/angularjs/angular-strap/angular-strap.js")
            .Include("~/Content/Lib/angularjs/angular-strap/angular-strap.tpl.js")
            .Include("~/Content/Lib/angularjs/angular-ui/angular-animate.min.js")
            .Include("~/Content/Lib/angularjs/angular-ui/ui-bootstrap.min.js")
            .Include("~/Content/Lib/angularjs/angular-ui/ui-bootstrap-tpls.min.js")
            .Include("~/Content/Lib/angularjs/ocLazyLoad/ocLazyLoad.min.js")
            .Include("~/Content/Lib/pnotify/pnotify.custom.min.js")
            .Include("~/Content/Lib/component/noslider/nouislider.js")
            .Include("~/Content/Lib/component/w5cvalidator/w5cvalidator.js")
            .Include("~/Content/Lib/component/jstree/jstree.min.js")
            .Include("~/Content/Lib/des-lib/des/js/raphael.min.js")
            .Include("~/Content/Lib/requirejs/requirejs-2.1.11.min.js")
            .Include("~/Content/Lib/zrender/zrender.min.js")
            .Include("~/Content/Lib/org-tree/orgChart.js")
            .Include("~/Content/Lib/des-lib/des/js/seajs/sea.js")
            .Include("~/Content/Lib/des-lib/des/js/seajs/seajs-text.js")
            .Include("~/Content/Lib/org-tree/orgChartDirective.js")
            .Include("~/Content/Lib/miniabp/framework/mabp.js")
            .IncludeDirectory("~/Content/Lib/miniabp/framework", "*.js", true)
            .IncludeDirectory("~/Content/Lib/miniabp/auto", "*.js", true)
            .Include("~/App/_shared/shared.js")
            .IncludeDirectory("~/App/_shared", "*.js", true)
            .IncludeDirectory("~/App/_form", "*.js", true)
            .Include("~/App/SysDesigner/app.js")
            .IncludeDirectory("~/App/SysDesigner", "*.js", true);
            //设计器Css
            bundles.Add(new StyleBundle("~/SysDesinger/Css")
            {
                Orderer = new AsIsBundleOrderer()
            }
                        .Include("~/App/_shared/css/app.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/angularjs/angular-strap/angular-strap.min.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/component/tooltip/tooltip.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/component/noslider/nouislider.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/component/select2/select2.css", new CssRewriteUrlTransform())
                        //.Include("~/Content/Lib/bootstrap-3.3.5/css/bootstrap.min.css", new CssRewriteUrlTransform())
                        //zui component start
                        .Include("~/Content/Lib/zui/css/zui.css", new CssRewriteUrlTransform())
                        .Include("~/Content/Lib/zui/css/zui-theme.css", new CssRewriteUrlTransform())
                        //zui component end
                        .Include("~/Content/Lib/des-lib/des/css/wfd.css", new CssRewriteUrlTransform())
                        .Include("~/App/_shared/css/workflowPage.css", new CssRewriteUrlTransform())
                        .IncludeDirectory("~/App/SysDesigner/Global", "*.css", true)
                        .IncludeDirectory("~/Content/Lib/miniabp/framework", "*.css", true)
                        .IncludeDirectory("~/Content/Lib/miniabp/auto", "*.css", true)
                        .Include("~/Content/Lib/component/jstree/themes/default/style.min.css", new CssRewriteUrlTransform()));

            //bundles.Add(zuiJs);
            bundles.Add(bundleGlobal);
            bundles.Add(designerGlobal);
        }
Exemplo n.º 49
0
        public virtual string GenerateScripts(UrlHelper urlHelper, ResourceLocation location, bool?bundleFiles = null)
        {
            if (!_scriptParts.ContainsKey(location) || _scriptParts[location] == null)
            {
                return("");
            }

            if (!_scriptParts.Any())
            {
                return("");
            }

            if (!bundleFiles.HasValue)
            {
                //use setting if no value is specified
                bundleFiles = _seoSettings.EnableJsBundling && BundleTable.EnableOptimizations;
            }
            if (bundleFiles.Value)
            {
                var partsToBundle = _scriptParts[location]
                                    .Where(x => !x.ExcludeFromBundle)
                                    .Select(x => x.Part)
                                    .Distinct()
                                    .ToArray();
                var partsToDontBundle = _scriptParts[location]
                                        .Where(x => x.ExcludeFromBundle)
                                        .Select(x => new  { x.Part, x.IsAsync })
                                        .Distinct()
                                        .ToArray();


                var result = new StringBuilder();

                if (partsToBundle.Length > 0)
                {
                    string bundleVirtualPath = GetBundleVirtualPath("~/bundles/scripts/", ".js", partsToBundle);
                    //create bundle
                    lock (s_lock)
                    {
                        var bundleFor = BundleTable.Bundles.GetBundleFor(bundleVirtualPath);
                        if (bundleFor == null)
                        {
                            var bundle = new ScriptBundle(bundleVirtualPath);
                            //bundle.Transforms.Clear();

                            //"As is" ordering
                            bundle.Orderer = new AsIsBundleOrderer();
                            //disable file extension replacements. renders scripts which were specified by a developer
                            bundle.EnableFileExtensionReplacements = false;
                            bundle.Include(partsToBundle);
                            BundleTable.Bundles.Add(bundle);
                        }
                    }

                    //parts to bundle
                    result.AppendLine(Scripts.Render(bundleVirtualPath).ToString());
                }

                //parts to do not bundle
                foreach (var item in partsToDontBundle)
                {
                    result.AppendFormat("<script {2}src=\"{0}\" type=\"{1}\"></script>", urlHelper.Content(item.Part), MimeTypes.TextJavascript, item.IsAsync ? "async " : "");
                    result.Append(Environment.NewLine);
                }
                return(result.ToString());
            }
            else
            {
                //bundling is disabled
                var result = new StringBuilder();
                foreach (var item in _scriptParts[location].Select(x => new { x.Part, x.IsAsync }).Distinct())
                {
                    result.AppendFormat("<script {2}src=\"{0}\" type=\"{1}\"></script>", urlHelper.Content(item.Part), MimeTypes.TextJavascript, item.IsAsync ? "async ":"");
                    result.Append(Environment.NewLine);
                }
                return(result.ToString());
            }
        }
Exemplo n.º 50
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var isDebug = ((CompilationSection)ConfigurationManager.GetSection("system.web/compilation")).Debug; //&& !BundleTable.EnableOptimizations;

            BundleTable.EnableOptimizations = !isDebug;

            #region Angular App
            ScriptBundle angularBundleScript = new ScriptBundle("~/Dist/angularApp");
            angularBundleScript.IncludeDirectory("~/App", "*.js");
            angularBundleScript.IncludeDirectory("~/App/services", "*.js");
            angularBundleScript.IncludeDirectory("~/App/directives", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/registry", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/process", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/parameter", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/alarm", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/processMacro", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/processInstance", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/device", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/deviceErrorLog", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/geolocation", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/alarmFired", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/layout", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/alarmMetric", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/user", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/role", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/areaPaziente", "*.js");
            angularBundleScript.IncludeDirectory("~/App/controllers/healthRisk", "*.js");

            bundles.Add(angularBundleScript);
            #endregion

            #region Angular Template cache
            // Add the templates for the app
            var appModuleTemplateCacheBundle = new AngularTemplatesBundle("app", "~/Dist/templates/app").IncludeDirectory("~/App/templates/", "*.html", true);

            bundles.Add(appModuleTemplateCacheBundle);
            #endregion

            #region Stylesheet
            StyleBundle bundleCss = new StyleBundle("~/Dist/css");

            //Custom / Modules css

            bundleCss.Include("~/Content/node_modules/angular-toastr/dist/angular-toastr.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/node_modules/animate/animate.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/node_modules/ng-table/bundles/ng-table.min.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/node_modules/angular-loading-bar/build/loading-bar.css", new CssRewriteUrlTransformWrapper());

            //Metronic css
            bundleCss.Include("~/Content/metronic/assets/global/plugins/simple-line-icons/simple-line-icons.min.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/global/plugins/bootstrap/css/bootstrap.min.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/global/plugins/uniform/css/uniform.default.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/global/css/components-rounded.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/global/css/plugins.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/admin/layout4/css/layout.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/admin/layout4/css/themes/light.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/admin/pages/css/login-soft.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/admin/pages/css/pricing-table.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/admin/pages/css/pricing-tables.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/admin/pages/css/profile.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/admin/pages/css/tasks.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/metronic/assets/admin/pages/css/timeline.css", new CssRewriteUrlTransformWrapper());

            //Kendo/Telerik css
            bundleCss.Include("~/Content/kendo/css/kendo.common-bootstrap.min.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/kendo/css/kendo.bootstrap.min.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/kendo/css/kendo.dataviz.min.css", new CssRewriteUrlTransformWrapper());
            bundleCss.Include("~/Content/kendo/css/kendo.dataviz.bootstrap.min.css", new CssRewriteUrlTransformWrapper());

            //App css
            bundleCss.Include("~/Content/app/css/app.css", new CssRewriteUrlTransformWrapper());
            bundles.Add(bundleCss);
            #endregion

            #region Javascript
            ScriptBundle bundleScript = new ScriptBundle("~/Dist/js");


            //Custom node_modules
            //Metronic Core plugins
            bundleScript.Include("~/Content/metronic/assets/global/plugins/respond.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/excanvas.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/jquery.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/jquery-migrate.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/jquery-ui/jquery-ui.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/bootstrap/js/bootstrap.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/jquery.blockui.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/jquery.cokie.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/uniform/jquery.uniform.min.js");
            bundleScript.Include("~/Content/metronic/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js");

            bundleScript.Include("~/Content/node_modules/angular/angular.js");
            bundleScript.Include("~/Content/node_modules/angular-animate/angular-animate.min.js");
            bundleScript.Include("~/Content/node_modules/angular-ui-router/release/angular-ui-router.js");
            bundleScript.Include("~/Content/node_modules/angular-toastr/dist/angular-toastr.tpls.js");
            bundleScript.Include("~/Content/node_modules/ng-table/bundles/ng-table.min.js");
            bundleScript.Include("~/Content/node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js");
            bundleScript.Include("~/Content/node_modules/linq/linq.js");
            bundleScript.Include("~/Content/node_modules/angular-loading-bar/build/loading-bar.min.js");
            bundleScript.Include("~/Content/node_modules/moment/moment.js");
            bundleScript.Include("~/Content/node_modules/ng-file-upload/dist/ng-file-upload.min.js");
            bundleScript.Include("~/Content/ngAutocomplete.js");

            bundleScript.Include("~/Content/igcom/js/igcom-framework.js");
            bundleScript.Include("~/Content/igcom/js/igcom-zeus.js");

            bundleScript.Include("~/Content/metronic/assets/global/scripts/metronic.js");
            bundleScript.Include("~/Content/metronic/assets/admin/layout4/scripts/layout.js");
            bundleScript.Include("~/Content/metronic/assets/admin/layout4/scripts/demo.js");
            bundleScript.Include("~/Content/metronic/assets/admin/pages/scripts/index3.js");
            bundleScript.Include("~/Content/metronic/assets/admin/pages/scripts/tasks.js");
            bundleScript.Include("~/Content/metronic/assets/admin/pages/scripts/login-soft.js");

            //Ionic app
            //bundleScript.Include("~/Ionic/www/app/app.js");

            bundles.Add(bundleScript);

            #endregion

            #region KendoUi
            ScriptBundle bundleKendoScript = new ScriptBundle("~/Dist/kendoUi");

            bundleKendoScript.Include("~/Content/kendo/js/kendo.all.min.js");
            bundleKendoScript.Include("~/Content/kendo/js/cultures/kendo.culture.it-IT.min.js");
            //bundleKendoScript.Include("~/Content/telerik/reportViewer/js/telerikReportViewer-10.1.16.504.js");
            //bundleKendoScript.Include("~/Content/kendo/js/messages/kendo.messages.it-IT.min.js");
            //bundleKendoScript.Include("~/Content/kendo/js/cultures/kendo.culture.de-DE.min.js");
            //bundleKendoScript.Include("~/Content/kendo/js/messages/kendo.messages.de-DE.js");
            bundles.Add(bundleKendoScript);
            #endregion
        }
Exemplo n.º 51
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;
            var jqueryuicss = new StyleBundle("~/Content/jqueryui",
                                              "//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css");

            jqueryuicss.Include("~/Content/themes/smoothness/jquery-ui-1.10.2.custom.css");
            bundles.Add(jqueryuicss);

            var datatablescss = new StyleBundle("~/Content/datatable",
                                                "//ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css");

            datatablescss.Include("~/Content/jquery.dataTables.css");
            bundles.Add(datatablescss);

            var bootstrapcss = new StyleBundle("~/Content/bootstrapcss",
                                               "//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css");

            bootstrapcss.Include("~/Content/bootstrap.css");
            bundles.Add(bootstrapcss);

            var angularuicss = new StyleBundle("~/Content/angularuicss",
                                               "//cdnjs.cloudflare.com/ajax/libs/angular-ui/0.4.0/angular-ui.min.css");

            angularuicss.Include("~/Content/angular-ui.css");
            bundles.Add(angularuicss);

            var pickacolorcss = new StyleBundle("~/Content/pickacolorcss",
                                                "//cdn.jsdelivr.net/jquery.pick-a-color/1.1.7/css/pick-a-color-1.1.7.min.css");

            pickacolorcss.Include("~/Content/pick-a-color-1.1.8.min.css");
            bundles.Add(pickacolorcss);

            var select2Css = new StyleBundle("~/Content/select2",
                                             "//cdnjs.cloudflare.com/ajax/libs/select2/3.4.5/select2.css");

            select2Css.Include("~/Content/css/select2.css");
            bundles.Add(select2Css);

            var googlefontscss = new StyleBundle("~/Content/googlefonts", "//fonts.googleapis.com/css?family=Open+Sans:400,600,700");

            googlefontscss.Include("~/Content/googlefonts.css");
            bundles.Add(googlefontscss);

            var zendeskcss = new StyleBundle("~/Content/zendesk", "//assets.zendesk.com/external/zenbox/v2.6/zenbox.css");

            zendeskcss.Include("~/Content/zenbox.css");
            bundles.Add(zendeskcss);

            bundles.Add(new StyleBundle("~/Content/landing").Include(
                            "~/Content/stylesheets/landing.css"));
            bundles.Add(new StyleBundle("~/Content/census").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/jquery.mCustomScrollbar.css",
                            "~/Content/stylesheets/census.css"));
            bundles.Add(new StyleBundle("~/Content/checklist").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/stylesheets/checklist.css"));
            bundles.Add(new StyleBundle("~/Content/comparison").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/stylesheets/comparison.css",
                            "~/Content/jquery.mCustomScrollbar.css",
                            "~/Content/crumbselector.css"));
            bundles.Add(new StyleBundle("~/Content/costcentre").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/jquery.mCustomScrollbar.css",
                            "~/Content/stylesheets/costcentre.css"));
            bundles.Add(new StyleBundle("~/Content/dashboard").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/stylesheets/dashboard.css",
                            "~/Content/jquery.mCustomScrollbar.css",
                            "~/Content/crumbselector.css"));
            bundles.Add(new StyleBundle("~/Content/editsource").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/stylesheets/editsource.css"));
            bundles.Add(new StyleBundle("~/Content/input").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/stylesheets/input.css"));
            bundles.Add(new StyleBundle("~/Content/inputhistory").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/stylesheets/inputhistory.css"));
            bundles.Add(new StyleBundle("~/Content/overviewreport").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/stylesheets/overviewreport.css"));
            bundles.Add(new StyleBundle("~/Content/target").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/jquery.mCustomScrollbar.css",
                            "~/Content/crumbselector.css",
                            "~/Content/stylesheets/target.css"));
            bundles.Add(new StyleBundle("~/Content/tracesource").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/jquery.mCustomScrollbar.css",
                            "~/Content/crumbselector.css",
                            "~/Content/stylesheets/tracesource.css"));
            bundles.Add(new StyleBundle("~/Content/variance").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/jquery.mCustomScrollbar.css",
                            "~/Content/stylesheets/variance.css"));
            bundles.Add(new StyleBundle("~/Content/uploadfile").Include(
                            "~/Content/stylesheets/layout.css",
                            "~/Content/jquery.mCustomScrollbar.css",
                            "~/Content/stylesheets/uploadfile.css"));
            bundles.Add(new StyleBundle("~/Content/dashboardprint").Include(
                            "~/Content/stylesheets/printlayout.css",
                            "~/Content/stylesheets/dashboard.css"));
            bundles.Add(new StyleBundle("~/Content/overviewreportprint").Include(
                            "~/Content/stylesheets/printlayout.css",
                            "~/Content/stylesheets/overviewreport.css"));

            var zenbox = new ScriptBundle("~/Scripts/zendesk", "//assets.zendesk.com/external/zenbox/v2.6/zenbox.js");

            zenbox.Include("~/Scripts/zenbox.js");
            zenbox.CdnFallbackExpression = "window.Zenbox";
            bundles.Add(zenbox);

            var jquery = new ScriptBundle("~/Scripts/jquery", "//code.jquery.com/jquery-1.10.2.min.js");

            jquery.Include("~/Scripts/jquery-{version}.js");
            jquery.CdnFallbackExpression = "window.jQuery";
            bundles.Add(jquery);

            var jqueryui = new ScriptBundle("~/Scripts/jqueryui", "//code.jquery.com/ui/1.10.3/jquery-ui.min.js");

            jqueryui.Include("~/Scripts/jquery-ui-{version}.js");
            jqueryui.CdnFallbackExpression = "window.jQuery.ui";
            bundles.Add(jqueryui);

            var mousewheel = new ScriptBundle("~/Scripts/mousewheel",
                                              "//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js");

            mousewheel.Include("~/Scripts/jquery.mousewheel.js");
            mousewheel.CdnFallbackExpression = "window.jQuery.fn.mousewheel";
            bundles.Add(mousewheel);

            var jqueryvalidate = new ScriptBundle("~/Scripts/jqueryvalidate",
                                                  "//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js");

            jqueryvalidate.Include("~/Scripts/jquery.validate.js");
            jqueryvalidate.CdnFallbackExpression = "window.jQuery.fn.validate";
            bundles.Add(jqueryvalidate);

            var tinycolorjs = new ScriptBundle("~/Scripts/tinycolorjs", "//cdn.jsdelivr.net/tinycolor/0.9.16/tinycolor-min.js");

            tinycolorjs.Include("~/Scripts/tinycolor.js");
            tinycolorjs.CdnFallbackExpression = "window.tinycolor";
            bundles.Add(tinycolorjs);

            var bootstrap = new ScriptBundle("~/Scripts/bootstrap", "//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js");

            bootstrap.Include("~/Scripts/bootstrap.js");
            bootstrap.CdnFallbackExpression = "window.jQuery.fn.popover";
            bundles.Add(bootstrap);

            var fileapishim = new ScriptBundle("~/Scripts/fileapishim",
                                               "//cdn.jsdelivr.net/angular.file-upload/1.1.11/angular-file-upload-shim.min.js");

            fileapishim.Include("~/Scripts/angular-file-upload-shim.min.js");
            fileapishim.CdnFallbackExpression = "window.XMLHttpRequest.__isShim";
            bundles.Add(fileapishim);

            var highcharts = new ScriptBundle("~/Scripts/charts", "//code.highcharts.com/highcharts.js");

            highcharts.Include("~/Scripts/highcharts/highcharts.js");
            highcharts.CdnFallbackExpression = "window.jQuery.fn.highcharts";
            bundles.Add(highcharts);

            var datatable = new ScriptBundle("~/Scripts/datatable",
                                             "//ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js");

            datatable.Include("~/Scripts/DataTables-1.9.4/media/js/jquery.dataTables.js");
            datatable.CdnFallbackExpression = "window.jQuery.fn.dataTable";
            bundles.Add(datatable);

            var angular = new ScriptBundle("~/Scripts/angular",
                                           "//ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js");

            angular.Include("~/Scripts/angular.js");
            angular.CdnFallbackExpression = "window.angular";
            bundles.Add(angular);

            var select2 = new ScriptBundle("~/Scripts/select2",
                                           "///cdnjs.cloudflare.com/ajax/libs/select2/3.4.5/select2.min.js");

            select2.Include("~/Scripts/select2.js");
            select2.CdnFallbackExpression = "window.jQuery.fn.select2";
            bundles.Add(select2);

            var unobtrusive = new ScriptBundle("~/Scripts/unobtrusive",
                                               "//ajax.aspnetcdn.com/ajax/mvc/5.0/jquery.validate.unobtrusive.min.js");

            unobtrusive.Include("~/Scripts/jquery.validate.unobtrusive.js");
            unobtrusive.CdnFallbackExpression = "window.jQuery.validator.unobtrusive";
            bundles.Add(unobtrusive);

            var pickacolorjs = new ScriptBundle("~/Scripts/pickacolorjs", "//cdn.jsdelivr.net/jquery.pick-a-color/1.1.8/pick-a-color.min.js");

            pickacolorjs.Include("~/Scripts/pick-a-color.js");
            pickacolorjs.CdnFallbackExpression = "window.jQuery.fn.pickAColor";
            bundles.Add(pickacolorjs);

            var angularuijs = new ScriptBundle("~/Scripts/angularuijs",
                                               "//cdnjs.cloudflare.com/ajax/libs/angular-ui/0.4.0/angular-ui.min.js");

            angularuijs.Include("~/Scripts/angular-ui.js");
            angularuijs.CdnFallbackExpression = "window.angular.module('ui')";
            bundles.Add(angularuijs);

            var fileapi = new ScriptBundle("~/Scripts/fileapi",
                                           "//cdn.jsdelivr.net/angular.file-upload/1.1.11/angular-file-upload.min.js");

            fileapi.Include("~/Scripts/angular-file-upload.js");
            fileapi.CdnFallbackExpression = "window.angular.module('angularFileUpload')";
            bundles.Add(fileapi);

            var uibootstrap = new ScriptBundle("~/Scripts/uibootstrap",
                                               "//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap-tpls.min.js");

            uibootstrap.Include("~/Scripts/ui-bootstrap-tpls-0.10.0.js");
            uibootstrap.CdnFallbackExpression = "window.angular.module('ui.bootstrap')";
            bundles.Add(uibootstrap);

            var angularResource = new ScriptBundle("~/Scripts/angular-resource",
                                                   "//ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular-resource.min.js");

            angularResource.Include("~/Scripts/angular-resource.js");
            angularResource.CdnFallbackExpression = "window.angular.module('ngResource')";
            bundles.Add(angularResource);

            var angularRoute = new ScriptBundle("~/Scripts/angular-route",
                                                "//ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular-route.min.js");

            angularRoute.Include("~/Scripts/angular-route.js");
            angularRoute.CdnFallbackExpression = "window.angular.module('ngRoute')";
            bundles.Add(angularRoute);

            var angularSanitize = new ScriptBundle("~/Scripts/angular-sanitize",
                                                   "//ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular-sanitize.min.js");

            angularSanitize.Include("~/Scripts/angular-sanitize.js");
            angularSanitize.CdnFallbackExpression = "window.angular.module('ngSanitize')";
            bundles.Add(angularSanitize);

            var angularanimate = new ScriptBundle("~/Scripts/angularanimate",
                                                  "//ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular-animate.min.js");

            angularanimate.Include("~/Scripts/angular-animate.js");
            angularanimate.CdnFallbackExpression = "window.angular.module('ngAnimate')";
            bundles.Add(angularanimate);

            bundles.Add(new ScriptBundle("~/Scripts/login").Include(
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/Views/Account/login.js"));
            bundles.Add(new ScriptBundle("~/Scripts/census").Include(
                            "~/Scripts/datefix.js",
                            "~/Scripts/jquery.mCustomScrollbar.js",
                            "~/Scripts/directives/customscroller.js",
                            "~/Scripts/directives/hoverclass.js",
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/controllers/census.js"));
            bundles.Add(new ScriptBundle("~/Scripts/checklist").Include(
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/controllers/checklist.js"));
            bundles.Add(new ScriptBundle("~/Scripts/comparison").Include(
                            "~/Scripts/datefix.js",
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/jquery.mCustomScrollbar.js",
                            "~/Scripts/crumbselector/crumbselector.js",
                            "~/Scripts/angular-highcharts.js",
                            "~/Scripts/directives/crumbselector.js",
                            "~/Scripts/directives/hoverclass.js",
                            "~/Scripts/controllers/comparison.js"));
            bundles.Add(new ScriptBundle("~/Scripts/costcentre").Include(
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/jquery.mCustomScrollbar.js",
                            "~/Scripts/angular-nested-sortable.js",
                            "~/Scripts/directives/customscroller.js",
                            "~/Scripts/directives/select2.js",
                            "~/Scripts/directives/pickacolor.js",
                            "~/Scripts/controllers/costcentre.js"));
            bundles.Add(new ScriptBundle("~/Scripts/dashboard").Include(
                            "~/Scripts/datefix.js",
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/jquery.mCustomScrollbar.js",
                            "~/Scripts/crumbselector/crumbselector.js",
                            "~/Scripts/angular-highcharts.js",
                            "~/Scripts/filters/dashboard.js",
                            "~/Scripts/directives/crumbselector.js",
                            "~/Scripts/directives/hoverclass.js",
                            "~/Scripts/directives/customscroller.js",
                            "~/Scripts/directives/dashboard.js",
                            "~/Scripts/controllers/dashboard.js"));
            bundles.Add(new ScriptBundle("~/Scripts/viewseditsourceindex").Include(
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/DataTables-1.9.4/extras/Scroller/media/js/dataTables.scroller.min.js",
                            "~/Scripts/Views/EditSource/index.js"));
            bundles.Add(new ScriptBundle("~/Scripts/input").Include(
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/directives/select2.js",
                            "~/Scripts/directives/hoverclass.js",
                            "~/Scripts/controllers/input.js"));
            bundles.Add(new ScriptBundle("~/Scripts/viewsinputindex").Include(
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/DataTables-1.9.4/extras/Scroller/media/js/dataTables.scroller.min.js",
                            "~/Scripts/Views/Input/index.js"));
            bundles.Add(new ScriptBundle("~/Scripts/overviewreport").Include(
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/directives/hoverclass.js",
                            "~/Scripts/controllers/overviewreport.js"));
            bundles.Add(new ScriptBundle("~/Scripts/target").Include(
                            "~/Scripts/datefix.js",
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/jquery.mCustomScrollbar.js",
                            "~/Scripts/crumbselector/crumbselector.js",
                            "~/Scripts/directives/select2.js",
                            "~/Scripts/directives/customscroller.js",
                            "~/Scripts/directives/crumbselector.js",
                            "~/Scripts/directives/hoverclass.js",
                            "~/Scripts/controllers/target.js"));
            bundles.Add(new ScriptBundle("~/Scripts/tracesource").Include(
                            "~/Scripts/datefix.js",
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/DataTables-1.9.4/extras/Scroller/media/js/dataTables.scroller.min.js",
                            "~/Scripts/jquery.mCustomScrollbar.js",
                            "~/Scripts/crumbselector/crumbselector.js",
                            "~/Scripts/directives/crumbselector.js",
                            "~/Scripts/directives/customscroller.js",
                            "~/Scripts/controllers/tracesource.js"));
            bundles.Add(new ScriptBundle("~/Scripts/variance").Include(
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/jquery.mCustomScrollbar.js",
                            "~/Scripts/directives/select2.js",
                            "~/Scripts/directives/customscroller.js",
                            "~/Scripts/directives/hoverclass.js",
                            "~/Scripts/controllers/variance.js"));
            bundles.Add(new ScriptBundle("~/Scripts/upload").Include(
                            "~/Scripts/customzendesk.js",
                            "~/Scripts/jquery.mCustomScrollbar.js",
                            "~/Scripts/directives/customscroller.js",
                            "~/Scripts/controllers/upload.js"));
        }
Exemplo n.º 52
0
        public static void Register(BundleCollection bundles)
        {
            var estilos = new StyleBundle("~/css/estilos");

            BundleTable.EnableOptimizations = false;

            estilos.Orderer = new AsIsBundleOrderer();

            bundles.Add(
                estilos.Include(
                    "~/Content/bootstrap.css",
                    "~/Content/bootstrap-theme.css",
                    "~/Content/Site.css",
                    "~/css/font-awesome.css",
                    "~/css/prettify.min.css",
                    "~/Content/bootstrap-duallistbox.css",
                    "~/Content/datatables.css",
                    "~/Content/AutoFill-2.1.1/css/autoFill.bootstrap.css",
                    "~/Content/Buttons-1.1.2/css/buttons.bootstrap.css",
                    "~/Content/Chartist/chartist.css",
                    "~/Content/ColReorder-1.3.1/css/colReorder.bootstrap.css",
                    "~/Content/FixedColumns-3.2.1/css/fixedColumns.bootstrap.css",
                    "~/Content/FixedHeader-3.1.1/css/fixedHeader.bootstrap.css",
                    "~/Content/KeyTable-2.1.1/css/keyTable.bootstrap.css",
                    "~/Content/Responsive-2.0.2/css/responsive.bootstrap.css",
                    "~/Content/RowReorder-1.1.1/css/rowReorder.bootstrap.css",
                    "~/Content/Scroller-1.4.1/css/scroller.bootstrap.css",
                    "~/Content/Select-1.1.2/css/select.bootstrap.css",
                    "~/Content/custom.css",
                    "~/Content/bootstrap-datetimepicker.css",
                    "~/Scripts/select2/select2.css",
                    "~/Scripts/select2/select2-bootstrap.css"
                    ));

            var scripts = new ScriptBundle("~/javascript");

            scripts.Orderer = new AsIsBundleOrderer();

            bundles.Add(
                scripts
                .Include("~/Scripts/modernizr-{version}.js",
                         "~/Scripts/moment-with-locales.js",
                         "~/Scripts/jquery-{version}.js",
                         "~/Scripts/bootstrap.js",
                         "~/Scripts/jquery.metisMenu.js",
                         "~/Scripts/custom.js",
                         "~/Scripts/bootstrap-datetimepicker.js",
                         "~/Scripts/jquery.validate.js",
                         "~/Scripts/jquery.validate.unobtrusive.js",
                         "~/Scripts/jquery.unobtrusive-ajax.js",
                         "~/Scripts/additional-methods.js",
                         "~/Scripts/jvalidator-methods-number.js",
                         "~/Scripts/jquery.validate.bootstrap-config.js",
                         "~/Scripts/methods_pt.js",
                         "~/Scripts/messages_pt_BR.js",
                         "~/Scripts/seed.jquery.validation.js",
                         "~/Scripts/datatables.js",
                         "~/Scripts/AutoFill-2.1.1/js/dataTables.autoFill.js",
                         "~/Scripts/AutoFill-2.1.1/js/autoFill.bootstrap.js",
                         "~/Scripts/Buttons-1.1.2/js/dataTables.buttons.js",
                         "~/Scripts/Buttons-1.1.2/js/buttons.print.js",
                         "~/Scripts/Buttons-1.1.2/js/buttons.html5.js",
                         "~/Scripts/Buttons-1.1.2/js/buttons.flash.js",
                         "~/Scripts/Buttons-1.1.2/js/buttons.colVis.js",
                         "~/Scripts/Buttons-1.1.2/js/buttons.bootstrap.js",
                         "~/Scripts/ColReorder-1.3.1/js/dataTables.colReorder.js",
                         "~/Scripts/DataTables-1.10.11/js/jquery.dataTables.js",
                         "~/Scripts/DataTables-1.10.11/js/dataTables.bootstrap.js",
                         "~/Scripts/FixedColumns-3.2.1/js/dataTables.fixedColumns.js",
                         "~/Scripts/FixedHeader-3.1.1/js/dataTables.fixedHeader.js",
                         "~/Scripts/KeyTable-2.1.1/js/dataTables.keyTable.js",
                         "~/Scripts/Responsive-2.0.2/js/dataTables.responsive.js",
                         "~/Scripts/Responsive-2.0.2/js/responsive.bootstrap.js",
                         "~/Scripts/RowReorder-1.1.1/js/dataTables.rowReorder.js",
                         "~/Scripts/Scroller-1.4.1/js/dataTables.scroller.js",
                         "~/Scripts/Select-1.1.2/js/dataTables.select.js",
                         "~/Scripts/jquery.cascadingdropdown.js",
                         "~/Scripts/jquery.bootstrap-duallistbox.js",
                         "~/Scripts/jquery.tabledit.js",
                         "~/Scripts/FileSaver.js",
                         "~/Scripts/select2/select2.full.js",
                         "~/Scripts/select2/i18n/pt-BR.js",
                         "~/Scripts/moment-with-locales.js",
                         "~/Scripts/moment.js",
                         "~/Scripts/moment-pt-br.js",
                         "~/Scripts/jquery.maskedinput.js",
                         "~/Scripts/jquery.maskmoney.js",
                         "~/Scripts/printThis/printThis.js",
                         "~/Scripts/temporizacao-mensagem-sucesso.js",
                         "~/Scripts/Chart.js"

                         ));
        }
Exemplo n.º 53
0
        public virtual string GenerateScripts(UrlHelper urlHelper, ResourceLocation location, bool?bundleFiles = null)
        {
            if ((!_scriptParts.ContainsKey(location) || _scriptParts[location] == null) &&
                (!_inlineScripts.ContainsKey(location) || _inlineScripts[location] == null))
            {
                return("");
            }

            if (!_scriptParts.Any() && !_inlineScripts.Any())
            {
                return("");
            }

            if (!bundleFiles.HasValue)
            {
                //use setting if no value is specified
                bundleFiles = _siteSettings.EnableJsBundling && BundleTable.EnableOptimizations;
            }

            if (bundleFiles.Value)
            {
                var partsToBundle           = new List <ScriptReferenceMeta>();
                var inlinePartsToBundle     = new List <ScriptReferenceMeta>();
                var partsToDontBundle       = new List <ScriptReferenceMeta>();
                var inlinePartsToDontBundle = new List <ScriptReferenceMeta>();

                if (_scriptParts.ContainsKey(location))
                {
                    partsToBundle.AddRange(_scriptParts[location]
                                           .Where(x => !x.ExcludeFromBundle)
                                           .Distinct());
                    partsToDontBundle.AddRange(_scriptParts[location]
                                               .Where(x => x.ExcludeFromBundle)
                                               .Distinct());
                }

                if (_inlineScripts.ContainsKey(location))
                {
                    inlinePartsToBundle.AddRange(_inlineScripts[location]
                                                 .Where(x => !x.ExcludeFromBundle)
                                                 .Distinct());
                    inlinePartsToDontBundle.AddRange(_inlineScripts[location]
                                                     .Where(x => x.ExcludeFromBundle)
                                                     .Distinct());
                }

                var result     = new StringBuilder();
                var allScripts = new List <string>();
                allScripts.AddRange(partsToBundle.Select(x => x.Part));
                allScripts.AddRange(inlinePartsToBundle.Select(x => x.Part));
                if (allScripts.Any())
                {
                    var    hash = ComputeHash(allScripts.ToArray());
                    string bundleVirtualPath = "~/bundles/scripts/" + hash;
                    //create bundle
                    lock (SLock)
                    {
                        var bundleFor = BundleTable.Bundles.GetBundleFor(bundleVirtualPath);
                        if (bundleFor == null)
                        {
                            var bundle = new ScriptBundle(bundleVirtualPath);

                            bundle.Include(partsToBundle.Select(x => x.Part).ToArray());

                            if (inlinePartsToBundle.Any())
                            {
                                var inlineScriptFilePath = HttpContext.Current.Server.MapPath($"~/App_Data/{hash}.js");
                                File.WriteAllText(inlineScriptFilePath,
                                                  string.Join(Environment.NewLine, inlinePartsToBundle.Select(x => x.Part)));
                                bundle.Include($"~/App_Data/{hash}.js");
                            }

                            var scriptTransformer = new ScriptTransformer(new YuiJsMinifier(new YuiSettings()
                            {
                                JsMinifier =
                                {
                                    CompressionType       = CompressionType.Standard,
                                    ObfuscateJavascript   = true,
                                    Encoding              = "UTF8",
                                    PreserveAllSemicolons = true,
                                    Severity              = 0
                                }
                            }))
                            {
                                EnableTracing = false,
                                CombineFilesBeforeMinification = false,
                                UsePreMinifiedFiles            = true
                            };

                            BundleResolver.Current = new CustomBundleResolver();
                            bundle.Builder         = new NullBuilder();
                            bundle.Transforms.Clear();
                            bundle.Transforms.Add(scriptTransformer);
                            bundle.Orderer = new NullOrderer();

                            BundleTable.Bundles.Add(bundle);
                        }
                    }

                    //parts to bundle
                    result.AppendLine(Scripts.Render(bundleVirtualPath).ToString());
                }

                //parts to do not bundle
                foreach (var item in partsToDontBundle)
                {
                    result.AppendFormat("<script {2}src=\"{0}\" type=\"{1}\"></script>", urlHelper.Content(item.Part), "text/javascript", item.IsAsync ? "async " : "");
                    result.Append(Environment.NewLine);
                }

                //inline scripts to do not bundle
                if (inlinePartsToDontBundle.Any())
                {
                    string script = "";
                    foreach (var item in inlinePartsToDontBundle.Select(x => x.Part).Distinct())
                    {
                        script += urlHelper.Content(item);
                        script += Environment.NewLine;
                    }

                    if (_siteSettings.EnableInlineJsMinification)
                    {
                        var minifier = new Yahoo.Yui.Compressor.JavaScriptCompressor()
                        {
                            CompressionType       = Yahoo.Yui.Compressor.CompressionType.Standard,
                            Encoding              = Encoding.UTF8,
                            ObfuscateJavascript   = true,
                            PreserveAllSemicolons = true,
                        };

                        script = minifier.Compress(script);
                    }

                    result.Append("<script type=\"text/javascript\">");
                    result.Append(Environment.NewLine);
                    result.Append(script);
                    result.Append(Environment.NewLine);
                    result.Append("</script>");
                }

                return(result.ToString());
            }
            else
            {
                //bundling is disabled
                var result = new StringBuilder();
                if (_scriptParts.ContainsKey(location))
                {
                    foreach (var item in _scriptParts[location].Select(x => new { x.Part, x.IsAsync }).Distinct())
                    {
                        result.AppendFormat("<script {2}src=\"{0}\" type=\"{1}\"></script>", urlHelper.Content(item.Part), "text/javascript", item.IsAsync ? "async " : "");
                        result.Append(Environment.NewLine);
                    }
                }

                //inline scripts
                if (_inlineScripts.ContainsKey(location))
                {
                    string script = "";
                    foreach (var item in _inlineScripts[location].Select(x => new { x.Part }).Distinct())
                    {
                        script += urlHelper.Content(item.Part);
                        script += Environment.NewLine;
                    }

                    if (_siteSettings.EnableInlineJsMinification)
                    {
                        var minifier = new Yahoo.Yui.Compressor.JavaScriptCompressor()
                        {
                            CompressionType       = Yahoo.Yui.Compressor.CompressionType.Standard,
                            Encoding              = Encoding.UTF8,
                            ObfuscateJavascript   = true,
                            PreserveAllSemicolons = true,
                        };

                        script = minifier.Compress(script);
                    }

                    result.Append("<script type=\"text/javascript\">");
                    result.Append(Environment.NewLine);
                    result.Append(script);
                    result.Append(Environment.NewLine);
                    result.Append("</script>");
                }


                return(result.ToString());
            }
        }
Exemplo n.º 54
0
        // 有关 Bundling 的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            #region 登录页面样式
            /***************************登录页面样式**************************/
            StyleBundle lgcss = new StyleBundle("~/assets/lgcss");
            lgcss.Orderer = new AsIsBundleOrderer();
            bundles.Add(lgcss.Include(
                            "~/assets/bootstrap/css/bootstrap.css",
                            "~/assets/css/metro.css",
                            "~/assets/font-awesome/css/font-awesome.css",
                            "~/assets/css/style.css",
                            "~/assets/css/style_responsive.css",
                            "~/assets/css/style_default.css",
                            "~/assets/uniform/css/uniform.default.css",
                            "~/content/styles/admin.main.css"));

            ScriptBundle lgjq = new ScriptBundle("~/assets/lgjq");
            lgjq.Orderer = new AsIsBundleOrderer();
            bundles.Add(lgjq.Include(
                            "~/assets/js/jquery-{version}.js",
                            "~/assets/bootstrap/js/bootstrap.js",
                            "~/assets/js/jquery.blockui.js",
                            "~/assets/js/app.js",
                            "~/content/Scripts/jquery.validate.js",
                            "~/content/Scripts/jquery.validate.unobtrusive.js"));
            #endregion

            #region 内容页面样式
            StyleBundle css = new StyleBundle("~/assets/css");
            css.Orderer = new AsIsBundleOrderer();
            bundles.Add(css.Include(
                            "~/assets/bootstrap/css/bootstrap.min.css",
                            "~/assets/css/metro.css",
                            "~/assets/bootstrap/css/bootstrap-responsive.min.css",
                            "~/assets/font-awesome/css/font-awesome.css",
                            "~/assets/css/style.css",
                            "~/assets/css/style_responsive.css",
                            "~/assets/css/style_default.css",
                            "~/assets/css/style_light.css",
                            "~/assets/fancybox/source/jquery.fancybox.css",
                            "~/assets/uniform/css/uniform.default.css",
                            "~/assets/chosen-bootstrap/chosen/chosen.css",
                            "~/assets/data-tables/DT_bootstrap.css",
                            "~/assets/uniform/css/uniform.default.css",
                            "~/assets/jquery-ui/jquery-ui-1.10.1.custom.min.css",
                            "~/content/styles/admin.main.css",
                            "~/content/styles/jquery.thickbox.css"
                            ));

            StyleBundle css2 = new StyleBundle("~/assets/css2");
            css2.Orderer = new AsIsBundleOrderer();
            bundles.Add(css2.Include(
                            "~/content/styles/admin.main.css",
                            "~/content/styles/jquery.thickbox.css"
                            ));

            ScriptBundle jq = new ScriptBundle("~/assets/jq");
            jq.Orderer = new AsIsBundleOrderer();
            bundles.Add(jq.Include(
                            "~/assets/js/jquery-{version}.js",
                            "~/assets/breakpoints/breakpoints.js",
                            "~/assets/bootstrap/js/bootstrap.js",
                            "~/assets/js/jquery.blockui.js",
                            "~/assets/js/jquery.cookie.js"
                            ));

            bundles.Add(new ScriptBundle("~/assets/js/ie9").Include(
                            "~/assets/js/excanvas.js",
                            "~/assets/js/respond.js"));

            ScriptBundle js = new ScriptBundle("~/assets/js");
            js.Orderer = new AsIsBundleOrderer();
            bundles.Add(js.Include(
                            //"~/assets/uniform/jquery.uniform.js",
                            "~/assets/data-tables/jquery.dataTables.js",
                            "~/assets/data-tables/DT_bootstrap.js"));
            //"~/assets/js/app.js"));

            ScriptBundle js2 = new ScriptBundle("~/assets/js2");
            js2.Orderer = new AsIsBundleOrderer();
            bundles.Add(js2.Include(
                            "~/content/scripts/jquery.thickbox.js",
                            "~/assets/jquery-ui/jquery-ui-1.10.4.custom.js",
                            "~/content/scripts/jquery.numeric.js",
                            "~/content/scripts/jquery.ui.datapicker-zh-CN.js",
                            "~/content/scripts/admin.main.js"));
            #endregion

            #region 编辑页面样式
            StyleBundle edcss = new StyleBundle("~/assets/edcss");
            edcss.Orderer = new AsIsBundleOrderer();
            bundles.Add(edcss.Include(
                            "~/assets/bootstrap/css/bootstrap.css",
                            "~/assets/css/metro.css",
                            "~/assets/font-awesome/css/font-awesome.css",
                            "~/assets/css/style.css",
                            "~/assets/jquery-ui/jquery-ui-1.10.1.custom.css",
                            "~/content/styles/admin.main.css"));

            ScriptBundle edjq = new ScriptBundle("~/assets/edjq");
            edjq.Orderer = new AsIsBundleOrderer();
            bundles.Add(edjq.Include(
                            "~/assets/js/jquery-{version}.js",
                            "~/assets/bootstrap/js/bootstrap.js",
                            "~/content/scripts/jquery.validate.js",
                            "~/content/scripts/jquery.validate.unobtrusive.js",
                            "~/content/scripts/jquery.numeric.js",
                            "~/assets/jquery-ui/jquery-ui-1.10.1.custom.js",
                            "~/content/scripts/jquery.ui.datapicker-zh-CN.js",
                            "~/content/scripts/admin.edit.js"));
            #endregion

            //BundleTable.EnableOptimizations = true;
        }
Exemplo n.º 55
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var styleBundle  = new StyleBundle("~/Content/DevExtremeBundle");
            var scriptBundle = new ScriptBundle("~/Scripts/DevExtremeBundle");

            // Uncomment to use the Gantt control
            //styleBundle.Include("~/Content/dx-gantt.css");

            // Uncomment to use the Diagram control
            //styleBundle.Include("~/Content/dx-diagram.css");

            styleBundle.Include("~/Content/dx.common.css");

            // Predefined themes: https://js.devexpress.com/DevExtreme/Guide/Themes_and_Styles/Predefined_Themes/
            styleBundle.Include("~/Content/dx.light.css");

            // Uncomment to use the Gantt control
            //scriptBundle.Include("~/Scripts/dx-gantt.js");

            // Uncomment to use the Diagram control
            //scriptBundle.Include("~/Scripts/dx-diagram.js");

            // NOTE: jQuery may already be included in the default script bundle. Check the BundleConfig.cs file.
            //scriptBundle.Include("~/Scripts/jquery-3.4.1.js");

            scriptBundle.Include("~/Scripts/cldr.js");
            scriptBundle.Include("~/Scripts/cldr/event.js");
            scriptBundle.Include("~/Scripts/cldr/supplemental.js");
            scriptBundle.Include("~/Scripts/cldr/unresolved.js");

            scriptBundle.Include("~/Scripts/globalize.js");
            scriptBundle.Include("~/Scripts/globalize/message.js");
            scriptBundle.Include("~/Scripts/globalize/number.js");
            scriptBundle.Include("~/Scripts/globalize/currency.js");
            scriptBundle.Include("~/Scripts/globalize/date.js");

            // Uncomment to enable client-side export
            //scriptBundle.Include("~/Scripts/jszip.js");

            scriptBundle.Include("~/Scripts/dx.all.js");

            // Uncomment to provide geo-data for the VectorMap control
            // Docs: https://js.devexpress.com/DevExtreme/Guide/Widgets/VectorMap/Providing_Data/#Data_for_Areas
            //scriptBundle.Include("~/Scripts/vectormap-data/world.js");

            scriptBundle.Include("~/Scripts/aspnet/dx.aspnet.mvc.js");
            scriptBundle.Include("~/Scripts/aspnet/dx.aspnet.data.js");

            bundles.Add(styleBundle);
            bundles.Add(scriptBundle);

#if !DEBUG
            BundleTable.EnableOptimizations = true;
#endif
        }
Exemplo n.º 56
0
        // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            #region scriptBundle
            var scriptBundle = new ScriptBundle("~/Scripts/jqueryGlobalize");
            scriptBundle.Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/jquery.scrollbar.min.js",
                "~/Scripts/js.cookie.js",
                "~/Scripts/jquery.unobtrusive-ajax.min.js",
                "~/Scripts/main.js"

                );
            // CLDR scripts
            scriptBundle
            .Include("~/Scripts/cldr.js")
            .Include("~/Scripts/cldr/event.js")
            .Include("~/Scripts/cldr/supplemental.js")
            .Include("~/Scripts/cldr/unresolved.js");

            // Globalize 1.x
            scriptBundle
            .Include("~/Scripts/globalize.js")
            .Include("~/Scripts/globalize/message.js")
            .Include("~/Scripts/globalize/number.js")
            .Include("~/Scripts/globalize/currency.js")
            .Include("~/Scripts/globalize/date.js")
            .Include("~/Scripts/globalize.extensions.js");

            bundles.Add(scriptBundle);
            #endregion

            #region Modernizr
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                            "~/Scripts/modernizr-*"));
            #endregion

            #region bootstrap
            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                            "~/Scripts/bootstrap.bundle.min.js",
                            "~/Scripts/respond.js"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                            "~/Content/css/main.min.css"
                            ));
            bundles.Add(new ScriptBundle("~/bundles/jqueryBase64").Include(
                            "~/Scripts/jquery.base64.js"
                            ));
            #endregion

            #region jquery
            bundles.Add(new ScriptBundle("~/bundles/jqueryBase64").Include(
                            "~/Scripts/jquery.base64.js"
                            ));
            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                            "~/Scripts/jquery.validate*"));
            #endregion

#if !DEBUG
            BundleTable.EnableOptimizations = false;
#endif
        }
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            var conf = IlmConfiguration.Current;

            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/jqueryval").Include(
                            "~/Scripts/jquery.unobtrusive*",
                            "~/Scripts/jquery.validate*"));

            var sBundle = new ScriptBundle("~/bundles/vendors");

            sBundle.Include(
                "~/Scripts/bootstrap.min.js",
                "~/Scripts/underscore.js",
                "~/Scripts/backbone.js",
                "~/Scripts/metismenu.js",
                "~/Scripts/nprogress.js");

            if (conf.UseFb)
            {
                sBundle.Include("~/Scripts/widgetFb.js");
            }
            if (conf.UseTw)
            {
                sBundle.Include("~/Scripts/widgetTw.js");
            }
            if (conf.UseUv)
            {
                sBundle.Include("~/Scripts/widgetUv.js");
            }
            if (conf.UseGa)
            {
                sBundle.Include("~/Scripts/widgetGa.js");
            }

            bundles.Add(sBundle);

            bundles.Add(new ScriptBundle("~/bundles/page").Include(
                            "~/Javascripts/router.js",
                            "~/Javascripts/models/search.js",
                            "~/Javascripts/models/interet.js",
                            "~/Javascripts/models/detail.js",
                            "~/Javascripts/collections/search.js",
                            "~/Javascripts/collections/category.js",
                            "~/Javascripts/collections/Items.js",
                            "~/Javascripts/views/backbone.googlemaps.js",
                            "~/Javascripts/views/backbone.autocomplete.js",
                            "~/Javascripts/views/interetItem.js",
                            "~/Javascripts/views/interet.js",
                            "~/Javascripts/views/category.js",
                            "~/Javascripts/views/items.js",
                            "~/Javascripts/views/description.js",
                            "~/Javascripts/common.js",
                            "~/Javascripts/app.js"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                            "~/Scripts/modernizr.js"
                            ));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                            "~/Content/bootstrap.min.css",
                            "~/Content/bootstrap-theme.min.css",
                            "~/Content/font-awesome.min.css",
                            "~/Content/metisMenu.css",
                            "~/Content/backbone.autocomplete.css",
                            "~/Content/site.css",
                            "~/Content/nprogress.css"
                            ));
        }
Exemplo n.º 58
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/javascript").Include("~/Scripts/es6-promise-2.0.1.js"));

            // Typescript
            var tsBundle = new ScriptBundle("~/bundles/typescript");

            // TS Core
            tsBundle.Include(
                "~/Scripts/typescript/Component.js",
                "~/Scripts/typescript/Animator.js",
                "~/Scripts/typescript/Page.js",
                "~/Scripts/typescript/Utility.js",
                "~/Scripts/typescript/App.js");

            // TS Data
            tsBundle.Include(
                "~/Scripts/typescript/Data/JsonRequest.js",
                "~/Scripts/typescript/Data/DataSource.js",
                "~/Scripts/typescript/Models/Term.js",
                "~/Scripts/typescript/Models/Subject.js",
                "~/Scripts/typescript/Models/Course.js",
                "~/Scripts/typescript/Models/CourseDetails.js",
                "~/Scripts/typescript/Models/ClassDetails.js",
                "~/Scripts/typescript/Models/SectionDetails.js",
                "~/Scripts/typescript/Models/MeetingDetails.js",
                "~/Scripts/typescript/Models/Instructor.js",
                "~/Scripts/typescript/Models/RoomDetails.js",
                "~/Scripts/typescript/Models/Building.js");

            // TS Components
            tsBundle.Include(
                "~/Scripts/typescript/Components/Dialog.js",
                "~/Scripts/typescript/Components/UserBar.js",
                "~/Scripts/typescript/Components/LogInDialog.js",
                "~/Scripts/typescript/Components/SubjectSelectionDialog.js",
                "~/Scripts/typescript/Components/SubjectCourseSelectionDialog.js",
                "~/Scripts/typescript/Components/GlobalProgressIndicator.js",
                "~/Scripts/typescript/Components/DataTiles.js");

            // TS Pages
            tsBundle.Include(
                "~/Scripts/typescript/Pages/TermSelectPage.js",
                "~/Scripts/typescript/Pages/LandingPage.js",
                "~/Scripts/typescript/Pages/SubjectPage.js",
                "~/Scripts/typescript/Pages/CoursePage.js");

#if DEBUG
            // Include debug JS if we're in debug mode (sets debug API URL, etc)
            tsBundle.Include("~/Scripts/typescript/DEBUG.js");
#endif

            bundles.Add(tsBundle);

            bundles.Add(new StyleBundle("~/bundles/css").Include(
                            "~/Content/css/App.css"));

#if DEBUG
            BundleTable.EnableOptimizations = false;
#else
            BundleTable.EnableOptimizations = true;
#endif
        }
Exemplo n.º 59
0
        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "VIS_default",
                "VIS/{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                , new[] { "VIS.Controllers" }
                );

            StyleBundle style = new StyleBundle("~/Areas/VIS/Content/VISstyle");
            //StyleBundle styleRTL = new StyleBundle("~/Areas/VIS/Content/VISstyleRTL");

            ScriptBundle modScript = new ScriptBundle("~/Areas/VIS/Scripts/VISjs");

            ScriptBundle modScript_v1 = new ScriptBundle("~/Areas/VIS/Scripts/VIS_v1");

            ScriptBundle modScript_v2 = new ScriptBundle("~/Areas/VIS/Scripts/VIS_v2");



            //modScript.Include(
            //     "~/Areas/VIS/Scripts/app/native-extension.js",
            //    "~/Areas/VIS/Scripts/app/utility.js",
            //    "~/Areas/VIS/Scripts/app/logger.js",
            //    "~/Areas/VIS/Scripts/app/controls.js",
            //    "~/Areas/VIS/Scripts/app/classes.js",
            //    "~/Areas/VIS/Scripts/app/desktopmgr.js",
            //    "~/Areas/VIS/Scripts/app/viewmanager.js",
            //    "~/Areas/VIS/Scripts/app/context.js",
            //    "~/Areas/VIS/Scripts/app/i18N.js",
            //    "~/Areas/VIS/Scripts/app/role.js",
            //    "~/Areas/VIS/Scripts/app/adialog.js",
            //    "~/Areas/VIS/Scripts/app/lookup.js",
            //    "~/Areas/VIS/Scripts/app/treepanel.js",

            //    "~/Areas/VIS/Scripts/app/controller.js",
            //    "~/Areas/VIS/Scripts/app/formframe.js",
            //    "~/Areas/VIS/Scripts/app/processframe.js",
            //    "~/Areas/VIS/Scripts/processengine/processctl.js",
            //    "~/Areas/VIS/Scripts/processengine/processinfo.js",
            //    "~/Areas/VIS/Scripts/processengine/processparameter.js",
            //    "~/Areas/VIS/Scripts/forms/form.js",
            //    "~/Areas/VIS/Scripts/app/datacontext.js",
            //    "~/Areas/VIS/Scripts/app/calloutengine.js",
            //    "~/Areas/VIS/Scripts/model/Callouts.js",
            //    "~/Areas/VIS/Scripts/home/home.js",
            //    "~/Areas/VIS/Scripts/home/changeuserimage.js",
            //    "~/Areas/VIS/Scripts/home/shortcut.js",
            //    "~/Areas/VIS/Scripts/app/historymgr.js",
            //    "~/Areas/VIS/Scripts/app/secure-engine.js",
            //    "~/Areas/VIS/Scripts/app/Framework/userpreference.js",
            //    "~/Areas/VIS/Scripts/app/Framework/vimageform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/help.js",
            //    "~/Areas/VIS/Scripts/app/Framework/ini.js",
            //    "~/Areas/VIS/Scripts/app/Framework/locationform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/locatorform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/valuepreference.js",
            //    "~/Areas/VIS/Scripts/app/Framework/pattributesform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/pattributeinstance.js",
            //    "~/Areas/VIS/Scripts/app/Framework/genralattributeform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/accountform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/archiveviewer.js",
            //    "~/Areas/VIS/Scripts/app/child-dialog.js",
            //    "~/Areas/VIS/Scripts/app/Framework/chat.js",
            //    "~/Areas/VIS/Scripts/app/Framework/infomenu.js",
            //    "~/Areas/VIS/Scripts/app/Framework/infowindow.js",
            //    "~/Areas/VIS/Scripts/app/Framework/amountdivision.js",
            //    "~/Areas/VIS/Scripts/app/Framework/infogeneral.js",
            //    "~/Areas/VIS/Scripts/app/Framework/infoproduct.js",
            //    "~/Areas/VIS/Scripts/app/Framework/infoscanform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/attachmentform.js",
            //    "~/Areas/VIS/Scripts/app/Framework/help.js",
            //    "~/Areas/VIS/Scripts/app/Framework/wfactivity.js",
            //    "~/Areas/VIS/Scripts/app/Framework/vdocaction.js",
            //    "~/Areas/VIS/Scripts/app/Framework/appointments.js",
            //    "~/Areas/VIS/Scripts/app/Framework/vpayment.js",
            //    "~/Areas/VIS/Scripts/app/forms/form.js",
            //    "~/Areas/VIS/Scripts/app/forms/vcreatefrom.js",
            //    "~/Areas/VIS/Scripts/app/forms/vcreatefrominvoice.js",
            //    "~/Areas/VIS/Scripts/app/forms/vcreatefromshipment.js",
            //    "~/Areas/VIS/Scripts/app/forms/vcreatefromstatement.js",
            //    "~/Areas/VIS/Scripts/app/forms/generatexmodel.js",
            //    "~/Areas/VIS/Scripts/app/forms/acctviewer.js",
            //    "~/Areas/VIS/Scripts/app/forms/acctviewermenu.js",
            //    "~/Areas/VIS/Scripts/app/forms/vinoutgen.js",
            //    "~/Areas/VIS/Scripts/app/forms/vinvoicegen.js",
            //     "~/Areas/VIS/Scripts/app/forms/vmatch.js",
            //     "~/Areas/VIS/Scripts/app/forms/vcharge.js",
            //     "~/Areas/VIS/Scripts/app/forms/vattributegrid.js",
            //     "~/Areas/VIS/Scripts/app/forms/vpayselect.js",
            //      "~/Areas/VIS/Scripts/app/forms/vpayprint.js",
            //      "~/Areas/VIS/Scripts/app/forms/vBOMdrop.js",
            //      "~/Areas/VIS/Scripts/app/forms/vtrxmaterial.js",
            //    "~/Areas/VIS/Scripts/app/Framework/find.js",
            //    "~/Areas/VIS/Scripts/app/azoomacross.js",
            //    "~/Areas/VIS/Scripts/app/Framework/sms.js",

            //     "~/Areas/VIS/Scripts/app/arequest.js",
            //     "~/Areas/VIS/Scripts/app/Framework/vsetup.js",
            //       "~/Areas/VIS/Scripts/home/favourite.js",
            //       "~/Areas/VIS/Scripts/app/Framework/bpartner.js",
            //        "~/Areas/VIS/Scripts/app/Framework/contactInfo.js",
            //        "~/Areas/VIS/Scripts/app/favouritehelper.js",
            //     "~/Areas/VIS/Scripts/app/Framework/email.js",
            //     "~/Areas/VIS/Scripts/app/Framework/newmailformat.js",
            //     "~/Areas/VIS/Scripts/app/Framework/openmailformats.js",
            //     "~/Areas/VIS/Scripts/app/areport.js",
            //        "~/Areas/VIS/Scripts/app/Framework/attachmentHistory.js",
            //        "~/Areas/VIS/Scripts/app/Framework/recordaccessdialog.js",
            //        "~/Areas/VIS/Scripts/app/forms/vallocation.js",
            //    //"~/Areas/VIS/Scripts/app/forms/vallocation-branch.js",

            //    "~/Areas/VIS/Scripts/app/grouprights/group.js",
            //    "~/Areas/VIS/Scripts/app/grouprights/createuser.js",
            //    "~/Areas/VIS/Scripts/app/grouprights/orgaccess.js",
            //    "~/Areas/VIS/Scripts/app/grouprights/groupinfo.js",
            //    "~/Areas/VIS/Scripts/app/grouprights/createrole.js",
            //    "~/Areas/VIS/Scripts/app/Framework/markmodule.js",
            //    "~/Areas/VIS/Scripts/app/Framework/cardviewdialog.js",
            //    "~/Areas/VIS/Scripts/app/Framework/visimportfiles.js",
            //    "~/Areas/VIS/Scripts/app/Framework/parameterdialog.js",
            //    "~/Areas/VIS/Scripts/app/processwrapper.js",
            //     "~/Areas/VIS/Scripts/app/TreeMaintenance/treeondemand.js",

            //     "~/Areas/VIS/Scripts/app/Framework/treemaintenance.js",
            //     "~/Areas/VIS/Scripts/app/Framework/jquery-touch.js",

            //     "~/Areas/VIS/Scripts/app/Framework/bulkdownload.js",

            //     "~/Areas/VIS/Scripts/app/forms/productContainer.js",
            //     "~/Areas/VIS/Scripts/app/forms/productContainerMove.js",
            //     "~/Areas/VIS/Scripts/app/forms/productContainerTree.js",

            //     "~/Areas/VIS/Scripts/app/windowformcontainer.js",
            //     "~/Areas/VIS/Scripts/app/masterdataversion.js",

            //     "~/Areas/VIS/Scripts/tabpanels/bipanel.js",
            //     "~/Areas/VIS/Scripts/model/CalloutColumn.js",
            //     "~/Areas/VIS/Scripts/app/forms/glDimensionValue.js",



            //       "~/Areas/VIS/Scripts/tabpanels/verinfo.js",
            //      "~/Areas/VIS/Scripts/TestPanel.js");


            //modScript.Include(
            //     "~/Areas/VIS/Scripts/F20/thememgr.js",
            //    "~/Areas/VIS/Scripts/app/initialize.js" //bottom one (do-not chnage sequence
            //);

            //modScript_v1.Include("~/Areas/VIS/Scripts/app/windowframe.js"); //Old design , do-not alter

            //modScript_v2.Include(
            //      "~/Areas/VIS/Scripts/F20/aheaderpanel.js",
            //      "~/Areas/VIS/Scripts/F20/atabpanel.js",
            //      "~/Areas/VIS/Scripts/F20/wframe.js",
            //     "~/Areas/VIS/Scripts/F20/atabbedpane.js",
            //     "~/Areas/VIS/Scripts/F20/veditview.js",
            //     "~/Areas/VIS/Scripts/F20/vcardview.js",
            //     "~/Areas/VIS/Scripts/F20/vgridview.js",
            //     "~/Areas/VIS/Scripts/F20/vmapview.js",
            //     "~/Areas/VIS/Scripts/F20/aviewcontroller.js",
            //     "~/Areas/VIS/Scripts/F20/apanel.js",
            //     "~/Areas/VIS/Scripts/F20/acontentpane.js",
            //     "~/Areas/VIS/Scripts/F20/afilterpanel.js",
            //     "~/Areas/VIS/Scripts/F20/themecnfgtr.js"
            //     );



            //style.Include("~/Areas/VIS/Content/Site.css",

            //    "~/Areas/VIS/Content/VISAD.css",
            //    "~/Areas/VIS/Content/PrefStyle.css",
            //    "~/Areas/VIS/Content/Home.css",
            //    "~/Areas/VIS/Content/PaymentRule.css",
            //    "~/Areas/VIS/Content/Style.css",
            //    "~/Areas/VIS/Content/ClientSetup.css",
            //    "~/Areas/VIS/Content/Find.css",
            //    "~/Areas/VIS/Content/Email.css",
            //    "~/Areas/VIS/Content/VPaySelect.css",
            //     "~/Areas/VIS/Content/reportstyle.css",
            //     "~/Areas/VIS/Content/RecordAccessDialog.css",
            //    "~/Areas/VIS/Content/GroupStyle.css",
            //     "~/Areas/VIS/Content/ProductContainer.css",
            //    "~/Areas/VIS/Content/GlJournalDimension.css"
            //   );

            //style.Include("~/Areas/VIS/Content/F20/Color.css",
            //    "~/Areas/VIS/Content/F20/Site.css",
            //    "~/Areas/VIS/Content/F20/Window.css",
            //            "~/Areas/VIS/Content/F20/Controls.css",
            //             "~/Areas/VIS/Content/F20/Media.css",
            //             "~/Areas/VIS/Content/F20/ThemeCnfgtr.css"
            //    );


            //style.Include("~/Areas/VIS/Content/VIS.rtl.css");

            style.Include("~/Areas/VIS/Content/VIS.all.min.css");
            modScript.Include("~/Areas/VIS/Scripts/VIS.all.min.js");
            modScript_v1.Include("~/Areas/VIS/Scripts/VIS1_0.min.js");
            modScript_v2.Include("~/Areas/VIS/Scripts/VIS2_0.min.js");



            VAdvantage.ModuleBundles.RegisterScriptBundle(modScript, "VIS", -1);
            VAdvantage.ModuleBundles.RegisterScriptBundle(modScript_v1, "VIS1_0", -2);
            VAdvantage.ModuleBundles.RegisterScriptBundle(modScript_v2, "VIS2_0", -3);

            VAdvantage.ModuleBundles.RegisterStyleBundle(style, "VIS", -1);
            ////VAdvantage.ModuleBundles.RegisterRTLStyleBundle(styleRTL, "VIS", -1);
        }
Exemplo n.º 60
0
 public static ScriptBundle AddScript(this ScriptBundle bundle, string script, string scriptDir = ScriptsDir)
 {
     bundle.Include(GetRelativeScriptsPath(script, scriptDir));
     return(bundle);
 }