Ejemplo n.º 1
0
        public void RebaseUrlSingleQuotesTest()
        {
            var css = new CssRewriteUrlTransform();

            // i.e. moving css from /content/foo.css => /bundles/css
            Assert.AreEqual("url(/content/images/foo.png)", CssRewriteUrlTransform.ConvertUrlsToAbsolute("/content", "url('images/foo.png')"));
        }
Ejemplo n.º 2
0
		public string BuildBundleContent(Bundle bundle, BundleContext context, IEnumerable<BundleFile> files)
		{
			var rewriteTransform = new CssRewriteUrlTransform();
			var bundleFiles = files as IList<BundleFile> ?? files.ToList();
			bundleFiles.ForEach(x => x.Transforms.Add(rewriteTransform));
			return new DefaultBundleBuilder().BuildBundleContent(bundle, context, bundleFiles);
		}
Ejemplo n.º 3
0
        public static void RegisterStyles(BundleCollection bundles)
        {
            CssRewriteUrlTransform cssRewriter = new CssRewriteUrlTransform();

            bundles.Add(new StyleBundle("~/Bundle/Styles/Resources")
                        //Resources
                        .Include("~/Content/Resources/bootstrap.min.css", cssRewriter)
                        .Include("~/Content/Resources/animate.css", cssRewriter)
                        .Include("~/Content/Resources/inspinia.css", cssRewriter)
                        //Plugins
                        .Include("~/Content/Resources/ui.jqgrid.css", cssRewriter)
                        .Include("~/Content/Resources/ui.jqgrid-bootstrap-ui.css", cssRewriter)
                        .Include("~/Content/Resources/ui.jqgrid-bootstrap.css", cssRewriter)
                        .Include("~/Content/Resources/chosen/chosen.css", cssRewriter)
                        .Include("~/Content/Resources/sweetalert2.min.css", cssRewriter)
                        .Include("~/Content/Resources/jquery-ui.css", cssRewriter)
                        .Include("~/Content/Resources/bootstrap-tour.min.css", cssRewriter)
                        .Include("~/Content/Resources/c3.min.css", cssRewriter)
                        .Include("~/Content/Resources/datepicker3.css", cssRewriter)
                        .Include("~/Content/Resources/bootstrap-iconpicker.min.css", cssRewriter)
                        .Include("~/Content/Resources/iCheck/custom.css", cssRewriter)
                        //Fonts
                        .Include("~/Content/Resources/font-awesome.min.css", cssRewriter)
                        .Include("~/Content/Resources/pe-icon-set-food.min.css", cssRewriter)
                        .Include("~/Content/Resources/pe-icon-set-social-people.min.css", cssRewriter)
                        .Include("~/Content/Resources/pe-icon-set-media.min.css", cssRewriter)
                        .Include("~/Content/Resources/pe-icon-7-stroke.min.css", cssRewriter)
                        .Include("~/Content/Resources/Components.css", cssRewriter)
                        );

            bundles.Add(new StyleBundle("~/Bundle/Styles/CaseEleva").IncludeDirectory("~/Content", "*.css"));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructor method.
        /// </summary>
        public DashboardIndexStyles() : base(BundleVirtualPath)
        {
            // Fix relative urls in css files
            var urlTransform = new CssRewriteUrlTransform();

            Include("~/assets/vendor/bootstrap-multiselect/bootstrap-multiselect.css", urlTransform);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Constructor method.
        /// </summary>
        public AdminStyles() : base(BundleVirtualPath)
        {
            // Fix relative urls in css files
            var urlTransform = new CssRewriteUrlTransform();

            Include("~/contents/admin.css", urlTransform);
        }
Ejemplo n.º 6
0
        public void DontRebaseDataUris()
        {
            var cssWithDatUri = "background: url(data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==);";
            var convertedCss  = CssRewriteUrlTransform.ConvertUrlsToAbsolute("/Content/themes/base", cssWithDatUri);

            Assert.AreEqual(cssWithDatUri, convertedCss);
        }
Ejemplo n.º 7
0
        public void RegisterBundles(BundleCollection bundles)
        {
            var urlTransform = new CssRewriteUrlTransform();

            // CSS

            var cssBundle = new StyleBundle(SharedRouteLibrary.Css.Main)
                            .Include(SharedRouteLibrary.Css.Bundle("lib/font-awesome/font-awesome.css"), urlTransform)
                            .Include(SharedRouteLibrary.Css.Bundle("lib/tinymce/skin.min.css"))
                            .Include(SharedRouteLibrary.Css.Bundle("lib/ui-select.css"))
                            .Include(SharedRouteLibrary.Css.Bundle("lib/selectize.default.css"))
                            .Include(SharedRouteLibrary.Css.Bundle("shared.css"), urlTransform);

            // Add in
            var cssOverridePath = GetAlternateResourcePath(SharedRouteLibrary.Css.Bundle("/"));

            if (HostingEnvironment.VirtualPathProvider.DirectoryExists(cssOverridePath))
            {
                cssBundle.IncludeDirectory(cssOverridePath, "*.css", true);
            }

            bundles.Add(cssBundle);

            // Scripts

            bundles.Add(new ScriptBundle(SharedRouteLibrary.Js.Html5Shiv)
                        .Include(SharedRouteLibrary.Js.Bundle("lib/html5shiv.js")));

            AddMainScriptBundle(bundles);
            AddTemplateBundles(bundles);
        }
Ejemplo n.º 8
0
 public Helper(IOptions <BundleGlobalOptions> globalOptions, ISassCompiler compiler, ICssMinifier minifier)
 {
     _globalOptions       = globalOptions.Value;
     _compileTransform    = new SassCompileTransform(compiler);
     _rewriteUrlTransform = new CssRewriteUrlTransform();
     _minifyTransform     = new CssMinifyTransform(minifier);
 }
        /// <summary>
        /// Constructor method.
        /// </summary>
        public CalendarIndexStylesPrint() : base(BundleVirtualPath)
        {
            // Fix relative urls in css files
            var urlTransform = new CssRewriteUrlTransform();

            Include("~/assets/vendor/fullcalendar/fullcalendar.print.css", urlTransform);
        }
Ejemplo n.º 10
0
 public void RebaseDotDotRelativeUrlTest()
 {
     Assert.AreEqual("/images/bg.jpg", CssRewriteUrlTransform.RebaseUrlToAbsolute("/images", "../images/bg.jpg"));
     Assert.AreEqual("/images/bg.jpg", CssRewriteUrlTransform.RebaseUrlToAbsolute("/images/", "../images/bg.jpg"));
     // content/themes/foo.css => bundles/themes.css
     Assert.AreEqual("/content/images/bg.jpg", CssRewriteUrlTransform.RebaseUrlToAbsolute("/content/themes/", "../images/bg.jpg"));
     Assert.AreEqual("/content/images/bg.jpg", CssRewriteUrlTransform.RebaseUrlToAbsolute("/content/themes", "../images/bg.jpg"));
 }
Ejemplo n.º 11
0
        /// <summary>
        /// Constructor method.
        /// </summary>
        public ContactsIndexStyles() : base(BundleVirtualPath)
        {
            // Fix relative urls in css files
            // Css relative paths should be wrapped by quotes or include the min file.
            var urlTransform = new CssRewriteUrlTransform();

            Include("~/assets/vendor/jquery-datatables-bs3/assets/css/datatables.css", urlTransform);
        }
Ejemplo n.º 12
0
        // 如需「搭配」的詳細資訊,請瀏覽 http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            var transform = new CssRewriteUrlTransform();

            bundles.Add(new StyleBundle("~/css/golbal_mandatory").Include(
                            "~/Content/global/plugins/bootstrap/css/bootstrap.css", new CssRewriteUrlTransform()).Include(
                            "~/Content/global/plugins/uniform/css/uniform.default.css", new CssRewriteUrlTransform()).Include(
                            "~/Content/global/plugins/bootstrap-switch/css/bootstrap-switch.css", new CssRewriteUrlTransform()));

            bundles.Add(new StyleBundle("~/css/page_level").Include(
                            "~/Content/global/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css", new CssRewriteUrlTransform()).Include(
                            "~/Content/global/plugins/bootstrap-modal/css/bootstrap-modal.css", new CssRewriteUrlTransform()));

            bundles.Add(new StyleBundle("~/css/page_styles").Include(
                            "~/Content/admin/pages/css/tasks.css", new CssRewriteUrlTransform()));

            bundles.Add(new StyleBundle("~/css/theme_styles").Include(
                            "~/Content/global/css/components.css", new CssRewriteUrlTransform()).Include(
                            //"~/Content/global/css/plugins.csss", new CssRewriteUrlTransform()).Include(
                            "~/Content/admin/layout/css/layout.css", new CssRewriteUrlTransform()).Include(
                            "~/Content/admin/layout/css/themes/darkblue.css", new CssRewriteUrlTransform()).Include(
                            "~/Content/admin/layout/css/custom.css", new CssRewriteUrlTransform()));

            bundles.Add(new ScriptBundle("~/js/bootstrap").Include(
                            "~/Content/global/plugins/bootstrap/js/bootstrap.min.js",
                            "~/Content/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js",
                            "~/Content/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js",
                            "~/Content/global/plugins/bootstrap-daterangepicker/daterangepicker.js"
                            ));
            //Awes模組
            bundles.Add(new ScriptBundle("~/bundle/Scripts/js").Include(
                            "~/Scripts/AwesomeMvc.js",
                            "~/Scripts/awem.js",
                            "~/Scripts/utils.js",
                            "~/Scripts/Site.js")
                        );
            //JQuery-Validation Plugin
            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                            "~/Scripts/jquery.validate*"));

            /*
             * bundles.Add(new ScriptBundle("~/js/jq_vmap").Include(
             *  "~/Content/global/plugins/jqvmap/jqvmap/jquery.vmap.js",
             *  "~/Content/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.russia.js",
             *  "~/Content/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.world.js",
             *  "~/Content/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.europe.js",
             *  "~/Content/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.germany.js",
             *  "~/Content/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.usa.js",
             *  "~/Content/global/plugins/jqvmap/jqvmap/data/jquery.vmap.sampledata.js"));
             *
             * bundles.Add(new ScriptBundle("~/js/jq_flot").Include(
             *  "~/Content/global/plugins/flot/jquery.flot.min.js",
             *  "~/Content/global/plugins/flot/jquery.flot.resize.min.js",
             *  "~/Content/global/plugins/flot/jquery.flot.categories.min.js"));
             */
            //打包和壓縮
            BundleTable.EnableOptimizations = false;
        }
