Fixes issue with installing starter kits in the back office after upgrading the installer to install

the starter kits properly. Not sure if this was actually working before 4.10 but in any case does work again
now and installs them the correct way whilst waiting for the app pool to restart (we need to put this in place
for the normal packages too!). Upgraded the StarterKits.aspx to have the correct code behind structure. Fixes issue
with missing or invalid referenced images.
This commit is contained in:
Shannon Deminick
2012-11-03 07:18:12 +06:00
parent 6f5689004d
commit b337f4e5e4
13 changed files with 210 additions and 227 deletions

View File

@@ -282,6 +282,13 @@
<Compile Include="umbraco\developer\Macros\EditMacro.aspx.designer.cs">
<DependentUpon>editMacro.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco\developer\Packages\StarterKits.aspx.cs">
<DependentUpon>StarterKits.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco\developer\Packages\StarterKits.aspx.designer.cs">
<DependentUpon>StarterKits.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco\masterpages\UmbracoDialog.master.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>

View File

@@ -12,6 +12,15 @@ namespace Umbraco.Web.UI.Install.Steps.Skinning {
public partial class LoadStarterKits {
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// LinkButton2 control.
/// </summary>

View File

@@ -26,8 +26,8 @@
<ItemTemplate>
<li>
<div class="image-hold">
<img class="faik-mask" src="../umbraco_client/installer/images/bg-img.png" alt="image description" width="152" height="129">
<img class="faik-mask-ie6" src="../umbraco_client/installer/images/bg-img-ie.png" alt="image description" width="201" height="178">
<img class="faik-mask" src="<%=umbraco.GlobalSettings.ClientPath + "/installer/images/bg-img.png" %>" alt="image description" width="152" height="129">
<img class="faik-mask-ie6" src="<%=umbraco.GlobalSettings.ClientPath + "/installer/images/bg-img-ie.png" %>" alt="image description" width="201" height="178">
<div class="image">
<img class="zoom-img" src="<%# ((Skin)Container.DataItem).Thumbnail %>" alt="<%# ((Skin)Container.DataItem).Text %>" width="134" height="103">

View File

@@ -1,8 +1,11 @@
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="LoadStarterKits.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.Skinning.LoadStarterKits" %>
<%@ Import Namespace="umbraco.cms.businesslogic.packager.repositories" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<asp:PlaceHolder ID="pl_loadStarterKits" runat="server">
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="installer/js/PackageInstaller.js" PathNameAlias="UmbracoClient" />
<% if (!CannotConnect) { %>
<script type="text/javascript">
(function ($) {
@@ -58,7 +61,7 @@
<li class="add-thanks">
<asp:LinkButton runat="server" class="single-tab declineStarterKits" ID="declineStarterKits" OnClientClick="return confirm('Are you sure you do not want to install a starter kit?');" OnClick="NextStep">
<img class="zoom-img" src="../umbraco_client/installer/images/btn-no-thanks.png" alt="image description" width="150" height="204">
<img class="zoom-img" src="<%# umbraco.GlobalSettings.ClientPath + "/installer/images/btn-no-thanks.png" %>" alt="image description" width="150" height="204">
</asp:LinkButton>
<em>&nbsp;</em>

View File

@@ -1,4 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../../masterpages/umbracoPage.Master" Title="Install starter kit" CodeBehind="StarterKits.aspx.cs" Inherits="umbraco.presentation.umbraco.developer.Packages.StarterKits" %>
<%@ Page Language="C#" AutoEventWireup="True" MasterPageFile="../../masterpages/umbracoPage.Master" Title="Install starter kit" CodeBehind="StarterKits.aspx.cs" Inherits="Umbraco.Web.UI.Umbraco.Developer.Packages.StarterKits" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
@@ -7,19 +7,33 @@
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="ui/jqueryui.js" PathNameAlias="UmbracoClient" />
<script type="text/javascript">
function showProgress(button, elementId) {
var img = document.getElementById(elementId);
img.style.visibility = "visible";
button.style.display = "none";
var percentComplete = 0;
jQuery(document).ready(function() {
//bind to button click events
jQuery("a.selectStarterKit").click(function() {
jQuery(".progress-status").siblings(".install-dialog").hide();
jQuery(".progress-status").show();
});
});
function updateProgressBar(percent) {
percentComplete = percent;
}
function updateStatusMessage(message, error) {
if (message != null && message != undefined) {
jQuery(".progress-status").text(message + " (" + percentComplete + "%)");
}
}
function InstallPackages(button, elementId) {
showProgress(button, elementId);
}
</script>
<style type="text/css">
.progress-status {
display: none;
}
.add-thanks
{
position:absolute;
@@ -48,16 +62,26 @@
<cc1:Pane id="StarterKitInstalled" Text="Install skin" runat="server">
<h3>Available skins</h3>
<p>You can choose from the following skins.</p>
<asp:PlaceHolder ID="ph_skins" runat="server"></asp:PlaceHolder>
<p>You can choose from the following skins.</p>
<div class="progress-status">Please wait...</div>
<div id="connectionError"></div>
<div id="serverError"></div>
<div class="install-dialog">
<asp:PlaceHolder ID="ph_skins" runat="server"></asp:PlaceHolder>
</div>
</cc1:Pane>
<cc1:Pane id="StarterKitNotInstalled" Text="Install starter kit" runat="server">
<h3>Available starter kits</h3>
<p>You can choose from the following starter kits, each having specific functionality.</p>
<asp:PlaceHolder ID="ph_starterkits" runat="server"></asp:PlaceHolder>
<p>You can choose from the following starter kits, each having specific functionality.</p>
<div class="progress-status">Please wait...</div>
<div id="connectionError"></div>
<div id="serverError"></div>
<div class="install-dialog">
<asp:PlaceHolder ID="ph_starterkits" runat="server"></asp:PlaceHolder>
</div>
</cc1:Pane>
<cc1:Pane id="installationCompleted" Text="Installation completed" runat="server" Visible="false">

View File

@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Umbraco.Web.UI.Umbraco.Developer.Packages
{
public partial class StarterKits : global::umbraco.presentation.umbraco.developer.Packages.StarterKits
{
}
}

View File

@@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Umbraco.Developer.Packages {
public partial class StarterKits {
}
}

View File

@@ -89,7 +89,7 @@ figure{display: block;}
.bg-main .color3 .bg-c { background:url(../images/bg-blog.jpg) no-repeat 50% 0;}
/* Color 4 */
.bg-main .color4 { background:#201c01 url(../images/bg-bhuiness-repeat.jpg) repeat-x;}
.bg-main .color4 { background:#201c01 url(../images/bg-normal-repeat.jpg) repeat-x;}
.bg-main .color4 .bg-c { background:url(../images/bg-bhuiness.jpg) no-repeat 50% 0;}
/* Color 5 */

View File

@@ -30,7 +30,10 @@ function updateProgressBar(percent) {
}
function updateStatusMessage(message, error) {
jQuery(".loader > strong").text(message);
if (message != null && message != undefined) {
jQuery(".loader > strong").text(message);
}
if (error != undefined) {
jQuery(".loader").append("<p>" + error + "</p>");
}

View File

@@ -326,6 +326,9 @@
<Compile Include="umbraco.presentation\umbraco\developer\Macros\editMacro.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\Packages\StarterKits.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\Xslt\editXslt.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@@ -792,13 +795,6 @@
<Compile Include="umbraco.presentation\umbraco\dashboard\StartupDashboardVideos.ascx.designer.cs">
<DependentUpon>StartupDashboardVideos.ascx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\Packages\StarterKits.aspx.cs">
<DependentUpon>StarterKits.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\Packages\StarterKits.aspx.designer.cs">
<DependentUpon>StarterKits.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\RelationTypes\EditRelationType.aspx.cs">
<DependentUpon>EditRelationType.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1864,7 +1860,6 @@
<Content Include="umbraco.presentation\umbraco\dashboard\StartupDashboardIntro.ascx" />
<Content Include="umbraco.presentation\umbraco\dashboard\StartupDashboardKits.ascx" />
<Content Include="umbraco.presentation\umbraco\dashboard\StartupDashboardVideos.ascx" />
<Content Include="umbraco.presentation\umbraco\developer\Packages\StarterKits.aspx" />
<Content Include="umbraco.presentation\umbraco\dialogs\TemplateSkinning.aspx" />
<Content Include="umbraco.presentation\umbraco\helpRedirect.aspx" />
<Content Include="umbraco.presentation\umbraco\LiveEditing\Modules\SkinModule\CssParser.aspx" />

View File

@@ -1,69 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../../masterpages/umbracoPage.Master" Title="Install starter kit" CodeBehind="StarterKits.aspx.cs" Inherits="umbraco.presentation.umbraco.developer.Packages.StarterKits" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="ui/jqueryui.js" PathNameAlias="UmbracoClient" />
<script type="text/javascript">
function showProgress(button, elementId) {
var img = document.getElementById(elementId);
img.style.visibility = "visible";
button.style.display = "none";
}
function InstallPackages(button, elementId) {
showProgress(button, elementId);
}
</script>
<style type="text/css">
.add-thanks
{
position:absolute;
left:-2500;
display:none !important;
}
.zoom-list li {float: left; margin: 15px; display: block; width: 180px;}
.btn-prev, .btn-next, .paging, .btn-preview, .faik-mask , .faik-mask-ie6
{
display:none;
}
.image {float: left; margin: 15px; display: block; width: 140px;}
.image .gal-drop{padding-top:10px;}
ul{list-style-type: none;}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
<cc1:UmbracoPanel id="Panel1" Text="Starter kit" runat="server" Width="612px" Height="600px" hasMenu="false">
<cc1:Feedback ID="fb" runat="server" />
<cc1:Pane id="StarterKitInstalled" Text="Install skin" runat="server">
<h3>Available skins</h3>
<p>You can choose from the following skins.</p>
<asp:PlaceHolder ID="ph_skins" runat="server"></asp:PlaceHolder>
</cc1:Pane>
<cc1:Pane id="StarterKitNotInstalled" Text="Install starter kit" runat="server">
<h3>Available starter kits</h3>
<p>You can choose from the following starter kits, each having specific functionality.</p>
<asp:PlaceHolder ID="ph_starterkits" runat="server"></asp:PlaceHolder>
</cc1:Pane>
<cc1:Pane id="installationCompleted" Text="Installation completed" runat="server" Visible="false">
<p>Installation completed succesfully</p>
</cc1:Pane>
</cc1:UmbracoPanel>
</asp:Content>

View File

@@ -9,63 +9,135 @@ using umbraco.IO;
namespace umbraco.presentation.umbraco.developer.Packages
{
public partial class StarterKits : UmbracoEnsuredPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!cms.businesslogic.skinning.Skinning.IsStarterKitInstalled())
showStarterKits();
else
showSkins((Guid)cms.businesslogic.skinning.Skinning.StarterKitGuid());
}
public partial class StarterKits : UmbracoEnsuredPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!cms.businesslogic.skinning.Skinning.IsStarterKitInstalled())
showStarterKits();
else
showSkins((Guid)cms.businesslogic.skinning.Skinning.StarterKitGuid());
}
private void showStarterKits()
{
install.steps.Skinning.loadStarterKits starterkitsctrl =
(install.steps.Skinning.loadStarterKits)new UserControl().LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKits.ascx");
starterkitsctrl.StarterKitInstalled+=new install.steps.Skinning.StarterKitInstalledEventHandler(starterkitsctrl_StarterKitInstalled);
ph_starterkits.Controls.Add(starterkitsctrl);
private void showStarterKits()
{
install.steps.Skinning.loadStarterKits starterkitsctrl =
(install.steps.Skinning.loadStarterKits)new UserControl().LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKits.ascx");
starterkitsctrl.StarterKitInstalled += new install.steps.Skinning.StarterKitInstalledEventHandler(starterkitsctrl_StarterKitInstalled);
ph_starterkits.Controls.Add(starterkitsctrl);
StarterKitNotInstalled.Visible = true;
StarterKitInstalled.Visible = false;
}
StarterKitNotInstalled.Visible = true;
StarterKitInstalled.Visible = false;
public void showSkins(Guid starterKitGuid)
{
}
install.steps.Skinning.loadStarterKitDesigns ctrl = (install.steps.Skinning.loadStarterKitDesigns)new UserControl().LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKitDesigns.ascx");
ctrl.ID = "StarterKitDesigns";
ctrl.StarterKitGuid = starterKitGuid;
ctrl.StarterKitDesignInstalled += new install.steps.Skinning.StarterKitDesignInstalledEventHandler(ctrl_StarterKitDesignInstalled);
ph_skins.Controls.Add(ctrl);
StarterKitNotInstalled.Visible = false;
StarterKitInstalled.Visible = true;
public void showSkins(Guid starterKitGuid)
{
}
install.steps.Skinning.loadStarterKitDesigns ctrl = (install.steps.Skinning.loadStarterKitDesigns)new UserControl().LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKitDesigns.ascx");
ctrl.ID = "StarterKitDesigns";
void starterkitsctrl_StarterKitInstalled()
{
StarterKitNotInstalled.Visible = false;
StarterKitInstalled.Visible = false;
ctrl.StarterKitGuid = starterKitGuid;
ctrl.StarterKitDesignInstalled += new install.steps.Skinning.StarterKitDesignInstalledEventHandler(ctrl_StarterKitDesignInstalled);
ph_skins.Controls.Add(ctrl);
installationCompleted.Visible = true;
}
StarterKitNotInstalled.Visible = false;
StarterKitInstalled.Visible = true;
void ctrl_StarterKitDesignInstalled()
{
StarterKitNotInstalled.Visible = false;
StarterKitInstalled.Visible = false;
}
installationCompleted.Visible = true;
}
}
void starterkitsctrl_StarterKitInstalled()
{
StarterKitNotInstalled.Visible = false;
StarterKitInstalled.Visible = false;
installationCompleted.Visible = true;
}
void ctrl_StarterKitDesignInstalled()
{
StarterKitNotInstalled.Visible = false;
StarterKitInstalled.Visible = false;
installationCompleted.Visible = true;
}
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// Panel1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.UmbracoPanel Panel1;
/// <summary>
/// fb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Feedback fb;
/// <summary>
/// StarterKitInstalled control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane StarterKitInstalled;
/// <summary>
/// ph_skins control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_skins;
/// <summary>
/// StarterKitNotInstalled control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane StarterKitNotInstalled;
/// <summary>
/// ph_starterkits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_starterkits;
/// <summary>
/// installationCompleted control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane installationCompleted;
}
}

View File

@@ -1,87 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.umbraco.developer.Packages {
public partial class StarterKits {
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// Panel1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.UmbracoPanel Panel1;
/// <summary>
/// fb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Feedback fb;
/// <summary>
/// StarterKitInstalled control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane StarterKitInstalled;
/// <summary>
/// ph_skins control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_skins;
/// <summary>
/// StarterKitNotInstalled control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane StarterKitNotInstalled;
/// <summary>
/// ph_starterkits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_starterkits;
/// <summary>
/// installationCompleted control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane installationCompleted;
}
}