Removes some unused .aspx files for dictionary editing - no longer needed as we now have this in Angular
This commit is contained in:
@@ -457,7 +457,6 @@
|
||||
<Content Include="Umbraco\Masterpages\umbracoPage.Master" />
|
||||
<Content Include="Umbraco\Masterpages\umbracoDialog.Master" />
|
||||
<Content Include="Umbraco\Webservices\CheckForUpgrade.asmx" />
|
||||
<Content Include="Umbraco\Settings\DictionaryItemList.aspx" />
|
||||
<Content Include="Umbraco\Translation\default.aspx" />
|
||||
<Content Include="Umbraco\Translation\preview.aspx" />
|
||||
<Content Include="Umbraco\Translation\xml.aspx" />
|
||||
@@ -469,7 +468,6 @@
|
||||
<Content Include="Umbraco\ping.aspx">
|
||||
<SubType>Form</SubType>
|
||||
</Content>
|
||||
<Content Include="Umbraco\Settings\EditDictionaryItem.aspx" />
|
||||
<Content Include="Umbraco\treeInit.aspx" />
|
||||
<!--<Content Include="Umbraco\users\PermissionEditor.aspx" />-->
|
||||
<Content Include="Umbraco\Webservices\ajax.js" />
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="DictionaryItemList.aspx.cs"
|
||||
Inherits="umbraco.presentation.settings.DictionaryItemList" MasterPageFile="../masterpages/umbracoPage.Master" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %>
|
||||
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Text="Dictionary overview" Width="408px" Height="264px">
|
||||
<cc1:Pane ID="pane1" runat="server">
|
||||
<table id="dictionaryItems" style="width: 100%;">
|
||||
<asp:Literal ID="lt_table" runat="server" />
|
||||
</table>
|
||||
</cc1:Pane>
|
||||
</cc1:UmbracoPanel>
|
||||
|
||||
</asp:Content>
|
||||
@@ -1,14 +0,0 @@
|
||||
<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %>
|
||||
|
||||
<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master" ValidateRequest="false"
|
||||
CodeBehind="EditDictionaryItem.aspx.cs" AutoEventWireup="True" Inherits="umbraco.settings.EditDictionaryItem" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Width="408px" Height="264px">
|
||||
</cc1:UmbracoPanel>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -6,6 +6,7 @@ namespace Umbraco.Web.UI.Bundles
|
||||
/// <summary>
|
||||
/// The core Jquery libs
|
||||
/// </summary>
|
||||
[ClientDependency(ClientDependencyType.Javascript, "lib/jquery/jquery.min.js", "UmbracoRoot", Priority = 1, Group = 1)]
|
||||
[ClientDependency(ClientDependencyType.Javascript, "lib/jquery-migrate/jquery-migrate.min.js", "UmbracoRoot", Priority = 2, Group = 1)]
|
||||
public class JsJQueryCore : Control
|
||||
{
|
||||
|
||||
@@ -1304,20 +1304,6 @@
|
||||
<Compile Include="umbraco.presentation\umbraco\dialogs\sendToTranslation.aspx.designer.cs">
|
||||
<DependentUpon>sendToTranslation.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\settings\DictionaryItemList.aspx.cs">
|
||||
<DependentUpon>DictionaryItemList.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\settings\DictionaryItemList.aspx.designer.cs">
|
||||
<DependentUpon>DictionaryItemList.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\settings\EditDictionaryItem.aspx.cs">
|
||||
<DependentUpon>EditDictionaryItem.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\settings\EditDictionaryItem.aspx.designer.cs">
|
||||
<DependentUpon>EditDictionaryItem.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\Trees\ITreeService.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -1421,17 +1407,11 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="umbraco.presentation\umbraco\webservices\CheckForUpgrade.asmx" />
|
||||
<Content Include="umbraco.presentation\umbraco\settings\DictionaryItemList.aspx">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Content>
|
||||
<Content Include="umbraco.presentation\umbraco\translation\default.aspx">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Content>
|
||||
<Content Include="umbraco.presentation\umbraco\translation\preview.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\translation\xml.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\settings\EditDictionaryItem.aspx">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Content>
|
||||
<!--<Content Include="umbraco.presentation\umbraco\users\PermissionEditor.aspx" />-->
|
||||
<Content Include="umbraco.presentation\umbraco\webservices\legacyAjaxCalls.asmx" />
|
||||
<Content Include="umbraco.presentation\umbraco\webservices\nodeSorter.asmx" />
|
||||
@@ -1522,6 +1502,9 @@
|
||||
<CachedSettingsPropName>umbraco_org_umbraco_update_CheckForUpgrade</CachedSettingsPropName>
|
||||
</WebReferenceUrl>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="umbraco.presentation\umbraco\settings\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!--
|
||||
copied from Microsoft.CSharp.targets
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="DictionaryItemList.aspx.cs"
|
||||
Inherits="umbraco.presentation.settings.DictionaryItemList" MasterPageFile="../masterpages/umbracoPage.Master" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" %>
|
||||
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Text="Dictionary overview">
|
||||
<cc1:Pane ID="pane1" runat="server">
|
||||
<table id="dictionaryItems" style="width: 100%;">
|
||||
<asp:Literal ID="lt_table" runat="server" />
|
||||
</table>
|
||||
</cc1:Pane>
|
||||
</cc1:UmbracoPanel>
|
||||
|
||||
</asp:Content>
|
||||
@@ -1,64 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Web.Composing;
|
||||
|
||||
namespace umbraco.presentation.settings {
|
||||
|
||||
[WebformsPageTreeAuthorize(Constants.Trees.Dictionary)]
|
||||
public partial class DictionaryItemList : Umbraco.Web.UI.Pages.UmbracoEnsuredPage {
|
||||
|
||||
|
||||
private readonly ILanguage[] _languages = Current.Services.LocalizationService.GetAllLanguages().ToArray();
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e) {
|
||||
|
||||
|
||||
string header = "<thead><tr><td>Key</td>";
|
||||
foreach (var lang in _languages) {
|
||||
header += "<td>" + lang.CultureName + "</td>";
|
||||
}
|
||||
header += "</tr></thead>";
|
||||
|
||||
lt_table.Text = header;
|
||||
|
||||
lt_table.Text += "<tbody>";
|
||||
|
||||
ProcessKeys(Services.LocalizationService.GetRootDictionaryItems(), 0);
|
||||
|
||||
lt_table.Text += "</tbody>";
|
||||
|
||||
}
|
||||
|
||||
private void ProcessKeys(IEnumerable<IDictionaryItem> dictionaryItems, int level) {
|
||||
|
||||
string style = "style='padding-left: " + level * 10 + "px;'";
|
||||
|
||||
foreach (var di in dictionaryItems) {
|
||||
lt_table.Text += "<tr><th " + style + "><a href='editDictionaryItem.aspx?id=" + di.Id.ToString() + "'>" + di.ItemKey + "</a></th>";
|
||||
|
||||
foreach (var lang in _languages) {
|
||||
lt_table.Text += "<td>";
|
||||
|
||||
var trans = di.Translations.FirstOrDefault(x => x.LanguageId == lang.Id);
|
||||
|
||||
if (trans == null || string.IsNullOrEmpty(trans.Value))
|
||||
lt_table.Text += "<i class='icon-alert'></i>";
|
||||
else
|
||||
lt_table.Text += "<i class='icon-check'></i>";
|
||||
|
||||
lt_table.Text += "</td>";
|
||||
}
|
||||
lt_table.Text += "</tr>";
|
||||
|
||||
var children = Services.LocalizationService.GetDictionaryItemChildren(di.Key);
|
||||
if (children.Any())
|
||||
ProcessKeys(children, (level+1));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
-42
@@ -1,42 +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.settings {
|
||||
|
||||
|
||||
public partial class DictionaryItemList {
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::Umbraco.Web._Legacy.Controls.UmbracoPanel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// pane1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::Umbraco.Web._Legacy.Controls.Pane pane1;
|
||||
|
||||
/// <summary>
|
||||
/// lt_table 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 lt_table;
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<%@ Register Namespace="umbraco" TagPrefix="umb" Assembly="Umbraco.Web" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="Umbraco.Web._Legacy.Controls" Assembly="Umbraco.Web" %>
|
||||
|
||||
<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master" ValidateRequest="false"
|
||||
CodeBehind="EditDictionaryItem.aspx.cs" AutoEventWireup="True" Inherits="umbraco.settings.EditDictionaryItem" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Width="408px" Height="264px">
|
||||
</cc1:UmbracoPanel>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -1,175 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using umbraco.cms.presentation.Trees;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.UI;
|
||||
|
||||
namespace umbraco.settings
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for EditDictionaryItem.
|
||||
/// </summary>
|
||||
[WebformsPageTreeAuthorize(Constants.Trees.Dictionary)]
|
||||
public partial class EditDictionaryItem : Umbraco.Web.UI.Pages.UmbracoEnsuredPage
|
||||
{
|
||||
protected LiteralControl keyTxt = new LiteralControl();
|
||||
protected Umbraco.Web._Legacy.Controls.TabView tbv = new Umbraco.Web._Legacy.Controls.TabView();
|
||||
private System.Collections.ArrayList languageFields = new System.Collections.ArrayList();
|
||||
private IDictionaryItem currentItem;
|
||||
protected TextBox boxChangeKey;
|
||||
protected Label labelChangeKey;
|
||||
protected Literal txt;
|
||||
|
||||
protected void Page_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
currentItem = Services.LocalizationService.GetDictionaryItemById(int.Parse(Request.QueryString["id"]));
|
||||
|
||||
// Put user code to initialize the page here
|
||||
Panel1.hasMenu = true;
|
||||
Panel1.Text = Services.TextService.Localize("editdictionary") + ": " + currentItem.ItemKey;
|
||||
|
||||
//var save = Panel1.Menu.NewButton();
|
||||
//save.Text = Services.TextService.Localize("save");
|
||||
//save.Click += save_Click;
|
||||
//save.ToolTip = Services.TextService.Localize("save");
|
||||
//save.ID = "save";
|
||||
//save.ButtonType = Umbraco.Web._Legacy.Controls.MenuButtonType.Primary;
|
||||
|
||||
var p = new Umbraco.Web._Legacy.Controls.Pane();
|
||||
|
||||
boxChangeKey = new TextBox
|
||||
{
|
||||
ID = "changeKey-" + currentItem.Id,
|
||||
CssClass = "umbEditorTextField",
|
||||
Text = currentItem.ItemKey
|
||||
};
|
||||
|
||||
labelChangeKey = new Label
|
||||
{
|
||||
ID = "changeKeyLabel",
|
||||
CssClass = "text-error"
|
||||
};
|
||||
|
||||
p.addProperty(new Literal
|
||||
{
|
||||
Text = "<p>" + Services.TextService.Localize("dictionaryItem/changeKey") + "</p>"
|
||||
});
|
||||
p.addProperty(boxChangeKey);
|
||||
p.addProperty(labelChangeKey);
|
||||
|
||||
|
||||
txt = new Literal();
|
||||
txt.Text = "<p>" + Services.TextService.Localize("dictionaryItem/description", new[] { currentItem.ItemKey }) + "</p><br/>";
|
||||
p.addProperty(txt);
|
||||
|
||||
foreach (var l in Current.Services.LocalizationService.GetAllLanguages())
|
||||
{
|
||||
|
||||
TextBox languageBox = new TextBox();
|
||||
languageBox.TextMode = TextBoxMode.MultiLine;
|
||||
languageBox.ID = l.Id.ToString();
|
||||
languageBox.CssClass = "umbEditorTextFieldMultiple";
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
languageBox.Text = currentItem.GetTranslatedValue(l.Id);
|
||||
}
|
||||
|
||||
languageFields.Add(languageBox);
|
||||
p.addProperty(l.CultureName, languageBox);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
var path = BuildPath(currentItem);
|
||||
ClientTools
|
||||
.SyncTree(path, false);
|
||||
}
|
||||
|
||||
Panel1.Controls.Add(p);
|
||||
}
|
||||
|
||||
private string BuildPath(IDictionaryItem current)
|
||||
{
|
||||
var parentPath = current.ParentId.HasValue == false ? "" : BuildPath(current) + ",";
|
||||
return parentPath + current.Id;
|
||||
}
|
||||
|
||||
void save_Click(object sender, EventArgs e)
|
||||
{
|
||||
labelChangeKey.Text = ""; // reset error text
|
||||
var newKey = boxChangeKey.Text;
|
||||
var save = true;
|
||||
if (string.IsNullOrWhiteSpace(newKey) == false && newKey != currentItem.ItemKey)
|
||||
{
|
||||
if (Services.LocalizationService.DictionaryItemExists(newKey))
|
||||
{
|
||||
// reject
|
||||
labelChangeKey.Text = Services.TextService.Localize("dictionaryItem/changeKeyError", newKey);
|
||||
boxChangeKey.Text = currentItem.ItemKey; // reset key
|
||||
save = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// update key
|
||||
currentItem.ItemKey = newKey;
|
||||
|
||||
// update title
|
||||
Panel1.title.InnerHtml = Services.TextService.Localize("editdictionary") + ": " + newKey;
|
||||
|
||||
// sync the content tree
|
||||
var path = BuildPath(currentItem);
|
||||
ClientTools.SyncTree(path, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (save)
|
||||
{
|
||||
foreach (TextBox t in languageFields)
|
||||
{
|
||||
//check for null but allow empty string!
|
||||
// http://issues.umbraco.org/issue/U4-1931
|
||||
if (t.Text != null)
|
||||
{
|
||||
Services.LocalizationService.AddOrUpdateDictionaryValue(
|
||||
currentItem,
|
||||
Services.LocalizationService.GetLanguageById(int.Parse(t.ID)),
|
||||
t.Text);
|
||||
}
|
||||
}
|
||||
|
||||
Services.LocalizationService.Save(currentItem);
|
||||
ClientTools.ShowSpeechBubble(SpeechBubbleIcon.Save, Services.TextService.Localize("speechBubbles/dictionaryItemSaved"), "");
|
||||
}
|
||||
|
||||
txt.Text = "<br/><p>" + Services.TextService.Localize("dictionaryItem/description", currentItem.ItemKey) + "</p><br/>";
|
||||
}
|
||||
|
||||
#region Web Form Designer generated code
|
||||
|
||||
override protected void OnInit(EventArgs e)
|
||||
{
|
||||
InitializeComponent();
|
||||
base.OnInit(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
-24
@@ -1,24 +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.settings {
|
||||
|
||||
|
||||
public partial class EditDictionaryItem {
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::Umbraco.Web._Legacy.Controls.UmbracoPanel Panel1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user