Ejemplo n.º 13
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.IgnoreList.Clear();
            AddDefaultIgnorePatterns(bundles.IgnoreList);

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

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

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

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

            bundles.Add(
              new ScriptBundle("~/scripts/vendor")
                .Include("~/scripts/tag-it.js")
                .Include("~/scripts/knockout-{version}.js")
                .Include("~/scripts/sammy-{version}.js")
                .Include("~/scripts/toastr.js")
                .Include("~/scripts/Q.js")
                .Include("~/scripts/breeze.debug.js")
                .Include("~/scripts/moment.js")
                .Include("~/Scripts/i18next-{version}.js")
                .Include("~/scripts/pagedown/Markdown.Converter.js")
                .Include("~/scripts/pagedown/Markdown.Editor.js")
                .Include("~/scripts/pagedown/Markdown.Sanitizer.js")
              
              );
            bundles.Add(
              new ScriptBundle("~/scripts/signalr")
                .Include("~/Scripts/jquery.signalR-{version}.js")
            );
            IItemTransform cssFixer = new CssRewriteUrlTransform();

            bundles.Add(
              new StyleBundle("~/content/css")
                .Include("~/content/ie10mobile.css")
                .Include("~/content/bootstrap/bootstrap.css", cssFixer)
                .Include("~/content/bootstrap/bootstrap-theme.css", cssFixer)
                .Include("~/content/font-awesome.css")
                .Include("~/content/durandal.css")
                .Include("~/content/toastr.css")
                .Include("~/content/app.css")
                .Include("~/content/pagedown/pagedown.bootstrap.fontawesome.css")
                .Include("~/content/jquery.tagit.css")
                .Include("~/content/tagit.ui-zendesk.css")
                .Include("~/content/themes/base/jquery-ui.css")
          );
        }
Ejemplo n.º 14
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.IgnoreList.Clear();
            AddDefaultIgnorePatterns(bundles.IgnoreList);

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

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

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

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

            bundles.Add(
                new ScriptBundle("~/scripts/vendor")
                .Include("~/scripts/tag-it.js")
                .Include("~/scripts/knockout-{version}.js")
                .Include("~/scripts/sammy-{version}.js")
                .Include("~/scripts/toastr.js")
                .Include("~/scripts/Q.js")
                .Include("~/scripts/breeze.debug.js")
                .Include("~/scripts/moment.js")
                .Include("~/Scripts/i18next-{version}.js")
                .Include("~/scripts/pagedown/Markdown.Converter.js")
                .Include("~/scripts/pagedown/Markdown.Editor.js")
                .Include("~/scripts/pagedown/Markdown.Sanitizer.js")

                );
            bundles.Add(
                new ScriptBundle("~/scripts/signalr")
                .Include("~/Scripts/jquery.signalR-{version}.js")
                );
            IItemTransform cssFixer = new CssRewriteUrlTransform();

            bundles.Add(
                new StyleBundle("~/content/css")
                .Include("~/content/ie10mobile.css")
                .Include("~/content/bootstrap/bootstrap.css", cssFixer)
                .Include("~/content/bootstrap/bootstrap-theme.css", cssFixer)
                .Include("~/content/font-awesome.css")
                .Include("~/content/durandal.css")
                .Include("~/content/toastr.css")
                .Include("~/content/app.css")
                .Include("~/content/pagedown/pagedown.bootstrap.fontawesome.css")
                .Include("~/content/jquery.tagit.css")
                .Include("~/content/tagit.ui-zendesk.css")
                .Include("~/content/themes/base/jquery-ui.css")
                );
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 对 CSS 资源打包压缩,并替换 CSS 中的相对路径为绝对路径,以避免 CSS 中引用的资源(如:图像)路径不对,导致失效。
        /// </summary>
        /// <param name="bundle"><see cref="System.Web.Optimization.Bundle"/></param>
        /// <param name="virtualPaths">资源的虚拟路径。</param>
        /// <returns><see cref="System.Web.Optimization.Bundle"/></returns>
        public static Bundle IncludeCssRewriteUrl(this Bundle bundle, params string[] virtualPaths)
        {
            CssRewriteUrlTransform transform = new CssRewriteUrlTransform();

            foreach (var path in virtualPaths)
            {
                bundle.Include(path, transform);
            }
            return(bundle);
        }
Ejemplo n.º 16
0
 public void RebaseArgumentCheckingTests()
 {
     // i.e. moving css from /content/foo.css => /bundles/css
     Assert.AreEqual("foo", CssRewriteUrlTransform.RebaseUrlToAbsolute("  ", "foo"));
     Assert.AreEqual("foo", CssRewriteUrlTransform.RebaseUrlToAbsolute("", "foo"));
     Assert.AreEqual("foo", CssRewriteUrlTransform.RebaseUrlToAbsolute(null, "foo"));
     Assert.AreEqual(" ", CssRewriteUrlTransform.RebaseUrlToAbsolute("/content", " "));
     Assert.AreEqual("", CssRewriteUrlTransform.RebaseUrlToAbsolute("/content", ""));
     Assert.AreEqual(null, CssRewriteUrlTransform.RebaseUrlToAbsolute("/content", null));
 }
Ejemplo n.º 17
0
        public void Register(BundleCollection bundles)
        {
            // Note to self: don't have '-' in folder name (file name is fine)...
            // If there's a '-' in the folder name, then the file won't be found

            #region Scripts

            bundles.Add(new ScriptBundle("~/bundles/js/kore/common")
                        .Include("~/Scripts/Kore.Web.CommonResources.Scripts.kore-common.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore/jqueryval")
                        .Include("~/Scripts/Kore.Web.CommonResources.Scripts.kore-jqval.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore/knockout-chosen")
                        .Include("~/Scripts/Kore.Web.CommonResources.Scripts.kore-knockout-chosen.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore/section-switching")
                        .Include("~/Scripts/Kore.Web.CommonResources.Scripts.kore-section-switching.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore/tinymce")
                        .Include("~/Scripts/Kore.Web.CommonResources.Scripts.kore-tinymce.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/third-party/bootpag")
                        .Include("~/Scripts/Kore.Web.CommonResources.Scripts.jquery.bootpag.min.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/third-party/bootstrap-fileinput")
                        .Include("~/Scripts/Kore.Web.CommonResources.Scripts.bootstrapFileInput.fileinput.min.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/third-party/bootstrap-slider")
                        .Include("~/Scripts/Kore.Web.CommonResources.Scripts.bootstrap-slider.min.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/third-party/bootstrap-slider-knockout")
                        .Include("~/Scripts/Kore.Web.CommonResources.Scripts.bootstrap-slider-knockout-binding.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/third-party/momentjs")
                        .Include("~/Scripts/Kore.Web.CommonResources.Scripts.moment-with-locales.min.js"));

            #endregion Scripts

            #region Styles

            IItemTransform cssRewriteUrlTransform = new CssRewriteUrlTransform();

            bundles.Add(new StyleBundle("~/bundles/content/third-party/bootstrap-fileinput")
                        .Include("~/Content/Kore.Web.CommonResources.Content.bootstrapFileInput.css.fileinput.min.css", cssRewriteUrlTransform));

            bundles.Add(new StyleBundle("~/bundles/content/third-party/bootstrap-slider")
                        .Include("~/Content/Kore.Web.CommonResources.Content.bootstrap-slider.min.css", cssRewriteUrlTransform));

            bundles.Add(new StyleBundle("~/bundles/content/third-party/metro")
                        .Include("~/Content/Kore.Web.CommonResources.Content.metro.blue.css", cssRewriteUrlTransform));

            #endregion Styles
        }
