[TFS Changeset #77688]

This commit is contained in:
PerPloug
2010-10-01 08:47:26 +00:00
parent f2e207d11e
commit d46eec95de
5 changed files with 46 additions and 15 deletions

View File

@@ -33,13 +33,15 @@ namespace umbraco.cms.businesslogic.skinning
string currentSkin = GetCurrentSkinAlias(template);
Skin skin = Skin.CreateFromAlias(currentSkin);
skin.RollbackDependencies();
if (skin != null) {
skin.RollbackDependencies();
if (skin.OverridesTemplates())
if (skin.OverridesTemplates())
skin.RollbackTemplateFiles();
//else
// skin.RollbackDependencies();
//else
// skin.RollbackDependencies();
}
RemoveSkin(template);
save();

View File

@@ -1678,6 +1678,7 @@
<Content Include="umbraco_client\ui\ui-lightness\images\ui-icons_ffd27a_256x240.png" />
<Content Include="umbraco_client\ui\ui-lightness\images\ui-icons_ffffff_256x240.png" />
<Content Include="umbraco_client\ui\ui-lightness\jquery-ui-1.8.4.custom.css" />
<Content Include="web.config.13INCHER.xslt" />
<Content Include="web.config.Az-VAIO.xslt" />
<Content Include="umbraco\endPreview.aspx" />
<Content Include="umbraco\js\UmbracoCasingRules.aspx" />

View File

@@ -5,7 +5,7 @@
<script type="text/javascript">
function closeCustomizeSkinModal() {
//jQuery('#cancelSkinInstall').trigger('click');
jQuery('#cancelSkinInstall').trigger('click');
UmbSpeechBubble.ShowMessage("Info", "Skin", "Skin updated...");
}
</script>
@@ -17,18 +17,21 @@
<div id="costumizeSkin" <asp:Literal ID="ltCustomizeSkinStyle" runat="server" Text=""></asp:Literal>>
<p>
Personalize your skin, by defining colors, images and texts
</p>
<div id="dependencies">
<cc1:Pane ID="ph_dependencies" runat="server" />
</div>
<p>
<p style="margin-top: 20px;">
<asp:Button ID="btnOk" runat="server" Text=" Ok " CssClass="modalButton" onclick="btnOk_Click" OnClientClick="closeCustomizeSkinModal();"/>
<em> or </em> <a href="#" onclick="closeModal();">Cancel</a>
</p>
<p runat="server" id="pChangeSkin">You could also change to another skin <a href="#" onclick="jQuery('#costumizeSkin').hide();jQuery('#changeSkin').show();">change</a> skin</p>
<p runat="server" id="pChangeSkin" style="margin-top: 25px; border-top: 1px solid #efefef; padding: 7px">You could also change to another skin: <a href="#" onclick="jQuery('#costumizeSkin').hide();jQuery('#changeSkin').show();">Browse available skins</a></p>
</div>
@@ -50,7 +53,7 @@
<img src="<%# ((Skin)Container.DataItem).Thumbnail %>" alt="<%# ((Skin)Container.DataItem).Text %>" />
<span><%# ((Skin)Container.DataItem).Text %></span>
<br />
<asp:LinkButton ID="Button1" runat="server" Text="Install" CommandArgument="<%# ((Skin)Container.DataItem).RepoGuid %>" OnClick="SelectStarterKitDesign" CommandName="<%# ((Skin)Container.DataItem).Text %>"/>
<asp:Button ID="Button1" runat="server" Text="Install" CommandArgument="<%# ((Skin)Container.DataItem).RepoGuid %>" OnClick="SelectStarterKitDesign" CommandName="<%# ((Skin)Container.DataItem).Text %>"/>
</li>
</ItemTemplate>
<FooterTemplate>
@@ -61,8 +64,8 @@
</div>
<p runat="server" id="pCustomizeSkin">
<button onclick="jQuery('#changeSkin').hide(); jQuery('#costumizeSkin').show();">Cancel</button>
<p runat="server" id="pCustomizeSkin" style="clear: both; margin-top: 25px; border-top: 1px solid #efefef; padding: 7px" >
<a onclick="jQuery('#changeSkin').hide(); jQuery('#costumizeSkin').show();">Go back to your current skin</a>
</p>
</div>

View File

@@ -147,7 +147,7 @@ namespace umbraco.presentation.LiveEditing.Modules.SkinModule
if (Skinning.IsSkinInstalled(s.RepoGuid))
{
Button inst = (Button)e.Item.FindControl("Button1");
inst.Text = "Apply (already downloaded)";
inst.Text = "Apply";
inst.CommandName = "apply";
inst.CommandArgument = s.Text;
@@ -156,7 +156,7 @@ namespace umbraco.presentation.LiveEditing.Modules.SkinModule
if (ActiveSkin.Name == s.Text)
{
Button inst = (Button)e.Item.FindControl("Button1");
inst.Text = "Rollback (active skin)";
inst.Text = "Rollback";
inst.CommandName = "remove";
inst.CommandArgument = s.Text;
}
@@ -175,7 +175,7 @@ namespace umbraco.presentation.LiveEditing.Modules.SkinModule
{
Template template = new Template(Node.GetCurrent().template);
Skinning.RollbackSkin(template.Id);
this.Page.Response.Redirect(library.NiceUrl(int.Parse(UmbracoContext.Current.PageId.ToString())));
this.Page.Response.Redirect( library.NiceUrl(int.Parse(UmbracoContext.Current.PageId.ToString())) +"?umbSkinning=true" );
}
else
{
@@ -192,7 +192,7 @@ namespace umbraco.presentation.LiveEditing.Modules.SkinModule
installer2.InstallCleanUp(packageId, tempDir);
library.RefreshContent();
Skinning.ActivateAsCurrentSkin(Skin.CreateFromName(((Button)sender).CommandName));
this.Page.Response.Redirect(library.NiceUrl(int.Parse(UmbracoContext.Current.PageId.ToString())));
this.Page.Response.Redirect(library.NiceUrl(int.Parse(UmbracoContext.Current.PageId.ToString())) + "?umbSkinning=true");
}
else
{

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:output method="xml" indent="yes"/>
<!-- Set up a local connection string -->
<xsl:template match="/configuration/appSettings/add[@key='umbracoDbDSN']/@value">
<xsl:attribute name="value">server=.\sqlexpress;database=v46;user id=umbracouser;password=farmer</xsl:attribute>
</xsl:template>
<xsl:template match="/configuration/appSettings/add[@key='umbracoConfigurationStatus']/@value">
<xsl:attribute name="value"></xsl:attribute>
</xsl:template>
<!-- Default templates to match anything else -->
<xsl:template match="@*">
<xsl:copy/>
</xsl:template>
<xsl:template match="node()">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>