Ejemplo n.º 1
0
        public static IHtmlString LoadAbsoluteStyles(this IFrontHtmlHelper frontHtml, string baseUri, string themeName)
        {
            IEnumerable <IHtmlString> styles = new IHtmlString[0];
            var key = "___RegisteredSystemStyles____";

            if (frontHtml.Html.ViewContext.HttpContext.Items[key] == null)
            {
                styles = styles
                         //.Concat(this.IncludeModuleThemeStyles(baseUri))
                         //.Concat(this.IncludeInlineEditingStyles(baseUri))
                         //.Concat(this.IncludeStyleEditingStyles(baseUri))
                         .Distinct(new IHtmlStringComparer());


                //if (this.PageContext.PageRequestContext.Site.EnableJquery)
                //{
                //    styles = styles.Concat(new[] { Kooboo.Common.Web.WebResourceLoader.MvcExtensions.ExternalResources(this.Html, null, "jQuery-Styles", null, baseUri) });
                //}
                styles = styles.Concat(frontHtml.Page_Context.Styles);
                frontHtml.Html.ViewContext.HttpContext.Items[key] = new object();
            }

            styles = styles.Concat(IncludeThemeStyles(frontHtml, themeName, baseUri));

            return(new AggregateHtmlString(styles));
        }
Ejemplo n.º 2
0
        public static IHtmlString LoadAbsoluteStyles(this IFrontHtmlHelper frontHtml, string baseUri, string themeName)
        {
            IEnumerable<IHtmlString> styles = new IHtmlString[0];
            var key = "___RegisteredSystemStyles____";
            if (frontHtml.Html.ViewContext.HttpContext.Items[key] == null)
            {
                styles = styles
                    //.Concat(this.IncludeModuleThemeStyles(baseUri))
                    //.Concat(this.IncludeInlineEditingStyles(baseUri))
                    //.Concat(this.IncludeStyleEditingStyles(baseUri))
                  .Distinct(new IHtmlStringComparer());

                //if (this.PageContext.PageRequestContext.Site.EnableJquery)
                //{
                //    styles = styles.Concat(new[] { Kooboo.Common.Web.WebResourceLoader.MvcExtensions.ExternalResources(this.Html, null, "jQuery-Styles", null, baseUri) });
                //}
                styles = styles.Concat(frontHtml.Page_Context.Styles);
                frontHtml.Html.ViewContext.HttpContext.Items[key] = new object();
            }

            styles = styles.Concat(IncludeThemeStyles(frontHtml, themeName, baseUri));

            return new AggregateHtmlString(styles);
        }