Esempio n. 1
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;

            var jqueryBundle = new ScriptBundle("~/bundles/jquery", "//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js").Include("~/bower_components/jquery/dist/jquery.js");

            jqueryBundle.CdnFallbackExpression = "window.jQuery";
            bundles.Add(jqueryBundle);

            var angularBundle = new ScriptBundle("~/bundles/angular", "//ajax.googleapis.com/ajax/libs/angularjs/1.4.1/angular.min.js").Include("~/bower_components/angular/angular.js");

            angularBundle.CdnFallbackExpression = "window.angular";
            bundles.Add(angularBundle);

            bundles.Add(new ScriptBundle("~/bundles/corelibs")
                        .Include("~/bower_components/underscore/underscore.js")
                        .Include("~/bower_components/moment/moment.js")
                        );

            bundles.Add(new ScriptBundle("~/bundles/proteo.shared.api")
                        .Include("~/bower_components/angular-resource/angular-resource.js")
                        .Include("~/bower_components/angular-cookie/angular-cookie.js")
                        .Include("~/ng-shared/proteo-shared-api.js")
                        .IncludeDirectory("~/ng-shared/api", "*.js", true)
                        );

            bundles.Add(new ScriptBundle("~/bundles/proteo.shared.forms")
                        .Include("~/bower_components/angular-bootstrap/ui-bootstrap.js")
                        .Include("~/bower_components/angular-bootstrap/ui-bootstrap-tpls.js")
                        .Include("~/bower_components/angular-sanitize/angular-sanitize.js")
                        .Include("~/bower_components/ng-currency/src/ng-currency.js")
                        .Include("~/bower_components/ngtoast/dist/ngToast.js")
                        .Include("~/bower_components/angular-animate/angular-animate.js")
                        .Include("~/ng-shared/proteo-shared-forms.js")
                        .IncludeDirectory("~/ng-shared/forms", "*.js", true)
                        );

            /***** IMPORTANT: whenever changes are made to the files that are included here make sure to make any appropriate corresponding change in WebUI.Tests/chutzpah.json ***/

            bundles.Add(new ScriptBundle("~/bundles/lib")
                        .Include("~/bower_components/underscore/underscore.js")
                        .Include("~/bower_components/angular-animate/angular-animate.js")
                        .Include("~/bower_components/angular-bootstrap-switch/dist/angular-bootstrap-switch.js")
                        .Include("~/bower_components/angular-messages/angular-messages.js")
                        .Include("~/bower_components/angular-resource/angular-resource.js")
                        .Include("~/bower_components/angular-sanitize/angular-sanitize.js")
                        .Include("~/bower_components/angular-webstorage/angular-webstorage.js")
                        .Include("~/bower_components/angular-cookie/angular-cookie.js")
                        .Include("~/bower_components/angular-bootstrap/ui-bootstrap.js")
                        .Include("~/bower_components/angular-bootstrap/ui-bootstrap-tpls.js")
                        .Include("~/bower_components/angular-underscore-module/angular-underscore-module.js")
                        .Include("~/bower_components/angular-ui-router/release/angular-ui-router.js")
                        .Include("~/bower_components/angular-messages/angular-messages.js")
                        .Include("~/bower_components/angular-loading-bar/build/loading-bar.js")
                        .Include("~/bower_components/angular-fullscreen/src/angular-fullscreen.js")
                        .Include("~/bower_components/angular-tree-control/angular-tree-control.js")
                        .Include("~/bower_components/bootstrap-switch/dist/js/bootstrap-switch.js")
                        .Include("~/bower_components/moment/moment.js")
                        .Include("~/bower_components/moment-duration-format/lib/moment-duration-format.js")
                        .Include("~/bower_components/moment-timezone/moment-timezone.js")
                        .Include("~/bower_components/jquery-timepicker-jt/jquery.timepicker.js")
                        .Include("~/bower_components/angular-jquery-timepicker/src/timepickerdirective.js")
                        .Include("~/bower_components/ng-context-menu/dist/ng-context-menu.js")
                        .Include("~/bower_components/ng-table/ng-table.js")
                        .Include("~/bower_components/ng-resize/ngresize.js")
                        .Include("~/bower_components/ladda/js/spin.js")
                        .Include("~/bower_components/ladda/js/ladda.js")
                        .Include("~/bower_components/angular-ladda/dist/angular-ladda.js")
                        .Include("~/bower_components/tinycolor/tinycolor.js")
                        .Include("~/bower_components/tinygradient/tinygradient.js")
                        .Include("~/bower_components/angular-datatables/dist/angular-datatables.js")
                        .Include("~/bower_components/angular-datatables/dist/plugins/bootstrap/angular-datatables.bootstrap.js")
                        .Include("~/bower_components/angular-bootstrap-checkbox/angular-bootstrap-checkbox.js")
                        .Include("~/script/datatables/media/js/jquery.datatables.js")
                        .Include("~/bower_components/angular-bootstrap-checkbox/angular-bootstrap-checkbox.js")
                        .Include("~/script/dhtmlxscheduler.js")
                        .Include("~/script/dhtmlxscheduler_limit.js")
                        .Include("~/script/dhtmlxscheduler_timeline.js")
                        .Include("~/script/dhtmlxscheduler_tooltip.js")
                        .Include("~/script/dhtmlxscheduler_collision.js")
                        .Include("~/script/dhtmlxscheduler_readonly.js")
                        .Include("~/script/dhtmlxscheduler_editors.js")

                        );

            bundles.Add(new ScriptBundle("~/bundles/app")
                        .Include("~/ng/app.js")
                        .IncludeDirectory("~/ng/controllers", "*.js", true)
                        .IncludeDirectory("~/ng/directives", "*.js", true)
                        .IncludeDirectory("~/ng/services", "*.js", true)
                        .IncludeDirectory("~/ng/filters", "*.js", true)
                        //Commented out cause isn't being used and breaks when deployed to box
                        //.IncludeDirectory("~/ng/models", "*.js", true)
                        );

            bundles.Add(new ScriptBundle("~/bundles/app-config-run")
                        .Include(
                            "~/ng/app-config.js",
                            "~/ng/app-run.js")
                        );

            // Used to fix relative paths in the CSS files during bundling/minification
            IItemTransform cssFixer = new CssRewriteUrlTransformFixed();

            bundles.Add(new StyleBundle("~/bundles/styles/lib")
                        .Include("~/bower_components/bootstrap/dist/css/bootstrap.css", cssFixer)
                        .Include("~/bower_components/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.css", cssFixer)
                        .Include("~/Content/Css/dhtmlxscheduler_flat.css", cssFixer)
                        .Include("~/bower_components/ladda/dist/ladda-themeless.min.css")
                        .Include("~/bower_components/jquery-timepicker-jt/jquery.timepicker.css", cssFixer)
                        .Include("~/bower_components/angular-loading-bar/build/loading-bar.css", cssFixer)
                        .Include("~/bower_components/angular-tree-control/css/tree-control.css", cssFixer)
                        .Include("~/bower_components/angular-tree-control/css/tree-control-attribute.css", cssFixer)
                        .Include("~/bower_components/angular-datatables/dist/plugins/bootstrap/datatables.bootstrap.min.css", cssFixer)
                        );

            bundles.Add(new StyleBundle("~/bundles/styles/proteo.shared.forms")
                        .Include("~/bower_components/bootstrap/dist/css/bootstrap.css", cssFixer)
                        .Include("~/bower_components/ngtoast/dist/ngToast.css", cssFixer)
                        .Include("~/bower_components/ngtoast/dist/ngToast-animations.css", cssFixer)
                        );

            bundles.Add(new LessBundle("~/bundles/styles/app")
                        .Include("~/Content/Less/site.less", cssFixer)
                        );

