Completes: U4-2835 Remove unused/obsoleted code from namespace umbraco.cms.presentation.developer & U4-2801 Remove legacy/un-used editDataType.aspx webforms editor

This commit is contained in:
Shannon
2013-09-11 11:11:34 +10:00
parent 3aa9873db9
commit 01de1158f4
7 changed files with 0 additions and 380 deletions

View File

@@ -1303,13 +1303,6 @@
<Compile Include="umbraco.presentation\umbraco\developer\autoDoc.aspx.designer.cs">
<DependentUpon>autoDoc.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\DataTypes\editDatatype.aspx.cs">
<DependentUpon>editDatatype.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\DataTypes\editDatatype.aspx.designer.cs">
<DependentUpon>editDatatype.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\Packages\BrowseRepository.aspx.cs">
<DependentUpon>BrowseRepository.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1349,13 +1342,6 @@
<DependentUpon>getXsltStatus.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\Cache\viewCacheItem.aspx.cs">
<DependentUpon>viewCacheItem.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\Cache\viewCacheItem.aspx.designer.cs">
<DependentUpon>viewCacheItem.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\developer\Xslt\xsltChooseExtension.aspx.cs">
<DependentUpon>xsltChooseExtension.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -2101,11 +2087,7 @@
</Content>
<Content Include="umbraco.presentation\umbraco\developer\Macros\assemblyBrowser.aspx" />
<Content Include="umbraco.presentation\umbraco\developer\autoDoc.aspx" />
<Content Include="umbraco.presentation\umbraco\developer\DataTypes\editDatatype.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\developer\Xslt\getXsltStatus.asmx" />
<Content Include="umbraco.presentation\umbraco\developer\Cache\viewCacheItem.aspx" />
<Content Include="umbraco.presentation\umbraco\developer\Xslt\xsltChooseExtension.aspx" />
<Content Include="umbraco.presentation\umbraco\developer\Xslt\xsltInsertValueOf.aspx" />
<Content Include="umbraco.presentation\umbraco\js\language.aspx" />

View File

@@ -1,16 +0,0 @@
<%@ Page MasterPageFile="../../masterpages/umbracoPage.Master" Title="View Cache item" Language="c#" Codebehind="viewCacheItem.aspx.cs" AutoEventWireup="True"
Inherits="umbraco.cms.presentation.developer.viewCacheItem" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<asp:Content ContentPlaceHolderID="body" runat="server">
<cc1:UmbracoPanel ID="Panel1" runat="server" Width="612px" Height="375px" hasMenu="false">
<div class="guiDialogNormal" style="margin: 10px">
<b>Cache Alias:</b>
<asp:Label ID="LabelCacheAlias" runat="server">Label</asp:Label>
<br />
<br />
<b>Cache Value:</b>
<asp:Label ID="LabelCacheValue" runat="server">Label</asp:Label>
</div>
</cc1:UmbracoPanel>
</asp:Content>

View File

@@ -1,27 +0,0 @@
using System;
using System.Web;
using umbraco.BasePages;
namespace umbraco.cms.presentation.developer
{
/// <summary>
/// Summary description for viewCacheItem.
/// </summary>
public partial class viewCacheItem : UmbracoEnsuredPage
{
public viewCacheItem()
{
CurrentApp = BusinessLogic.DefaultApps.developer.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
Panel1.Text = ui.Text("viewCacheItem");
var cacheKey = Request.QueryString["key"];
LabelCacheAlias.Text = cacheKey;
var cacheItem = ApplicationContext.ApplicationCache.GetCacheItem<object>(cacheKey);
LabelCacheValue.Text = cacheItem != null ? cacheItem.ToString() : "Cache item isn't in cache anymore!";
}
}
}

View File

@@ -1,43 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.cms.presentation.developer {
public partial class viewCacheItem {
/// <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>
/// LabelCacheAlias 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.Label LabelCacheAlias;
/// <summary>
/// LabelCacheValue 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.Label LabelCacheValue;
}
}

View File

@@ -1,27 +0,0 @@
<%@ Page Language="c#" MasterPageFile="../../masterpages/umbracoPage.Master" Title="Edit data type"
CodeBehind="editDatatype.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.developer.editDatatype" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<asp:Content ContentPlaceHolderID="body" runat="server">
<cc1:UmbracoPanel ID="Panel1" runat="server" Width="496px" Height="584px">
<cc1:Pane ID="pane_control" runat="server">
<cc1:PropertyPanel ID="pp_name" runat="server">
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_renderControl" runat="server">
<asp:DropDownList ID="ddlRenderControl" runat="server" />
</cc1:PropertyPanel>
<cc1:PropertyPanel ID="pp_guid" runat="server">
<asp:Literal ID="litGuid" runat="server" />
</cc1:PropertyPanel>
</cc1:Pane>
<cc1:Pane ID="pane_settings" runat="server">
<asp:PlaceHolder ID="plcEditorPrevalueControl" runat="server"></asp:PlaceHolder>
</cc1:Pane>
</cc1:UmbracoPanel>
<script type="text/javascript">
jQuery(document).ready(function () {
UmbClientMgr.appActions().bindSaveShortCut();
});
</script>
</asp:Content>