Ejemplo n.º 18
0
        protected override void Handle(BundleCollection bundles, string bundleName, StreamWriter log,
                                       params string[] includeVirtualPathes)
        {
            if (bundleName.ToLower().EndsWith(".min.js"))
            {
                log.WriteLine("//{0},", bundleName);
                return;
            }
            var fileInfo       = new FileInfo(bundleName);
            var bundleFileInfo = new FileInfo(bundleName);

            bool isCss = fileInfo.Name.EndsWith(".css");
            bool isJs  = fileInfo.Name.StartsWith("jquery.") && fileInfo.Name.EndsWith(".js");

            if (!isCss && !isJs)
            {
                return;
            }


            int intPos = bundleName.LastIndexOf("/", StringComparison.Ordinal);

            bundleName = bundleName.Substring(0, intPos) + "/"
                         + Regex.Replace(bundleFileInfo.Name, @"(jquery\.)", "");



            Bundle bundle = null;

            if (isCss)
            {
                var styleBundle = new StyleBundle(bundleName);
                var trans       = new CssRewriteUrlTransform();
                foreach (var file in includeVirtualPathes)
                {
                    styleBundle.Include(file, trans);
                }
                bundle = styleBundle;
            }
            else
            {
                bundle = new JQueryPluginSeajsBundle(bundleName);
                bundle.Include(includeVirtualPathes);
            }
            bundles.Add(bundle);


            log.WriteLine("\"{0}\":\"{1}\",",
                          Regex.Replace(bundleFileInfo.Name, @"(jquery\.)|(-[\d.]+\d)", "", RegexOptions.IgnoreCase)
                          .Replace(".js", ""),
                          bundleName.Replace("~/", "/"));
        }
Ejemplo n.º 19
0
        public void Register(BundleCollection bundles)
        {
            #region Scripts

            #region 3rd Party

            bundles.Add(new ScriptBundle("~/bundles/js/third-party/jQCloud")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Scripts.jqcloud.min.js"));

            #endregion 3rd Party

            bundles.Add(new ScriptBundle("~/bundles/js/kore-cms/blog")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Areas.Admin.Blog.Scripts.blog.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore-cms/content-blocks")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Areas.Admin.ContentBlocks.Scripts.contentBlocks.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore-cms/entity-type-content-blocks")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Areas.Admin.ContentBlocks.Scripts.entityTypeContentBlocks.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore-cms/media")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Areas.Admin.Media.Scripts.media.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore-cms/menus")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Areas.Admin.Menus.Scripts.menus.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore-cms/message-templates")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Areas.Admin.Messaging.Scripts.messageTemplates.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore-cms/newsletters/subscribers")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Areas.Admin.Newsletters.Scripts.subscribers.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore-cms/pages")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Areas.Admin.Pages.Scripts.index.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore-cms/queued-emails")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Areas.Admin.Messaging.Scripts.queuedEmails.js"));

            bundles.Add(new ScriptBundle("~/bundles/js/kore-cms/xml-sitemap")
                        .Include("~/Scripts/Kore.Web.ContentManagement.Areas.Admin.Sitemap.Scripts.index.js"));

            #endregion Scripts

            #region Styles

            IItemTransform cssRewriteUrlTransform = new CssRewriteUrlTransform();

            bundles.Add(new StyleBundle("~/bundles/content/third-party/jQCloud")
                        .Include("~/Content/Kore.Web.ContentManagement.Content.jqcloud.min.css", cssRewriteUrlTransform));

            #endregion Styles
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Constructor method.
        /// </summary>
        public ThemeStyles() : base(BundleVirtualPath)
        {
            // Fix relative urls in css files
            var urlTransform = new CssRewriteUrlTransform();

            // Theme CSS
            Include("~/assets/stylesheets/theme.css", urlTransform);

            // Skin CSS
            Include("~/assets/stylesheets/skins/default.css", urlTransform);
            Include("~/assets/stylesheets/skins/square-borders.css", urlTransform);

            // Theme Custom CSS
            Include("~/assets/stylesheets/theme-custom.css", urlTransform);
        }
Ejemplo n.º 21
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.IgnoreList.Clear();
            AddDefaultIgnorePatterns(bundles.IgnoreList);

            // js Vendor
            bundles.Add(
                new ScriptBundle("~/scripts/vendor")
                .Include("~/Scripts/jquery-{version}.js")
                .Include("~/Scripts/knockout-{version}.js")
                .Include("~/Scripts/knockout.validation.js")
                .Include("~/Scripts/bootstrap.js")
                .Include("~/Scripts/jquery.hammer.min.js")
                .Include("~/Scripts/Stashy.js")
                .Include("~/Scripts/Q.js")
                .Include("~/Scripts/breeze.min.js")
                .Include("~/Scripts/moment.js")
                .Include("~/Scripts/jquery.tagsinput.js")
                .Include("~/Scripts/marked.js")
                .Include("~/Scripts/zen-form.js")
                .Include("~/Scripts/highlight.pack.js")
                .Include("~/Scripts/jquery.tagsinput.js")
                );
            IItemTransform cssFixer = new CssRewriteUrlTransform();

            // css vendor
            bundles.Add(
                new StyleBundle("~/Content/css")
                .Include("~/Content/ie10mobile.css")
                //.Include("~/content/bootstrap/bootstrap.css", cssFixer)
                //.Include("~/content/bootstrap/bootstrap-theme.css", cssFixer)
                .Include("~/Content/bootstrap.css", cssFixer)
                .Include("~/Content/font-awesome.css")
                .Include("~/Content/durandal.css")
                .Include("~/Content/toastr.css")
                .Include("~/Content/Stashy.css")
                .Include("~/Content/jquery.tagsinput.css")
                .Include("~/Content/zen-form.css")
                .Include("~/Content/vs.css")
                .Include("~/Content/social-buttons-3.css")
                );

            // css custom
            bundles.Add(
                new StyleBundle("~/Content/custom")
                .Include("~/Content/app.css")
                );
        }
Ejemplo n.º 22
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var orderer       = new NonOrderingBundleOrderer();
            var cssRewriteUrl = new CssRewriteUrlTransform();

            //Basic Js&Css============================================================
            var styleBundle = new StyleBundle("~/css/basic-css")
                              .Include("~/css/fonts.css") //should be before any other stylesheet!
                              .Include("~/css/jquery-ui/jquery-ui.min.css", cssRewriteUrl)

                              .Include("~/css/magnific-popup.css")
                              .Include("~/css/owl-carousel/owl.carousel.css", cssRewriteUrl)
                              .Include("~/css/owl-carousel/owl.transitions.css")
                              .Include("~/css/owl-carousel/owl.theme.css", cssRewriteUrl)

                              .Include("~/css/styles.min.css", cssRewriteUrl);

            styleBundle.Orderer = orderer;
            bundles.Add(styleBundle);

            var scriptBundle = new ScriptBundle("~/js/basic-js")
                               .Include("~/js/jquery/jquery-2.2.1.min.js")
                               .Include("~/js/bootstrap/bootstrap.min.js")
                               .Include("~/js/jquery/jquery-ui-1.11.4.min.js")
                               .Include("~/js/jquery/jquery.validate.min.js")             //JQuery validation
                               .Include("~/js/jquery/jquery.validate.unobtrusive.min.js") //MVC client validation with html attributes
                               .Include("~/js/jquery/jquery.unobtrusive-ajax.min.js")     //Added support for ajax forms...

                               .Include("~/js/imagesloaded.pkgd.min.js")
                               .Include("~/js/masonry.pkgd.min.js")
                               .Include("~/js/jquery.unveil.js")
                               .Include("~/js/magnific.popup.min.js")
                               .Include("~/js/owl-carousel/owl.carousel.min.js")
                               .Include("~/js/director.min.js")

                               .Include("~/App_Plugins/UmbracoForms/Assets/moment/moment.min.js")

                               .Include("~/scripts/utils.js")
                               .Include("~/scripts/config.js");

            scriptBundle.Orderer = orderer;
            bundles.Add(scriptBundle);

            //BundleTable.EnableOptimizations = false;
        }
        protected override void Handle(BundleCollection bundles, string bundleName, StreamWriter log,
            params string[] includeVirtualPathes)
        {
            if (bundleName.ToLower().EndsWith(".min.js"))
            {
                log.WriteLine("//{0},", bundleName);
                return;
            }
            var fileInfo = new FileInfo(bundleName);
            var bundleFileInfo = new FileInfo(bundleName);

            bool isCss = fileInfo.Name.EndsWith(".css");
            bool isJs = fileInfo.Name.StartsWith("jquery.") && fileInfo.Name.EndsWith(".js");

            if (!isCss && !isJs)
                return;

            int intPos = bundleName.LastIndexOf("/", StringComparison.Ordinal);

            bundleName = bundleName.Substring(0, intPos) + "/"
                         + Regex.Replace(bundleFileInfo.Name, @"(jquery\.)", "");

            Bundle bundle = null;
            if (isCss)
            {
                var styleBundle = new StyleBundle(bundleName);
                var trans = new CssRewriteUrlTransform();
                foreach (var file in includeVirtualPathes)
                {
                    styleBundle.Include(file, trans);
                }
                bundle = styleBundle;
            }
            else
            {
                bundle = new JQueryPluginSeajsBundle(bundleName);
                bundle.Include(includeVirtualPathes);
            }
            bundles.Add(bundle);

            log.WriteLine("\"{0}\":\"{1}\",",
                Regex.Replace(bundleFileInfo.Name, @"(jquery\.)|(-[\d.]+\d)", "", RegexOptions.IgnoreCase)
                    .Replace(".js", ""),
                bundleName.Replace("~/", "/"));
        }
        /// <summary>
        /// Processes the specified context.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="response">The response.</param>
        public void Process(BundleContext context, BundleResponse response)
        {
            // clear the response content, since we will need to rebuilt that piece by piece with contextual directory information
            response.Content = string.Empty;

            // regex that looks for all "URL(*)" statements in a css file
            foreach (var bundleFile in response.Files)
            {
                // determine the full file path and read all its contents
                // we cannot use response.Content since that contains content from ALL consolidated files.
                var cssFile = context.HttpContext.Server.MapPath(bundleFile.IncludedVirtualPath);
                var cssContent = File.ReadAllText(cssFile);

                // transform the content by reutilizing the built in item level transform for each file.
                var transform = new CssRewriteUrlTransform();
                response.Content += transform.Process(bundleFile.IncludedVirtualPath, cssContent);
            }
        }
