remore ui replacements

This commit is contained in:
Shannon
2016-03-11 16:02:33 +01:00
parent 9ebe93df06
commit a47a9e5e64
5 changed files with 16 additions and 9 deletions

View File

@@ -27,7 +27,7 @@ jQuery(document).ready(function() {
doNotInit: <%#ManualInitialization.ToString().ToLower()%>,
jsonFullMenu: ctxMenu,
appActions: UmbClientMgr.appActions(),
deletingText: '<%=umbraco.ui.GetText("deleting")%>',
deletingText: '<%=Services.TextService.Localize("deleting")%>',
app: app,
showContext: showContext,
isDialog: isDialog,

View File

@@ -5,6 +5,7 @@ using System.Web.UI.HtmlControls;
using ClientDependency.Core;
using umbraco.controls.Tree;
using Umbraco.Core.IO;
using Umbraco.Core.Services;
namespace umbraco.controls.Tree
{
@@ -99,7 +100,7 @@ jQuery(document).ready(function() {
doNotInit: " + ManualInitialization.ToString().ToLower() + @",
jsonFullMenu: ctxMenu,
appActions: UmbClientMgr.appActions(),
deletingText: '" + umbraco.ui.GetText("deleting") + @"',
deletingText: '" + Services.TextService.Localize("deleting") + @"',
app: app,
showContext: showContext,
isDialog: isDialog,

View File

@@ -10,6 +10,8 @@ using umbraco;
using umbraco.cms.businesslogic;
using umbraco.cms.presentation.Trees;
using umbraco.controls.Tree;
using Umbraco.Core.Services;
using Umbraco.Web.WebServices;
namespace umbraco.controls.Tree
{
@@ -18,7 +20,7 @@ namespace umbraco.controls.Tree
/// </summary>
[ScriptService]
[WebService]
public class CustomTreeService : WebService
public class CustomTreeService : UmbracoWebService
{
/// <summary>
/// Returns some info about the node such as path and id
@@ -104,8 +106,8 @@ namespace umbraco.controls.Tree
//we're going to hijack the node name here to make it say content/media
var node = tree.RootNode;
if (node.Text.Equals("[FilteredContentTree]")) node.Text = ui.GetText("content");
else if (node.Text.Equals("[FilteredMediaTree]")) node.Text = ui.GetText("media");
if (node.Text.Equals("[FilteredContentTree]")) node.Text = Services.TextService.Localize("content");
else if (node.Text.Equals("[FilteredMediaTree]")) node.Text = Services.TextService.Localize("media");
xTree.Add(node);
returnVal.Add("json", xTree.ToString());

View File

@@ -8,6 +8,7 @@ using Umbraco.Core.IO;
using Umbraco.Web;
using umbraco.cms.businesslogic;
using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Web.LegacyActions;
using Umbraco.Web.UI.Pages;
@@ -71,7 +72,7 @@ namespace umbraco.dialogs
else
{
PageNameHolder.type = uicontrols.Feedback.feedbacktype.error;
PageNameHolder.Text = ui.GetText("rights") + " " + ui.GetText("error");
PageNameHolder.Text = Services.TextService.Localize("rights") + " " + Services.TextService.Localize("error");
JTree.DataBind();
}
}

View File

@@ -6,6 +6,9 @@ using umbraco.interfaces;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using umbraco.cms.businesslogic;
using Umbraco.Core;
using Umbraco.Core.Services;
namespace umbraco.uicontrols.TreePicker
{
@@ -207,8 +210,8 @@ namespace umbraco.uicontrols.TreePicker
DeleteLink = new HtmlAnchor();
DeleteLink.HRef = "#"; //set on pre-render
DeleteLink.Style.Add(HtmlTextWriterStyle.Color, "red");
DeleteLink.Title = ui.GetText("delete");
DeleteLink.InnerText = ui.GetText("delete");
DeleteLink.Title = ApplicationContext.Current.Services.TextService.Localize("delete");
DeleteLink.InnerText = ApplicationContext.Current.Services.TextService.Localize("delete");
DeleteLink.Attributes.Add("class", "clear");
ButtonContainer.Controls.Add(DeleteLink);
@@ -224,7 +227,7 @@ namespace umbraco.uicontrols.TreePicker
//add choose link with padding
ChooseLink = new HtmlAnchor();
ChooseLink.HRef = "#"; //filled in on pre-render
ChooseLink.InnerText = ui.GetText("choose") + "...";
ChooseLink.InnerText = ApplicationContext.Current.Services.TextService.Localize("choose") + "...";
ChooseLink.Attributes.Add("data-section", this.TreePickerUrl);
ChooseLink.Attributes.Add("class", "choose");