View File

@@ -1,144 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web.UI;
using System.Web.UI.WebControls;
using Umbraco.Core;
using Umbraco.Core.IO;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
using umbraco.cms.presentation.Trees;
using umbraco.interfaces;
namespace umbraco.cms.presentation.developer
{
public partial class editDatatype : BasePages.UmbracoEnsuredPage
{
public editDatatype()
{
CurrentApp = BusinessLogic.DefaultApps.developer.ToString();
}
protected ImageButton save;
private int _id = 0;
private IDataPrevalue _prevalue;
private IDataTypeDefinition _dataTypeDefinition;
protected void Page_Load(object sender, EventArgs e)
{
pp_name.Text = ui.Text("name");
pp_renderControl.Text = ui.Text("renderControl");
pane_settings.Text = ui.Text("settings");
pp_guid.Text = ui.Text("guid");
_id = int.Parse(Request.QueryString["id"]);
_dataTypeDefinition = ApplicationContext.Services.DataTypeService.GetDataTypeDefinitionById(_id);
if (IsPostBack == false)
{
txtName.Text = _dataTypeDefinition.Name;
//get the legacy data types
var datatypes = DataTypesResolver.Current.DataTypes
.ToDictionary(df => df.Id, df => "(legacy) " + df.DataTypeName);
//get the new property editors
var propEditors = PropertyEditorResolver.Current.PropertyEditors
.ToDictionary(pe => pe.Id, pe => pe.Name);
//join the lists
var combined = propEditors.Concat(datatypes);
foreach (var item in combined)
{
var li = new ListItem
{
Text = item.Value,
Value = item.Key.ToString()
};
//SJ Fixes U4-2488 Edit datatype: Media Picker appears incorrectly
//Apparently in some installs the media picker rendercontrol is installed twice with
//the exact same ID so we need to check for duplicates
if (ddlRenderControl.Items.Contains(li))
continue;
if (_dataTypeDefinition.ControlId != default(Guid) && li.Value == _dataTypeDefinition.ControlId.ToString())
{
li.Selected = true;
}
ddlRenderControl.Items.Add(li);
}
ClientTools
.SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree<loadDataTypes>().Tree.Alias)
.SyncTree("-1,init," + _id.ToString(CultureInfo.InvariantCulture), false);
}
if (_dataTypeDefinition.ControlId != default(Guid))
{
litGuid.Text = _dataTypeDefinition.ControlId.ToString();
}
Panel1.Text = ui.Text("edit") + " datatype: " + _dataTypeDefinition.Name;
InsertPrevalueEditor();
}
private void InsertPrevalueEditor()
{
try
{
if (ddlRenderControl.SelectedIndex >= 0)
{
var o = DataTypesResolver.Current.GetById(new Guid(ddlRenderControl.SelectedValue));
o.DataTypeDefinitionId = _dataTypeDefinition.Id;
_prevalue = o.PrevalueEditor;
if (o.PrevalueEditor.Editor != null)
plcEditorPrevalueControl.Controls.Add(o.PrevalueEditor.Editor);
}
else
{
plcEditorPrevalueControl.Controls.Add(new LiteralControl("No editor control selected"));
}
}
catch { }
}
protected void save_click(object sender, ImageClickEventArgs e)
{
// save prevalues;
if (_prevalue != null)
_prevalue.Save();
_dataTypeDefinition.ControlId = new Guid(ddlRenderControl.SelectedValue);
_dataTypeDefinition.Name = txtName.Text;
ApplicationContext.Services.DataTypeService.Save(_dataTypeDefinition, UmbracoUser.Id);
ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "dataTypeSaved"), "");
ClientTools.SyncTree("-1,init," + _id.ToString(CultureInfo.InvariantCulture), true);
}
override protected void OnInit(EventArgs e)
{
save = Panel1.Menu.NewImageButton();
save.ID = "save";
save.Click += save_click;
save.ImageUrl = SystemDirectories.Umbraco + "/images/editor/save.gif";
Panel1.hasMenu = true;
base.OnInit(e);
}
}
}

View File

@@ -1,105 +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.cms.presentation.developer {
public partial class editDatatype {
/// <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>
/// pane_control control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane pane_control;
/// <summary>
/// pp_name control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.PropertyPanel pp_name;
/// <summary>
/// txtName 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.TextBox txtName;
/// <summary>
/// pp_renderControl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.PropertyPanel pp_renderControl;
/// <summary>
/// ddlRenderControl 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.DropDownList ddlRenderControl;
/// <summary>
/// pp_guid control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.PropertyPanel pp_guid;
/// <summary>
/// litGuid 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.Literal litGuid;
/// <summary>
/// pane_settings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane pane_settings;
/// <summary>
/// plcEditorPrevalueControl 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 plcEditorPrevalueControl;
}
}