Ejemplo n.º 25
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var orderer = new NonOrderingBundleOrderer();
            var cssRewriteUrl = new CssRewriteUrlTransform();

            //Basic Js&Css============================================================
            var styleBundle = new StyleBundle("~/css/basic-css")
                .Include("~/css/fonts.css") //should be before any other stylesheet!
                .Include("~/css/jquery-ui/jquery-ui.min.css", cssRewriteUrl)

                .Include("~/css/magnific-popup.css")
                .Include("~/css/owl-carousel/owl.carousel.css", cssRewriteUrl)
                .Include("~/css/owl-carousel/owl.transitions.css")
                .Include("~/css/owl-carousel/owl.theme.css", cssRewriteUrl)

                .Include("~/css/styles.min.css", cssRewriteUrl);
            styleBundle.Orderer = orderer;
            bundles.Add(styleBundle);

            var scriptBundle = new ScriptBundle("~/js/basic-js")
                .Include("~/js/jquery/jquery-2.2.1.min.js")
                .Include("~/js/bootstrap/bootstrap.min.js")
                .Include("~/js/jquery/jquery-ui-1.11.4.min.js")
                .Include("~/js/jquery/jquery.validate.min.js")//JQuery validation
                .Include("~/js/jquery/jquery.validate.unobtrusive.min.js")//MVC client validation with html attributes
                .Include("~/js/jquery/jquery.unobtrusive-ajax.min.js")//Added support for ajax forms...

                .Include("~/js/imagesloaded.pkgd.min.js")
                .Include("~/js/masonry.pkgd.min.js")
                .Include("~/js/jquery.unveil.js")
                .Include("~/js/magnific.popup.min.js")
                .Include("~/js/owl-carousel/owl.carousel.min.js")
                .Include("~/js/director.min.js")

                .Include("~/App_Plugins/UmbracoForms/Assets/moment/moment.min.js")

                .Include("~/scripts/utils.js")
                .Include("~/scripts/config.js");
            scriptBundle.Orderer = orderer;
            bundles.Add(scriptBundle);

            //BundleTable.EnableOptimizations = false;
        }
Ejemplo n.º 26
0
        /// <summary>
        /// Includes the specified <paramref name="virtualPaths"/> within the bundle and attached the
        /// <see cref="System.Web.Optimization.CssRewriteUrlTransform"/> item transformer to each item
        /// automatically.
        /// </summary>
        /// <param name="bundle">The bundle.</param>
        /// <param name="virtualPaths">The virtual paths.</param>
        /// <returns>Bundle.</returns>
        /// <exception cref="System.ArgumentException">Only available to StyleBundle;bundle</exception>
        /// <exception cref="System.ArgumentNullException">virtualPaths;Cannot be null or empty</exception>
        public static Bundle IncludeWithCssRewriteTransform(this Bundle bundle, params String[] virtualPaths)
        {
            if (!(bundle is StyleBundle))
            {
                throw new ArgumentException("Only available to StyleBundle", "bundle");
            }
            if (virtualPaths == null || virtualPaths.Length == 0)
            {
                throw new ArgumentNullException("virtualPaths", "Cannot be null or empty");
            }
            IItemTransform itemTransform = new CssRewriteUrlTransform();

            foreach (String virtualPath in virtualPaths)
            {
                if (!String.IsNullOrWhiteSpace(virtualPath))
                {
                    bundle.Include(virtualPath, itemTransform);
                }
            }
            return(bundle);
        }
Ejemplo n.º 27
0
        /// <summary>
        /// Constructor method.
        /// </summary>
        public CoreStyles() : base(BundleVirtualPath)
        {
            // Fix relative urls in css files
            // Css relative paths should be wrapped by quotes or include the min file.
            var urlTransform = new CssRewriteUrlTransform();

            Include("~/assets/vendor/bootstrap/css/bootstrap.min.css", urlTransform);
            Include("~/assets/vendor/font-awesome/css/font-awesome.min.css", urlTransform);
            Include("~/assets/vendor/magnific-popup/magnific-popup.css", urlTransform);
            Include("~/assets/vendor/bootstrap-datepicker/css/bootstrap-datepicker3.css", urlTransform);
            Include("~/assets/vendor/bootstrap-timepicker/css/bootstrap-timepicker.css", urlTransform);

            Include("~/assets/vendor/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css", urlTransform);

            Include("~/assets/vendor/jquery-ui/jquery-ui.css", urlTransform);
            Include("~/assets/vendor/jquery-ui/jquery-ui.theme.css", urlTransform);

            Include("~/assets/vendor/pnotify/pnotify.custom.css", urlTransform);

            Include("~/assets/vendor/select2/css/select2.css", urlTransform);
            Include("~/assets/vendor/select2-bootstrap-theme/select2-bootstrap.css", urlTransform);
        }
Ejemplo n.º 28
0
        public void RebaseTemplateContentSiteCssTest()
        {
            var    css         = new CssRewriteUrlTransform();
            string siteCss     = @"
.main-content {
    background: url(""../Images/accent.png"") no-repeat;
}

.featured + .main-content {
    background: url(""../Images/heroAccent.png"") no-repeat;
}";
            string expectedCss = @"
.main-content {
    background: url(/Images/accent.png) no-repeat;
}

.featured + .main-content {
    background: url(/Images/heroAccent.png) no-repeat;
}";

            Assert.AreEqual(expectedCss, CssRewriteUrlTransform.ConvertUrlsToAbsolute("/content", siteCss));
        }
Ejemplo n.º 29
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(
                new ScriptBundle("~/assets/bundles/jquery")
                    .Include("~/assets/js/jquery/jquery-{version}.js"));

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

            bundles.Add(
                new ScriptBundle("~/assets/bundles/main")
                    .Include("~/assets/js/main.js")
            );

            bundles.Add(
                new ScriptBundle("~/assets/bundles/plugins")
                    .Include("~/assets/js/plugins/fileinput/js/*.js")
                    .Include("~/assets/js/plugins/easybox/distrib.js")
            );

            bundles.Add(
                new ScriptBundle("~/assets/bundles/jqueryval")
                    .Include("~/assets/js/jqueryval/*.js"));

            bundles.Add(
                new ScriptBundle("~/assets/bundles/modernizr")
                    .Include("~/assets/js/modernizr/*.js"));

            IItemTransform cssFixer = new CssRewriteUrlTransform();
            bundles.Add(
                new StyleBundle("~/assets/bundles/css")
                    .Include("~/assets/css/bootstrap.css", cssFixer)
                    .Include("~/assets/css/responsive.css", cssFixer)
                    .Include("~/assets/css/style.css", cssFixer)
                    .Include("~/assets/js/plugins/fileinput/css/style.css", cssFixer)
                    .Include("~/assets/js/plugins/easybox/styles/default/easybox.css", cssFixer)
            );
        }
Ejemplo n.º 30
0
 public void RebaseBasicRelativeUrlTest()
 {
     // i.e. moving css from /content/foo.css => /bundles/css
     Assert.AreEqual("/content/images/bg.jpg", CssRewriteUrlTransform.RebaseUrlToAbsolute("/content", "images/bg.jpg"));
 }
