Exemplo 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));
        }
Exemplo n.º 2
0
        public virtual IHtmlString RegisterAbsoluteStyles(string baseUri, string themeName)
        {
            IEnumerable <IHtmlString> styles = new IHtmlString[0];
            var key = "___RegisteredSystemStyles____";

            if (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.Web.Mvc.WebResourceLoader.MvcExtensions.ExternalResources(this.Html, null, "jQuery-Styles", null, baseUri) });
                }
                styles = styles.Concat(this.PageContext.Styles);
                Html.ViewContext.HttpContext.Items[key] = new object();
            }

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

            return(new AggregateHtmlString(styles));
        }
Exemplo n.º 3
0
        public virtual IHtmlString RegisterAbsoluteStyles(string baseUri, string themeName)
        {
            IEnumerable <IHtmlString> styles = new IHtmlString[0];
            var key = "___RegisteredSystemStyles____";

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

                Html.ViewContext.HttpContext.Items[key] = new object();
            }
            styles = styles.Concat(this.IncludeThemeStyles(themeName, baseUri))
                     .Concat(this.PageContext.Styles);
            return(new AggregateHtmlString(styles));
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
        public virtual IHtmlString RegisterAbsoluteStyles(string baseUri, string themeName)
        {
            IEnumerable<IHtmlString> styles = new IHtmlString[0];
            var key = "___RegisteredSystemStyles____";
            if (Html.ViewContext.HttpContext.Items[key] == null)
            {
                styles = styles
                  .Concat(this.IncludeModuleThemeStyles(baseUri))
                  .Concat(this.IncludeInlineEditingStyles(baseUri))
                  .Concat(this.IncludeStyleEditingStyles(baseUri))
                  .Distinct(new IHtmlStringComparer());

                Html.ViewContext.HttpContext.Items[key] = new object();
            }
            styles = styles.Concat(this.IncludeThemeStyles(themeName, baseUri))
                .Concat(this.PageContext.Styles);
            return new AggregateHtmlString(styles);
        }
Exemplo n.º 6
0
        public virtual IHtmlString RegisterAbsoluteStyles(string baseUri, string themeName)
        {
            IEnumerable<IHtmlString> styles = new IHtmlString[0];
            var key = "___RegisteredSystemStyles____";
            if (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.Web.Mvc.WebResourceLoader.MvcExtensions.ExternalResources(this.Html, null, "jQuery-Styles", null, baseUri) });
                }
                styles = styles.Concat(this.PageContext.Styles);
                Html.ViewContext.HttpContext.Items[key] = new object();
            }

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

            return new AggregateHtmlString(styles);
        }