WIP installer refactor

[TFS Changeset #78305]
This commit is contained in:
starfighter83
2010-10-12 12:14:11 +00:00
parent ac44fc9646
commit a71d0f58cb
6 changed files with 23 additions and 30 deletions

View File

@@ -327,5 +327,10 @@ html {
cursor:pointer;
}
p#installingModule img
{
float:none;
margin:0;
padding:0;
}

View File

@@ -36,8 +36,6 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule
installer.InstallCleanUp(packageId, tempDir);
library.RefreshContent();
if (cms.businesslogic.skinning.Skinning.IsPackageInstalled(new Guid(Request["guid"])) ||
cms.businesslogic.skinning.Skinning.IsPackageInstalled(Request["name"]))
{

View File

@@ -25,10 +25,14 @@
</asp:Repeater>
<p id="installingModule" style="display:none;">Installing module...</p>
<p id="installingModule" style="display:none;">
<span class="selectedModule"></span><br />
<img src="/umbraco/LiveEditing/Modules/SkinModule/images/loader.gif" /> Installing module...
</p>
<p id="moduleSelect" style="display:none;">
<span id="selectedModule"></span><br />
<span class="selectedModule"></span><br />
Select where to place the module
</p>

View File

@@ -75,7 +75,7 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule
{
link.Attributes.Add(
"onclick",
"umbInstallModuleAndGetAlias('" + p.RepoGuid +"','"+p.Text+"');");
"umbInstallModuleAndGetAlias('" + p.RepoGuid +"','"+p.Text+"',this);");
}

View File

@@ -138,26 +138,6 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule
{
//ok
//presentation.templateControls.Macro m = new presentation.templateControls.Macro();
//Hashtable DataValues = helper.ReturnAttributes(e.Message.Split(';')[1]);
//m.Alias = DataValues["alias"].ToString();
//m.MacroAttributes = DataValues;
//StringBuilder sb = new StringBuilder();
//StringWriter tw = new StringWriter(sb);
//HtmlTextWriter hw = new HtmlTextWriter(tw);
//m.RenderControl(hw);
//string macroOutput = sb.ToString();
//string placeMacroOutput = string.Format("jQuery('.umbModuleContainerPlaceHolder','#{0}').remove();jQuery('#{0}').{1}(\"{2}\");", e.Message.Split(';')[0], e.Message.Split(';')[2], macroOutput);
//ScriptManager.RegisterClientScriptBlock(Page, GetType(), new Guid().ToString(), placeMacroOutput, true);
}
else
{

View File

@@ -6,12 +6,13 @@ function umbSelectModule(alias,sender) {
umbShowModuleContainerSelectors();
umbModuleToInsertAlias = alias;
jQuery('#selectedModule').html(jQuery('span',sender).html());
jQuery('.selectedModule').html(jQuery('span',sender).html());
}
function umbInstallModuleAndGetAlias(guid,name) {
function umbInstallModuleAndGetAlias(guid,name,sender) {
jQuery('#modules').hide();
jQuery('.selectedModule').html(name);
jQuery("#installingModule").show();
jQuery.post("/umbraco/LiveEditing/Modules/SkinModule/ModuleInstaller.aspx?guid=" + guid + "&name=" + name,
@@ -25,13 +26,19 @@ function umbInstallModuleAndGetAlias(guid,name) {
jQuery('#moduleSelect').show();
umbShowModuleContainerSelectors();
umbModuleToInsertAlias = data;
jQuery(sender).attr("onclick", "");
jQuery(sender).click(function () {
umbSelectModule(data, this);
return false;
});
}
});
}
function umbShowModuleSelection() {
jQuery("#moduleSelect").hide();
@@ -41,7 +48,6 @@ function umbShowModuleSelection() {
}
function umbShowModuleContainerSelectors() {
jQuery(".umbModuleContainer").each(function () {