Ejemplo n.º 31
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.IgnoreList.Clear();
            var cssRewrite = new CssRewriteUrlTransform();

            //VENDOR RESOURCES

            //~/Bundles/App/vendor/css
            var venderStyles = new StyleBundle("~/Bundles/App/vendor/css")
                               .Include("~/Content/themes/base/all.css", cssRewrite)
                               .Include("~/Content/bootstrap-cosmo.min.css", cssRewrite)
                               .Include("~/Content/toastr.min.css")
                               .Include("~/Scripts/sweetalert/sweet-alert.css")
                               .Include("~/Content/flags/famfamfam-flags.css", cssRewrite)
                               .Include("~/Content/font-awesome.min.css", cssRewrite);

            bundles.Add(venderStyles);

            //~/Bundles/App/vendor/js
            var venderScripts = new ScriptBundle("~/Bundles/App/vendor/js")
                                .Include(
                "~/Abp/Framework/scripts/utils/ie10fix.js",
                "~/Scripts/json2.min.js",

                "~/Scripts/modernizr-2.8.3.js",

                "~/Scripts/jquery-2.1.4.min.js",
                "~/Scripts/jquery-ui-1.11.4.min.js",

                "~/Scripts/bootstrap.min.js",

                "~/Scripts/moment-with-locales.min.js",
                "~/Scripts/jquery.blockUI.js",
                "~/Scripts/toastr.min.js",
                "~/Scripts/sweetalert/sweet-alert.min.js",
                "~/Scripts/others/spinjs/spin.js",
                "~/Scripts/others/spinjs/jquery.spin.js",

                "~/Scripts/angular.min.js",
                "~/Scripts/angular-animate.min.js",
                "~/Scripts/angular-sanitize.min.js",
                "~/Scripts/angular-ui-router.min.js",
                "~/Scripts/angular-ui/ui-bootstrap.min.js",
                "~/Scripts/angular-ui/ui-bootstrap-tpls.min.js",
                "~/Scripts/angular-ui/ui-utils.min.js",
                "~/Scripts/angular-messages.min.js",

                "~/Abp/Framework/scripts/abp.js",
                "~/Abp/Framework/scripts/libs/abp.jquery.js",
                "~/Abp/Framework/scripts/libs/abp.toastr.js",
                "~/Abp/Framework/scripts/libs/abp.blockUI.js",
                "~/Abp/Framework/scripts/libs/abp.spin.js",
                "~/Abp/Framework/scripts/libs/abp.sweet-alert.js",
                "~/Abp/Framework/scripts/libs/angularjs/abp.ng.js"
                );

            bundles.Add(venderScripts);

            //APPLICATION RESOURCES

            //~/Bundles/App/Main/css
            var appStyles = new StyleBundle("~/Bundles/App/Main/css")
                            .IncludeDirectory("~/App/Main", "*.css", true);

            bundles.Add(appStyles);

            //~/Bundles/App/Main/js
            var appScripts = new ScriptBundle("~/Bundles/App/Main/js")
                             .IncludeDirectory("~/App/Main", "*.js", true);

            bundles.Add(appScripts);

            bundles.Add(new PartialsBundle("~/Bundles/App/partials.js", "app")
                        .IncludeDirectory("~/App/Main/partials", "*.html", true));

#if DEBUG
            foreach (var registeredBundle in bundles.GetRegisteredBundles())
            {
                if (registeredBundle is ScriptBundle)
                {
                    registeredBundle.Transforms.Add(new RemoveMinifyTransform());
                }
            }
#else
            BundleTable.EnableOptimizations = true;
#endif
        }
 public CssRewriteUrlWithVirtualDirectoryTransform()
 {
     _rewriteUrlTransform = new CssRewriteUrlTransform();
 }
Ejemplo n.º 33
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            CssRewriteUrlTransform cssWriter = new CssRewriteUrlTransform();

            //login
            bundles.Add(new StyleBundle("~/cssLogin")
                        .Include("~/Content/metronic/assets/pages/css/login.min.css", cssWriter));
            bundles.Add(new ScriptBundle("~/jsLogin").Include(
                            "~/Content/metronic/assets/pages/scripts/login.min.js"
                            ));

            //layout
            bundles.Add(new StyleBundle("~/cssLayout")
                        .Include("~/Content/metronic/assets/layouts/layout3/css/layout.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/layouts/layout3/css/themes/default.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/layouts/layout3/css/custom.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/layouts/layout3/css/custom.min.css", cssWriter));
            bundles.Add(new ScriptBundle("~/jsLayout").Include(
                            "~/Content/metronic/assets/layouts/layout3/scripts/layout.min.js",
                            "~/Content/metronic/assets/layouts/layout3/scripts/demo.min.js"
                            ));



            bundles.Add(new StyleBundle("~/cssKendo")
                        .Include("~/Content/kendoCss/kendo.common-bootstrap.min.css", cssWriter)
                        .Include("~/Content/kendoCss/kendo.bootstrap.min.css", cssWriter)
                        );
            bundles.Add(new StyleBundle("~/cssApp")
                        .Include("~/Content/metronic/assets/global/plugins/font-awesome/css/font-awesome.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/global/plugins/simple-line-icons/simple-line-icons.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/global/plugins/bootstrap/css/bootstrap.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/global/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/global/plugins/fullcalendar/fullcalendar.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/global/plugins/jquery-ui/jquery-ui.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/global/css/components-md.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/global/css/plugins-md.min.css", cssWriter)
                        .Include("~/Content/sweet-alertCss/sweet-alert.css", cssWriter)
                        .Include("~/Content/metronic/assets/global/plugins/bootstrap-toastr/toastr.min.css", cssWriter)
                        .Include("~/Content/metronic/assets/global/plugins/jquery-notific8/jquery.notific8.min.css", cssWriter)
                        .Include("~/Content/webapp.cs"));


            bundles.Add(new ScriptBundle("~/jsJquery").Include(
                            "~/Content/kendoJs/jquery.min.js"
                            ));

            bundles.Add(new ScriptBundle("~/jsJqueryUI").Include(
                            "~/Content/metronic/assets/global/plugins/jquery-ui/jquery-ui.min.js"
                            ));

            bundles.Add(new ScriptBundle("~/jsKendo").Include(
                            "~/Content/kendoJs/kendo.all.min.js",
                            "~/Content/kendoJs/cultures/kendo.culture.id-ID.min.js"
                            ));

            bundles.Add(new ScriptBundle("~/jsMaps").Include(
                            "~/Content/metronic/assets/global/plugins/gmaps/gmaps.min.js",
                            "~/Content/metronic/assets/pages/scripts/maps-google.min.js"
                            ));

            bundles.Add(new ScriptBundle("~/jsApp").Include(
                            "~/Content/webapp.js",
                            "~/Content/metronic/assets/global/plugins/bootstrap/js/bootstrap.min.js",
                            "~/Content/metronic/assets/global/plugins/bootstrap-timepicker/js/bootstrap-timepicker.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-toastr/toastr.min.js",
                            "~/Content/metronic/assets/global/plugins/bootbox/bootbox.min.js",
                            "~/Content/metronic/assets/global/plugins/bootstrap-confirmation/bootstrap-confirmation.min.js",
                            "~/Content/metronic/assets/global/plugins/jquery-notific8/jquery.notific8.min.js",
                            "~/Content/metronic/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js",
                            "~/Content/metronic/assets/global/scripts/app.min.js",
                            "~/Content/metronic/assets/pages/scripts/ui-modals.min.js",
                            "~/Content/metronic/assets/global/plugins/moment.min.js",
                            "~/Content/metronic/assets/global/plugins/fullcalendar/fullcalendar.min.js",
                            "~/Content/metronic/assets/layouts/global/scripts/quick-sidebar.min.js",
                            "~/Content/metronic/assets/layouts/global/scripts/quick-nav.min.js",
                            "~/Content/sweet-alertJs/sweet-alert.min.js",
                            "~/Content/Jszip/jszip.min.js",
                            "~/Content/Howler/src/howler.core.js"
                            ));

            bundles.IgnoreList.Clear();
            BundleTable.EnableOptimizations = true;
        }
