From 34dc9036bdbd42ac2d962bd339f2b0ff9bf89146 Mon Sep 17 00:00:00 2001 From: starfighter83 Date: Fri, 22 Oct 2010 10:43:19 +0000 Subject: [PATCH] WIP installer refactor, small update to skinning module [TFS Changeset #78778] --- .../Modules/SkinModule/SkinModule.cs | 30 ++++--------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/umbraco/presentation/umbraco/LiveEditing/Modules/SkinModule/SkinModule.cs b/umbraco/presentation/umbraco/LiveEditing/Modules/SkinModule/SkinModule.cs index 98ca46d55d..95af2dce71 100644 --- a/umbraco/presentation/umbraco/LiveEditing/Modules/SkinModule/SkinModule.cs +++ b/umbraco/presentation/umbraco/LiveEditing/Modules/SkinModule/SkinModule.cs @@ -133,17 +133,7 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule { case "injectmodule": //update template, insert macro tag - - if (InsertMacroTag(nodeFactory.Node.GetCurrent().template,e.Message.Split(';')[0], e.Message.Split(';')[1], e.Message.Split(';')[2] == "prepend")) - { - //ok - - } - else - { - //not ok - } - + InsertModule(nodeFactory.Node.GetCurrent().template, e.Message.Split(';')[0], e.Message.Split(';')[1], e.Message.Split(';')[2] == "prepend"); break; case "movemodule": @@ -157,20 +147,10 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule if (module != null) { - - //if(module.ParentNode.Id == e.Message.Split(';')[1]) - //{ - // //move within container - //} - //else - //{ - //move to different container - FindModule(nodeFactory.Node.GetCurrent().template, moduleId, true); - MoveModule(nodeFactory.Node.GetCurrent().template, module, parentId, index); - //} + FindModule(nodeFactory.Node.GetCurrent().template, moduleId, true); + MoveModule(nodeFactory.Node.GetCurrent().template, module, parentId, index); } - break; } @@ -250,7 +230,7 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule return null; } } - private bool InsertMacroTag(int template, string targetId, string tag, bool prepend) + private bool InsertModule(int template, string targetId, string tag, bool prepend) { Template t = new Template(template); @@ -279,7 +259,7 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule { //might be on master template if (t.HasMasterTemplate) - return InsertMacroTag(t.MasterTemplate, targetId, tag, prepend); + return InsertModule(t.MasterTemplate, targetId, tag, prepend); else return false; }