Esempio n. 1
0
 private static SiteSkin createSkin()
 {
     SiteSkin s = new SiteSkin();
     s.Name = lang.get( "default" );
     s.StylePath = "1/skin.css";
     s.insert();
     return s;
 }
 private void log( SiteSkin skin )
 {
     String dataInfo = "{Id:" + skin.Id + ", Name:'" + skin.Name + "'}";
     logService.Add( (User)ctx.viewer.obj, SiteLogString.ApplySkin(), dataInfo, typeof( SiteSkin ).FullName, ctx.Ip );
 }
Esempio n. 3
0
 private static void setCurrentSiteSkin( SiteSkin skin )
 {
     config.Instance.Site.SkinId = skin.Id;
     config.Instance.Site.Update( "SkinId", skin.Id );
 }
Esempio n. 4
0
        private void saveCustomCss( String newCss )
        {
            SiteSkin current = GetCurrent();

            SiteSkin skin = getCustomerCss();

            if (skin == null) {
                skin = new SiteSkin();
                skin.Name = customName;
                skin.ThumbUrl = current.ThumbUrl;
                skin.StylePath = current.StylePath;
                skin.Body = newCss;
                skin.insert();
            }
            else {
                skin.Body = newCss;
                skin.update();
            }

            setCurrentSiteSkin( skin );
        }