Ejemplo n.º 34
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            IItemTransform cssFixer = new CssRewriteUrlTransform();

            #region Back-end bundles

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

            bundles.Add(new StyleBundle("~/Content/css-kendo-backend")
                        .Include("~/Content/kendo/2017.3.1026/kendo.common.min.css", cssFixer)
                        .Include("~/Content/kendo/2017.3.1026/kendo.mobile.all.min.css")
                        .Include("~/Content/kendo/2017.3.1026/kendo.dataviz.min.css")
                        .Include("~/Content/kendo/2017.3.1026/kendo.default.min.css", cssFixer)
                        .Include("~/Content/kendo/2017.3.1026/kendo.dataviz.default.min.css"));

            bundles.Add(new ScriptBundle("~/bundles/js-kendo-backend").Include(
                            "~/Scripts/kendo/2017.3.1026/jquery.min.js",
                            "~/Scripts/kendo/2017.3.1026/jszip.min.js",
                            "~/Scripts/kendo/2017.3.1026/kendo.all.min.js",
                            "~/Scripts/kendo/2017.3.1026/kendo.aspnetmvc.min.js",
                            "~/Scripts/kendo.modernizr.custom.js",
                            "~/Scripts/kendo/2017.3.1026/kendo.culture.en-GB.js",
                            "~/Scripts/jquery.maskedinput.min.js"));

            bundles.Add(new ScriptBundle("~/bundles/js-custom-backend").Include(
                            "~/Scripts/GlobalValidations.js",
                            "~/Scripts/jquery.maskedinput.min.js",
                            "~/Scripts/bootstrap-dialog-override.js"));

            bundles.Add(new StyleBundle("~/Content/css-custom-backend").Include(
                            "~/Content/style.css", cssFixer));

            // 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-*"));

            //Player Views
            bundles.Add(new ScriptBundle("~/bundles/LinkedProfile-js").Include("~/Scripts/views_js/Players/LinkedProfile.js"));
            bundles.Add(new ScriptBundle("~/bundles/Players_Details-js").Include("~/Scripts/views_js/Players/Players_Details.js"));

            //League Views
            bundles.Add(new ScriptBundle("~/bundles/Leagues-Index-js").Include("~/Scripts/views_js/Leagues/Leagues_Index.js"));
            bundles.Add(new ScriptBundle("~/bundles/Leagues-Details-js").Include("~/Scripts/views_js/Leagues/Leagues_Details.js"));
            bundles.Add(new ScriptBundle("~/bundles/League_tabFixtures-js").Include("~/Scripts/views_js/Leagues/League_tabFixtures.js"));
            bundles.Add(new ScriptBundle("~/bundles/League_tabPlayerWeightWeek-js").Include("~/Scripts/views_js/Leagues/League_tabPlayerWeightWeek.js"));
            #endregion Back-end bundles

            #region Common Bundles

            bundles.Add(new StyleBundle("~/Content/css-bootstrap")
                        .Include("~/Content/bootstrap.css", cssFixer)
                        .Include("~/Content/bootstrap-dialog.min.css", cssFixer)
                        .Include("~/Content/bootstrapToggle/css/bootstrap-toggle.min.css", cssFixer));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                            "~/Scripts/bootstrap.js",
                            "~/Scripts/respond.js",
                            "~/Scripts/bootstrap-waitingfor.js",
                            "~/Scripts/bootstrap-dialog.min.js",
                            "~/Content/bootstrapToggle/js/bootstrap-toggle.min.js"));

            //Individual View Js
            bundles.Add(new ScriptBundle("~/bundles/Alerts-Index-js").Include("~/Scripts/views_js/Alerts_Index.js"));

            bundles.Add(new ScriptBundle("~/bundles/Leagues-FixtureByTag-js").Include("~/Scripts/views_js/Leagues/Leagues_FixtureByTag.js"));


            bundles.Add(new ScriptBundle("~/bundles/Alerts_Global-js").Include("~/Scripts/views_js/Alerts_Global.js"));
            bundles.Add(new ScriptBundle("~/bundles/Grid_Resizer-js").Include("~/Scripts/views_js/Grid_Resizer.js"));
            bundles.Add(new ScriptBundle("~/bundles/PlayersArchive_Common-js").Include("~/Scripts/views_js/PlayersArchive/common.js"));
            bundles.Add(new ScriptBundle("~/bundles/Documents_Details-js").Include("~/Scripts/views_js/Documents_Details.js"));
            // bundles.Add(new ScriptBundle("~/bundles/DownForMaintenance-js").Include("~/Scripts/views_js/DownForMaintenance.js"));
            bundles.Add(new ScriptBundle("~/bundles/tab-PlayerImages-js").Include("~/Scripts/views_js/tab_PlayerImages.js"));
            bundles.Add(new ScriptBundle("~/bundles/tab-PlayerImages-FrontEnd-js").Include("~/Scripts/views_js/tab_PlayerImages_FrontEnd.js"));
            #endregion Common Bundles

            #region FrontEnd Bundles

            bundles.Add(new StyleBundle("~/Content/css-custom-frontend")
                        .Include("~/Content/FrontEnd/css/style.css", cssFixer)
                        .Include("~/Content/FrontEnd/assets/css/mvffootball.css", cssFixer)
                        .Include("~/Content/FrontEnd/assets/css/kendo_ui_override.css", cssFixer)
                        .Include("~/Content/FrontEnd/css/jquery-ui.css", cssFixer));

            bundles.Add(new ScriptBundle("~/bundles/js-main-frontend").Include(
                            "~/Content/FrontEnd/js/jquery.min.js"));

            bundles.Add(new ScriptBundle("~/bundles/js-frontend").Include(
                            "~/Content/FrontEnd/js/owl.carousel.min.js",
                            "~/Content/FrontEnd/js/jquery.ba-outside-events.min.js",
                            "~/Content/FrontEnd/js/tab.js",
                            "~/Content/FrontEnd/js/bootstrap-datepicker.js",
                            "~/Content/FrontEnd/twitter/jquery.tweet.min.js",
                            "~/Content/FrontEnd/js/jquery.timelinr-0.9.6.js",
                            "~/Content/FrontEnd/js/scripts.js",
                            "~/Scripts/jquery.maskedinput.min.js",
                            "~/Scripts/jquery-ui.js"));

            bundles.Add(new ScriptBundle("~/bundles/js-custom-frontend").Include(
                            "~/Scripts/GlobalValidations.js",
                            "~/Scripts/views_js/MVF_PayNow.js",
                            "~/Scripts/bootstrap-dialog-override.js"));

            bundles.Add(new StyleBundle("~/Content/css-kendo-frontend")
                        .Include("~/Content/kendo/2017.3.1026/kendo.common.min.css", cssFixer)
                        .Include("~/Content/kendo/2017.3.1026/kendo.default.min.css", cssFixer));

            bundles.Add(new ScriptBundle("~/bundles/js-kendo-frontend").Include(
                            "~/Scripts/kendo/2017.3.1026/kendo.all.min.js",
                            "~/Scripts/kendo/2017.3.1026/kendo.aspnetmvc.min.js"));

            bundles.Add(new ScriptBundle("~/bundles/Html5Gallery-js").Include("~/Content/FrontEnd/html5gallery/html5gallery.js"));


            bundles.Add(new ScriptBundle("~/bundles/EmergencyContactDetails-js").Include("~/Scripts/views_js/EmergencyContactDetails.js"));



            #endregion FrontEnd Bundles

            #region Progress Dashboard Bundles

            bundles.Add(new ScriptBundle("~/bundles/ProgressDashboard-js").Include(
                            //"~/Scripts/date.js",
                            "~/Scripts/moment.min.js",
                            "~/Scripts/views_js/Dashboard/DailyActivities.js",
                            "~/Scripts/views_js/Dashboard/WeeklyActivities.js",
                            "~/Scripts/views_js/MobileDetection.js",
                            "~/Scripts/views_js/Dashboard/Notifications.js"
                            ));

            bundles.Add(new StyleBundle("~/Content/ProgressDashboard-css")
                        .Include("~/Content/FrontEnd/charts/circle.css", cssFixer)
                        //  .Include("~/Content/FrontEnd/css/PremiumDashboard.css", cssFixer)
                        );

            bundles.Add(new ScriptBundle("~/bundles/ProgressDashboard-Settings-js").Include(
                            "~/Content/password_strength_meter/password.js",
                            "~/Scripts/views_js/Dashboard/DashboardSettings.js",
                            "~/Scripts/views_js/Dashboard/Dashboard_Common.js",
                            "~/Content/bootstrapSwitch/js/bootstrap-switch.min.js"

                            ));

            bundles.Add(new StyleBundle("~/Content/ProgressDashboard-Settings-css")
                        .Include("~/Content/password_strength_meter/password.css", cssFixer)
                        .Include("~/Content/bootstrapSwitch/css/bootstrap-switch.min.css", cssFixer)
                        );
            #endregion
        }
