WIP installer refactor, fixes : Handle cases where there is no skin dependencies

[TFS Changeset #77558]
This commit is contained in:
starfighter83
2010-09-28 10:19:50 +00:00
parent 440ad4a1c5
commit af640662bb
2 changed files with 7 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule
pnl_connectionerror.Visible = false;
//load dependencies
if (ActiveSkin != null)
if (ActiveSkin != null && ActiveSkin.Dependencies.Count > 0)
LoadDependencies();
else
{

View File

@@ -38,6 +38,10 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule
{
base.CreateChildControls();
Skin ActiveSkin = Skin.CreateFromAlias(Skinning.GetCurrentSkinAlias(nodeFactory.Node.GetCurrent().template));
m_SkinModal = new Panel();
m_SkinModal.ID = "LeSkinModal";
m_SkinModal.Attributes.Add("style", "display: none");
@@ -48,10 +52,10 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule
m_SkinButton.ID = "LeSkinButton";
m_SkinButton.CssClass = "button";
m_SkinButton.ToolTip = "Customize skin";
m_SkinButton.ToolTip = ActiveSkin != null && ActiveSkin.Dependencies.Count > 0 ? "Customize skin" : "Change skin";
m_SkinButton.ImageUrl = String.Format("{0}/LiveEditing/Modules/SKinModule/skin.png", SystemDirectories.Umbraco);
string s = (Skin.CreateFromAlias(Skinning.GetCurrentSkinAlias(nodeFactory.Node.GetCurrent().template)) != null ? "setTasksClientScripts();" : "") + "jQuery('#" + m_SkinModal.ClientID + @"').show();" + "jQuery('#" + m_SkinModal.ClientID + @"').ModalWindowShow('" + ui.GetText("skin") + "',true,500,400,50,0, ['.modalbuton'], null);";
string s = (ActiveSkin != null && ActiveSkin.Dependencies.Count > 0 ? "setTasksClientScripts();" : "") + "jQuery('#" + m_SkinModal.ClientID + @"').show();" + "jQuery('#" + m_SkinModal.ClientID + @"').ModalWindowShow('" + ui.GetText("skin") + "',true,500,400,50,0, ['.modalbuton'], null);";
m_SkinButton.OnClientClick = s +"return false;";