Пример #1
0
        public BaseTemplate AddStyles(Func <string, string> converter, params string[] src)
        {
            foreach (var s in src)
            {
                if (s.Contains(ColorThemesSettings.ThemeFolderTemplate))
                {
                    if (ThemeStyles == null)
                    {
                        continue;
                    }

                    ThemeStyles.AddSource(r => ResolveUrl(ColorThemesSettings.GetThemeFolderName(converter(r))), s);
                }
                else
                {
                    if (HeadStyles == null)
                    {
                        continue;
                    }

                    HeadStyles.AddSource(converter, s);
                }
            }

            return(this);
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page is Share)
     {
         Master.DisabledHelpTour       = true;
         Master.DisabledSidePanel      = true;
         Master.DisabledTopStudioPanel = true;
     }
     else
     {
         Page.RegisterStyleControl(LoadControl(VirtualPathUtility.ToAbsolute("~/products/files/masters/styles.ascx")));
         Page.RegisterBodyScripts(LoadControl(VirtualPathUtility.ToAbsolute("~/products/files/masters/FilesScripts.ascx")));
     }
     Page.RegisterClientLocalizationScript(typeof(ClientScripts.FilesLocalizationResources));
     Page.RegisterClientScript(typeof(ClientScripts.FilesConstantsResources));
     Page.RegisterInlineScript("if (typeof ZeroClipboard != 'undefined') {ZeroClipboard.setMoviePath('" + CommonLinkUtility.ToAbsolute("~/js/flash/zeroclipboard/zeroclipboard10.swf") + "');}", true);
     Page.RegisterStyleControl(ColorThemesSettings.GetThemeFolderName(CommonLinkUtility.FilesBaseAbsolutePath + "/app_themes/<theme_folder>/leftmenu.less"), true);
 }
        public void AddStyles(string src)
        {
            if (src.Contains(ColorThemesSettings.ThemeFolderTemplate))
            {
                if (ThemeStyles == null)
                {
                    return;
                }

                ThemeStyles.Styles.Add(ResolveUrl(ColorThemesSettings.GetThemeFolderName(src)));
            }
            else
            {
                if (HeadStyles == null)
                {
                    return;
                }

                HeadStyles.Styles.Add(src);
            }
        }
        public void AddStyles(string src, bool theme)
        {
            if (theme)
            {
                if (ThemeStyles == null)
                {
                    return;
                }

                ThemeStyles.Styles.Add(ResolveUrl(ColorThemesSettings.GetThemeFolderName(src)));
            }
            else
            {
                if (HeadStyles == null)
                {
                    return;
                }

                HeadStyles.Styles.Add(src);
            }
        }