Ejemplo n.º 35
0
        /// <summary>
        /// Register all js and css files need to be bundled and minified
        /// </summary>
        /// <param name="bundles">Bundel collection bundles.
        /// </param>
        public static void RegisterBundles(BundleCollection bundles)
        {
            IItemTransform cssFixer = new CssRewriteUrlTransform();

            // CSS style (bootstrap/inspinia)
            bundles.Add(new StyleBundle("~/inspinia/css").Include("~/Content/wrapbootstrap.css"));

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

            // Font Awesome icons
            bundles.Add(
                new StyleBundle("~/font-awesome/css").Include(
                    "~/Content/plugins/fontawesome/css/font-awesome.css",
                    cssFixer));

            // jQuery
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include("~/Scripts/jquery-2.1.1.min.js"));

            // jQueryUI CSS
            bundles.Add(
                new StyleBundle("~/Scripts/plugins/jquery-ui/jqueryuiStyles").Include(
                    "~/Scripts/plugins/jquery-ui/jquery-ui.css"));

            // jQueryUI
            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include("~/Scripts/plugins/jquery-ui/jquery-ui.min.js"));

            // Bootstrap
            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include("~/Scripts/bootstrap.min.js"));

            // Inspinia script
            bundles.Add(new ScriptBundle("~/bundles/inspinia").Include("~/Scripts/app/inspinia.js"));

            // Metsi Menu
            bundles.Add(new ScriptBundle("~/plugins/metsiMenu").Include("~/Scripts/plugins/metisMenu/metisMenu.min.js"));

            // pace
            bundles.Add(new ScriptBundle("~/plugins/pace").Include("~/Scripts/plugins/pace/pace.min.js"));

            // Inspinia skin config script
            bundles.Add(new ScriptBundle("~/bundles/skinConfig").Include("~/Scripts/app/skin.config.min.js"));

            // SlimScroll
            bundles.Add(
                new ScriptBundle("~/plugins/slimScroll").Include(
                    "~/Scripts/plugins/slimscroll/jquery.slimscroll.min.js"));

            // Peity
            bundles.Add(new ScriptBundle("~/plugins/peity").Include("~/Scripts/plugins/peity/jquery.peity.min.js"));

            // Video responsible
            bundles.Add(
                new ScriptBundle("~/plugins/videoResponsible").Include("~/Scripts/plugins/video/responsible-video.js"));

            // Lightbox gallery css styles
            bundles.Add(
                new StyleBundle("~/Content/plugins/blueimp/css/").Include(
                    "~/Content/plugins/blueimp/css/blueimp-gallery.min.css"));

            // Lightbox gallery
            bundles.Add(
                new ScriptBundle("~/plugins/lightboxGallery").Include(
                    "~/Scripts/plugins/blueimp/jquery.blueimp-gallery.min.js"));

            // Sparkline
            bundles.Add(
                new ScriptBundle("~/plugins/sparkline").Include("~/Scripts/plugins/sparkline/jquery.sparkline.min.js"));

            // Morriss chart css styles
            bundles.Add(
                new StyleBundle("~/plugins/morrisStyles").Include("~/Content/plugins/morris/morris-0.4.3.min.css"));

            // Morriss chart
            bundles.Add(
                new ScriptBundle("~/plugins/morris").Include(
                    "~/Scripts/plugins/morris/raphael-2.1.0.min.js",
                    "~/Scripts/plugins/morris/morris.js"));

            // Flot chart
            bundles.Add(
                new ScriptBundle("~/plugins/flot").Include(
                    "~/Scripts/plugins/flot/jquery.flot.js",
                    "~/Scripts/plugins/flot/jquery.flot.tooltip.min.js",
                    "~/Scripts/plugins/flot/jquery.flot.resize.js",
                    "~/Scripts/plugins/flot/jquery.flot.pie.js",
                    "~/Scripts/plugins/flot/jquery.flot.time.js",
                    "~/Scripts/plugins/flot/jquery.flot.spline.js"));

            // Rickshaw chart
            bundles.Add(
                new ScriptBundle("~/plugins/rickshaw").Include(
                    "~/Scripts/plugins/rickshaw/vendor/d3.v3.js",
                    "~/Scripts/plugins/rickshaw/rickshaw.min.js"));

            // ChartJS chart
            bundles.Add(new ScriptBundle("~/plugins/chartJs").Include("~/Scripts/plugins/chartjs/Chart.min.js"));

            // iCheck css styles
            bundles.Add(
                new StyleBundle("~/Content/plugins/iCheck/iCheckStyles").Include("~/Content/plugins/iCheck/custom.css"));

            // iCheck
            bundles.Add(new ScriptBundle("~/plugins/iCheck").Include("~/Scripts/plugins/iCheck/icheck.min.js"));

            // dataTables css styles
            bundles.Add(
                new StyleBundle("~/Content/plugins/dataTables/dataTablesStyles").Include(
                    "~/Content/plugins/dataTables/dataTables.bootstrap.css",
                    "~/Content/plugins/dataTables/dataTables.responsive.css",
                    "~/Content/plugins/dataTables/dataTables.tableTools.min.css"));

            // dataTables
            bundles.Add(
                new ScriptBundle("~/plugins/dataTables").Include(
                    "~/Scripts/plugins/dataTables/jquery.dataTables.js",
                    "~/Scripts/plugins/dataTables/dataTables.bootstrap.js",
                    "~/Scripts/plugins/dataTables/dataTables.responsive.js",
                    "~/Scripts/plugins/dataTables/dataTables.tableTools.min.js"));

            // jeditable
            bundles.Add(
                new ScriptBundle("~/plugins/jeditable").Include("~/Scripts/plugins/jeditable/jquery.jeditable.js"));

            // jqGrid styles
            bundles.Add(
                new StyleBundle("~/Content/plugins/jqGrid/jqGridStyles").Include(
                    "~/Content/plugins/jqGrid/ui.jqgrid.css"));

            // jqGrid
            bundles.Add(
                new ScriptBundle("~/plugins/jqGrid").Include(
                    "~/Scripts/plugins/jqGrid/i18n/grid.locale-en.js",
                    "~/Scripts/plugins/jqGrid/jquery.jqGrid.min.js"));

            // codeEditor styles
            bundles.Add(
                new StyleBundle("~/plugins/codeEditorStyles").Include(
                    "~/Content/plugins/codemirror/codemirror.css",
                    "~/Content/plugins/codemirror/ambiance.css"));

            // codeEditor
            bundles.Add(
                new ScriptBundle("~/plugins/codeEditor").Include(
                    "~/Scripts/plugins/codemirror/codemirror.js",
                    "~/Scripts/plugins/codemirror/mode/javascript/javascript.js"));

            // codeEditor
            bundles.Add(new ScriptBundle("~/plugins/nestable").Include("~/Scripts/plugins/nestable/jquery.nestable.js"));

            // validate
            bundles.Add(
                new ScriptBundle("~/plugins/validate").Include("~/Scripts/plugins/validate/jquery.validate.min.js"));

            // fullCalendar styles
            bundles.Add(
                new StyleBundle("~/plugins/fullCalendarStyles").Include(
                    "~/Content/plugins/fullcalendar/fullcalendar.css"));

            // fullCalendar
            bundles.Add(
                new ScriptBundle("~/plugins/fullCalendar").Include(
                    "~/Scripts/plugins/fullcalendar/moment.min.js",
                    "~/Scripts/plugins/fullcalendar/fullcalendar.min.js"));

            // vectorMap
            bundles.Add(
                new ScriptBundle("~/plugins/vectorMap").Include(
                    "~/Scripts/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js",
                    "~/Scripts/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"));

            // ionRange styles
            bundles.Add(
                new StyleBundle("~/Content/plugins/ionRangeSlider/ionRangeStyles").Include(
                    "~/Content/plugins/ionRangeSlider/ion.rangeSlider.css",
                    "~/Content/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css"));

            // ionRange
            bundles.Add(
                new ScriptBundle("~/plugins/ionRange").Include(
                    "~/Scripts/plugins/ionRangeSlider/ion.rangeSlider.min.js"));

            // dataPicker styles
            bundles.Add(
                new StyleBundle("~/plugins/dataPickerStyles").Include("~/Content/plugins/datapicker/datepicker3.css"));

            // dataPicker
            bundles.Add(
                new ScriptBundle("~/plugins/dataPicker").Include("~/Scripts/plugins/datapicker/bootstrap-datepicker.js"));

            // nouiSlider styles
            bundles.Add(
                new StyleBundle("~/plugins/nouiSliderStyles").Include(
                    "~/Content/plugins/nouslider/jquery.nouislider.css"));

            // nouiSlider
            bundles.Add(
                new ScriptBundle("~/plugins/nouiSlider").Include("~/Scripts/plugins/nouslider/jquery.nouislider.min.js"));

            // jasnyBootstrap styles
            bundles.Add(
                new StyleBundle("~/plugins/jasnyBootstrapStyles").Include(
                    "~/Content/plugins/jasny/jasny-bootstrap.min.css"));

            // jasnyBootstrap
            bundles.Add(
                new ScriptBundle("~/plugins/jasnyBootstrap").Include("~/Scripts/plugins/jasny/jasny-bootstrap.min.js"));

            // switchery styles
            bundles.Add(
                new StyleBundle("~/plugins/switcheryStyles").Include("~/Content/plugins/switchery/switchery.css"));

            // switchery
            bundles.Add(new ScriptBundle("~/plugins/switchery").Include("~/Scripts/plugins/switchery/switchery.js"));

            // chosen styles
            bundles.Add(
                new StyleBundle("~/Content/plugins/chosen/chosenStyles").Include("~/Content/plugins/chosen/chosen.css"));

            // chosen
            bundles.Add(new ScriptBundle("~/plugins/chosen").Include("~/Scripts/plugins/chosen/chosen.jquery.js"));

            // knob
            bundles.Add(new ScriptBundle("~/plugins/knob").Include("~/Scripts/plugins/jsKnob/jquery.knob.js"));

            // wizardSteps styles
            bundles.Add(
                new StyleBundle("~/plugins/wizardStepsStyles").Include("~/Content/plugins/steps/jquery.steps.css"));

            // wizardSteps
            bundles.Add(
                new ScriptBundle("~/plugins/wizardSteps").Include("~/Scripts/plugins/staps/jquery.steps.min.js"));

            // dropZone styles
            bundles.Add(
                new StyleBundle("~/Content/plugins/dropzone/dropZoneStyles").Include(
                    "~/Content/plugins/dropzone/basic.css",
                    "~/Content/plugins/dropzone/dropzone.css"));

            // dropZone
            bundles.Add(new ScriptBundle("~/plugins/dropZone").Include("~/Scripts/plugins/dropzone/dropzone.js"));

            // summernote styles
            bundles.Add(
                new StyleBundle("~/plugins/summernoteStyles").Include(
                    "~/Content/plugins/summernote/summernote.css",
                    "~/Content/plugins/summernote/summernote-bs3.css"));

            // summernote
            bundles.Add(
                new ScriptBundle("~/plugins/summernote").Include("~/Scripts/plugins/summernote/summernote.min.js"));

            // toastr notification
            bundles.Add(new ScriptBundle("~/plugins/toastr").Include("~/Scripts/plugins/toastr/toastr.min.js"));

            // toastr notification styles
            bundles.Add(new StyleBundle("~/plugins/toastrStyles").Include("~/Content/plugins/toastr/toastr.min.css"));

            // color picker
            bundles.Add(
                new ScriptBundle("~/plugins/colorpicker").Include(
                    "~/Scripts/plugins/colorpicker/bootstrap-colorpicker.min.js"));

            // color picker styles
            bundles.Add(
                new StyleBundle("~/Content/plugins/colorpicker/colorpickerStyles").Include(
                    "~/Content/plugins/colorpicker/bootstrap-colorpicker.min.css"));

            // image cropper
            bundles.Add(new ScriptBundle("~/plugins/imagecropper").Include("~/Scripts/plugins/cropper/cropper.min.js"));

            // image cropper styles
            bundles.Add(
                new StyleBundle("~/plugins/imagecropperStyles").Include("~/Content/plugins/cropper/cropper.min.css"));

            // jsTree
            bundles.Add(new ScriptBundle("~/plugins/jsTree").Include("~/Scripts/plugins/jsTree/jstree.min.js"));

            // jsTree styles
            bundles.Add(new StyleBundle("~/Content/plugins/jsTree").Include("~/Content/plugins/jsTree/style.css"));

            // Diff
            bundles.Add(
                new ScriptBundle("~/plugins/diff").Include(
                    "~/Scripts/plugins/diff_match_patch/javascript/diff_match_patch.js",
                    "~/Scripts/plugins/preetyTextDiff/jquery.pretty-text-diff.min.js"));

            // Idle timer
            bundles.Add(
                new ScriptBundle("~/plugins/idletimer").Include("~/Scripts/plugins/idle-timer/idle-timer.min.js"));

            // Tinycon
            bundles.Add(new ScriptBundle("~/plugins/tinycon").Include("~/Scripts/plugins/tinycon/tinycon.min.js"));

            // Ridiculous Responsive Social Share
            bundles.Add(
                new ScriptBundle("~/plugins/socialshare").Include("~/Scripts/plugins/rrsociashare/rrssb.min.js"));
            bundles.Add(new StyleBundle("~/rrsociashare/css").Include("~/Content/plugins/rrsocialshare/rrssb.css"));

            // Fittext
            bundles.Add(new ScriptBundle("~/plugins/fittext").Include("~/Scripts/plugins/fittext/jquery.fittext.js"));

            // Site Themes
            bundles.Add(new StyleBundle("~/themes/green").Include("~/Content/themes/Green/Green.css"));
            bundles.Add(new StyleBundle("~/themes/blue").Include("~/Content/themes/Blue/Blue.css"));
            bundles.Add(new StyleBundle("~/themes/pink").Include("~/Content/themes/Pink/Pink.css"));
            bundles.Add(new StyleBundle("~/themes/greygreen").Include("~/Content/themes/GreyGreen/GreyGreen.css"));
            bundles.Add(new StyleBundle("~/themes/gold").Include("~/Content/themes/Gold/Gold.css"));

            // jquery.magnific-popup.min
            bundles.Add(
                new ScriptBundle("~/plugins/magnific-popup").Include(
                    "~/Scripts/plugins/jquery.magnific-popup/jquery.magnific-popup.js"));

            // owl-carousel styles
            bundles.Add(
                new StyleBundle("~/owl-carousel/css").Include(
                    "~/Content/plugins/owl-carousel/owl.carousel.css",
                    "~/Content/plugins/owl-carousel/owl.theme.css",
                    "~/Content/plugins/owl-carousel/owl.transitions.css"));

            // owl-carousel
            bundles.Add(
                new ScriptBundle("~/plugins/owl-carousel").Include("~/Scripts/plugins/owl-carousel/owl.carousel.js"));

            // retina
            bundles.Add(new ScriptBundle("~/plugins/retina").Include("~/Scripts/plugins/retina/retina.min.js"));

            // wow
            bundles.Add(new ScriptBundle("~/plugins/wow").Include("~/Scripts/plugins/wow/wow.min.js"));

            // fs.wallpaper styles
            bundles.Add(
                new StyleBundle("~/fs.wallpaper/css").Include(
                    "~/Content/plugins/jquery.fs.wallpaper/jquery.fs.wallpaper.css"));

            // fs.wallpaper
            bundles.Add(
                new ScriptBundle("~/plugins/fs.wallpaper").Include(
                    "~/Scripts/plugins/jquery.fs.wallpaper/jquery.fs.wallpaper.js"));

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

            // magnific-popup
            bundles.Add(
                new StyleBundle("~/magnific-popup/css").Include("~/Content/plugins/magnific-popup/magnific-popup.css"));

            // jquery.easing
            bundles.Add(
                new ScriptBundle("~/plugins/jquery.easing").Include(
                    "~/Scripts/plugins/jquery.easing/jquery.easing.min.js"));

            // classie
            bundles.Add(new ScriptBundle("~/plugins/classie").Include("~/Scripts/plugins/classie/classie.js"));

            // cbpAnimatedHeader
            bundles.Add(
                new ScriptBundle("~/plugins/cbpAnimatedHeader").Include(
                    "~/Scripts/plugins/cbpAnimatedHeader/cbpAnimatedHeader.js"));

            // jquery.mixitup
            bundles.Add(
                new ScriptBundle("~/plugins/jquery.mixitup").Include(
                    "~/Scripts/plugins/jquery.mixitup/jquery.mixitup.js"));

            // jqBootstrapValidation
            bundles.Add(
                new ScriptBundle("~/plugins/jqBootstrapValidation").Include(
                    "~/Scripts/plugins/jqBootstrapValidation/jqBootstrapValidation.js"));

            // contact_me
            bundles.Add(new ScriptBundle("~/plugins/contact_me").Include("~/Scripts/plugins/contact_me/contact_me.js"));

            // vitality
            bundles.Add(new StyleBundle("~/vitality/css").Include("~/Content/plugins/vitality/vitality-red.css", "~/Content/plugins/vitality/vitality-custom.css"));

            bundles.Add(new StyleBundle("~/finance/css").Include("~/Content/finance.css", "~/Content/global.css"));

            // Vitality script
            bundles.Add(new ScriptBundle("~/bundles/vitality").Include("~/Scripts/app/vitality.js"));
        }