#if DEBUG
            // Set EnableOptimizations to false for debugging. For more information,
            // visit http://go.microsoft.com/fwlink/?LinkId=301862
            BundleTable.EnableOptimizations = false;
#endif
        }
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            if (bundles == null)
                return;

            bundles.Add(new ScriptBundle("~/Content/js/jquery").Include(
                        "~/Content/js/jquery-1.12.0.js",
                        "~/Content/js/jquery.jeditable.js",
                        "~/Content/js/jquery.spin.js",
                        "~/Content/js/jquery.contextMenu.js",
                        "~/Content/js/jcookies.js",
                        "~/Content/js/typeahead.bundle.js"));

            bundles.Add(new ScriptBundle("~/Content/js/bootstrap").Include(
                "~/Content/js/bootstrap.js"));

            bundles.Add(new ScriptBundle("~/Content/js/dataTables").Include(
                    "~/Content/js/jquery.dataTables.js",
                    "~/Content/js/dataTables.bootstrap.js",
                    "~/Content/js/dataTables.fixedColumns.js",
                    "~/Content/js/dataTables.fixedHeader.min.js",
                    "~/Content/js/jquery.dataTables.rowGrouping.js",
                    "~/Content/js/dataTables.responsive.js",
                    "~/Content/js/dataTables.scroller.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/bootstrapmultiselect").Include(
                    "~/Content/js/bootstrap-multiselect.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/adminbundle").Include(
                    "~/Content/js/Admin/admin.js",
                    "~/Content/js/Admin/enginecodemapping.js",
                    "~/Content/js/Admin/enginecodemappingpage.js",
                    "~/Content/js/Admin/market.js",
                    "~/Content/js/Admin/model.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/derivativebundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/Derivative/delete.js",
                    "~/Content/js/Derivative/model.js",
                    "~/Content/js/Derivative/page.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/derivativemappingbundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/DerivativeMapping/copy.js",
                    "~/Content/js/DerivativeMapping/delete.js",
                    "~/Content/js/DerivativeMapping/bmc.js",
                    "~/Content/js/DerivativeMapping/model.js",
                    "~/Content/js/DerivativeMapping/page.js",
                    "~/Content/js/DerivativeMapping/bmcpage.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/featurebundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/Feature/delete.js",
                    "~/Content/js/Feature/model.js",
                    "~/Content/js/Feature/page.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/featuremappingbundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/FeatureMapping/copy.js",
                    "~/Content/js/FeatureMapping/delete.js",
                    "~/Content/js/FeatureMapping/model.js",
                    "~/Content/js/FeatureMapping/page.js",
                     "~/Content/js/FeatureMapping/featurecode.js",
                    "~/Content/js/FeatureMapping/featurecodepage.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/ignoredexceptionbundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/IgnoredException/delete.js",
                    "~/Content/js/IgnoredException/model.js",
                    "~/Content/js/IgnoredException/page.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/importbundle").Include(
                    "~/Content/js/Import/addderivativeaction.js",
                    "~/Content/js/Import/addfeatureaction.js",
                    "~/Content/js/Import/addtrimaction.js",
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/Import/derivative.js",
                    "~/Content/js/Import/deleteimportaction.js",
                    "~/Content/js/Import/exceptions.js",
                    "~/Content/js/Import/exceptionspage.js",
                    "~/Content/js/Import/feature.js",
                    "~/Content/js/Import/ignore.js",
                    "~/Content/js/Import/ignoreaction.js",
                    "~/Content/js/Import/ignoreallaction.js",
                    "~/Content/js/Import/importqueue.js",
                    "~/Content/js/Import/importqueuepage.js",
                    "~/Content/js/Import/mapoxoderivativeaction.js",
                    "~/Content/js/Import/mapderivativeaction.js",
                    "~/Content/js/Import/mapfeatureaction.js",
                    "~/Content/js/Import/mapoxofeatureaction.js",
                    "~/Content/js/Import/mapmarketaction.js",
                    "~/Content/js/Import/maptrimaction.js",
                    "~/Content/js/Import/mapoxotrimaction.js",
                    "~/Content/js/Import/market.js",
                    "~/Content/js/Import/process.js",
                    "~/Content/js/Import/processdataaction.js",
                    "~/Content/js/Import/specialfeatureaction.js",
                    "~/Content/js/Import/trim.js",
                    "~/Content/js/Import/upload.js",
                    "~/Content/js/Import/uploadaction.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/marketmappingbundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/MarketMapping/copy.js",
                    "~/Content/js/MarketMapping/delete.js",
                    "~/Content/js/MarketMapping/model.js",
                    "~/Content/js/MarketMapping/page.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/marketreviewbundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/MarketReview/model.js",
                    "~/Content/js/MarketReview/page.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/publishbundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/Publish/model.js",
                    "~/Content/js/Publish/page.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/sharedbundle").Include(
                    "~/Content/js/Shared/namespace.js",
                    "~/Content/js/Shared/modal.js",
                    "~/Content/js/Shared/cookie.js",
                    "~/Content/js/Shared/pager.js",
                    "~/Content/js/Shared/vehicle.js",
                    "~/Content/js/Shared/takeratefilter.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/specialfeaturemappingbundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/SpecialFeatureMapping/copy.js",
                    "~/Content/js/SpecialFeatureMapping/delete.js",
                    "~/Content/js/SpecialFeatureMapping/model.js",
                    "~/Content/js/SpecialFeatureMapping/page.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/takeratebundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/TakeRate/model.js",
                    "~/Content/js/TakeRate/page.js",
                    "~/Content/js/TakeRate/clone.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/takeratedatabundle").Include(
                    "~/Content/js/TakeRateData/addnote.js",
                    "~/Content/js/TakeRateData/addnoteaction.js",
                    "~/Content/js/TakeRateData/changeset.js",
                    "~/Content/js/TakeRateData/details.js",
                    "~/Content/js/TakeRateData/filter.js",
                    "~/Content/js/TakeRateData/filteraction.js",
                    "~/Content/js/TakeRateData/history.js",
                    "~/Content/js/TakeRateData/historyaction.js",
                    "~/Content/js/TakeRateData/marketreview.js",
                    "~/Content/js/TakeRateData/marketreviewaction.js",
                    "~/Content/js/TakeRateData/model.js",
                    "~/Content/js/TakeRateData/page.js",
                    "~/Content/js/TakeRateData/powertrain.js",
                    "~/Content/js/TakeRateData/powertrainaction.js",
                    "~/Content/js/TakeRateData/publish.js",
                    "~/Content/js/TakeRateData/publishaction.js",
                    "~/Content/js/TakeRateData/save.js",
                    "~/Content/js/TakeRateData/saveaction.js",
                    "~/Content/js/TakeRateData/validationsummary.js",
                    "~/Content/js/TakeRateData/validationsummaryaction.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/Forecast")
                .Include("~/Content/js/Forecast/vehicle.js",
                         "~/Content/js/Forecast/forecast.js"));

            bundles.Add(new ScriptBundle("~/Content/js/trimbundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/Trim/delete.js",
                    "~/Content/js/Trim/model.js",
                    "~/Content/js/Trim/page.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/trimmappingbundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/TrimMapping/copy.js",
                    "~/Content/js/TrimMapping/delete.js",
                    "~/Content/js/TrimMapping/dpck.js",
                    "~/Content/js/TrimMapping/model.js",
                    "~/Content/js/TrimMapping/page.js",
                    "~/Content/js/TrimMapping/dpckpage.js"
                ));

            bundles.Add(new ScriptBundle("~/Content/js/userbundle").Include(
                    "~/Content/js/Shared/contextmenu.js",
                    "~/Content/js/User/addnewuseraction.js",
                    "~/Content/js/User/disableuseraction.js",
                    "~/Content/js/User/enableuseraction.js",
                    "~/Content/js/User/manageprogrammesaction.js",
                    "~/Content/js/User/setadministratoraction.js",
                    "~/Content/js/User/unsetadministratoraction.js",
                    "~/Content/js/User/model.js",
                    "~/Content/js/User/page.js"
                ));

            var cssFixer = new CssRewriteUrlTransformFixed();

            bundles.Add(new StyleBundle("~/Content/styles")
                .Include("~/Content/css/bootstrap.css", cssFixer)
                .Include("~/Content/css/responsive.bootstrap.css", cssFixer)
                .Include("~/Content/css/site.css", cssFixer)
                .Include("~/Content/css/BrushedMetal.css", cssFixer)
                .Include("~/Content/css/jquery.contextMenu.css", cssFixer)
                .Include("~/Content/css/bootstrap-multiselect.css", cssFixer)
                .Include("~/Content/css/jquery.spin.css", cssFixer));

            bundles.Add(new StyleBundle("~/Content/styles/dataTables").Include(
                    "~/Content/css/dataTables.bootstrap.css",
                    "~/Content/css/scroller.bootstrap.css",
                    "~/Content/css/responsive.dataTables.css"
                ));
        }