Ejemplo n.º 36
0
        public void RebaseJqueryBaseThemeTest()
        {
            var css = new CssRewriteUrlTransform();

            Assert.AreEqual("url(/content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png)", CssRewriteUrlTransform.ConvertUrlsToAbsolute("/content/themes/base", "url(images/ui-bg_flat_75_ffffff_40x100.png)"));
        }
Ejemplo n.º 37
0
 public CssUrlTransformWrapper()
 {
     _cssRewriteUrlTransform = new CssRewriteUrlTransform();
 }
 public CssRewriteUrlWithVirtualDirectoryTransform()
 {
     _rewriteUrlTransform = new CssRewriteUrlTransform();
 }
Ejemplo n.º 39
0
 /// <summary>
 /// Includes the specified <paramref name="virtualPaths"/> within the bundle and attached the
 /// <see cref="System.Web.Optimization.CssRewriteUrlTransform"/> item transformer to each item
 /// automatically.
 /// </summary>
 /// <param name="bundle">The bundle.</param>
 /// <param name="virtualPaths">The virtual paths.</param>
 /// <returns>Bundle.</returns>
 /// <exception cref="System.ArgumentException">Only available to StyleBundle;bundle</exception>
 /// <exception cref="System.ArgumentNullException">virtualPaths;Cannot be null or empty</exception>
 public static Bundle IncludeWithCssRewriteTransform(this Bundle bundle, params String[] virtualPaths)
 {
     if (!(bundle is StyleBundle))
     {
         throw new ArgumentException("Only available to StyleBundle", "bundle");
     }
     if (virtualPaths == null || virtualPaths.Length == 0)
     {
         throw new ArgumentNullException("virtualPaths", "Cannot be null or empty");
     }
     IItemTransform itemTransform = new CssRewriteUrlTransform();
     foreach (String virtualPath in virtualPaths)
     {
         if (!String.IsNullOrWhiteSpace(virtualPath))
         {
             bundle.Include(virtualPath, itemTransform);
         }
     }
     return bundle;
 }