/// dd_detectedAlias control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpagePlaceholder.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpagePlaceholder.aspx.designer.cs
index 624826f390..5fb7cb041a 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpagePlaceholder.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpagePlaceholder.aspx.designer.cs
@@ -21,6 +21,6 @@ namespace umbraco.presentation.umbraco.dialogs {
///
protected global::System.Web.UI.WebControls.TextBox tb_alias;
- protected global::umbraco.uicontrols.PropertyPanel pp_placeholder;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_placeholder;
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs
index cd405b4fa2..307d1e8d74 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs
@@ -58,7 +58,7 @@ namespace umbraco.dialogs
if (notifications.Any(x => x.Action == a.Letter.ToString()))
c.Checked = true;
- uicontrols.PropertyPanel pp = new umbraco.uicontrols.PropertyPanel();
+ var pp = new Umbraco.Web._Legacy.Controls.PropertyPanel();
pp.CssClass = "inline";
pp.Text = Services.TextService.Localize("actions", a.Alias);
pp.Controls.Add(c);
@@ -96,9 +96,9 @@ namespace umbraco.dialogs
Current.Services.NotificationService.SetNotifications(Security.CurrentUser, node, notifications.ToCharArray().Select(x => x.ToString()).ToArray());
- var feedback = new umbraco.uicontrols.Feedback();
+ var feedback = new Umbraco.Web._Legacy.Controls.Feedback();
feedback.Text = Services.TextService.Localize("notifications") + " " + Services.TextService.Localize("ok") + "" + Services.TextService.Localize("closeThisWindow") + "";
- feedback.type = umbraco.uicontrols.Feedback.feedbacktype.success;
+ feedback.type = Umbraco.Web._Legacy.Controls.Feedback.feedbacktype.success;
pane_form.Controls.Clear();
pane_form.Controls.Add(feedback);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.designer.cs
index 7ab5c11751..5c92ddede5 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.designer.cs
@@ -19,7 +19,7 @@ namespace umbraco.dialogs {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane pane_form;
+ protected global::Umbraco.Web._Legacy.Controls.Pane pane_form;
///
/// pl_buttons control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs
index 0ad5ee6f9c..86dd3a2c29 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs
@@ -4,21 +4,16 @@ using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web.Security;
-using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Windows.Forms.VisualStyles;
using Umbraco.Core;
using Umbraco.Core.Logging;
-using umbraco.cms.businesslogic.web;
using umbraco.controls;
using Umbraco.Core.Models;
-using Umbraco.Core.Persistence;
using Umbraco.Core.Security;
using Umbraco.Web;
using Umbraco.Web.Composing;
using Umbraco.Web.UI.Pages;
using MembershipProviderExtensions = Umbraco.Core.Security.MembershipProviderExtensions;
-using MemberType = umbraco.cms.businesslogic.member.MemberType;
namespace umbraco.presentation.umbraco.dialogs
{
@@ -127,13 +122,13 @@ namespace umbraco.presentation.umbraco.dialogs
private void ProtectPage(bool Simple, int DocumentId, int LoginDocumentId, int ErrorDocumentId)
{
- var doc = new Document(DocumentId);
+ var content = Current.Services.ContentService.GetById(DocumentId);
var loginContent = Services.ContentService.GetById(LoginDocumentId);
if (loginContent == null) throw new NullReferenceException("No content item found with id " + LoginDocumentId);
var noAccessContent = Services.ContentService.GetById(ErrorDocumentId);
if (noAccessContent == null) throw new NullReferenceException("No content item found with id " + ErrorDocumentId);
- var entry = Services.PublicAccessService.GetEntryForContent(doc.ContentEntity.Id.ToString());
+ var entry = Services.PublicAccessService.GetEntryForContent(content.Id.ToString());
if (entry != null)
{
if (Simple)
@@ -148,7 +143,7 @@ namespace umbraco.presentation.umbraco.dialogs
}
else
{
- entry = new PublicAccessEntry(doc.ContentEntity,
+ entry = new PublicAccessEntry(content,
Services.ContentService.GetById(LoginDocumentId),
Services.ContentService.GetById(ErrorDocumentId),
new List());
@@ -159,10 +154,10 @@ namespace umbraco.presentation.umbraco.dialogs
private void AddMembershipRoleToDocument(int documentId, string role)
{
//event
- var doc = new Document(documentId);
+ var content = Current.Services.ContentService.GetById(documentId);
var entry = Services.PublicAccessService.AddRule(
- doc.ContentEntity,
+ content,
Constants.Conventions.PublicAccess.MemberRoleRuleType,
role);
@@ -175,9 +170,9 @@ namespace umbraco.presentation.umbraco.dialogs
private void AddMembershipUserToDocument(int documentId, string membershipUserName)
{
//event
- var doc = new Document(documentId);
+ var content = Current.Services.ContentService.GetById(documentId);
var entry = Services.PublicAccessService.AddRule(
- doc.ContentEntity,
+ content,
Constants.Conventions.PublicAccess.MemberUsernameRuleType,
membershipUserName);
@@ -189,17 +184,17 @@ namespace umbraco.presentation.umbraco.dialogs
private void RemoveMembershipRoleFromDocument(int documentId, string role)
{
- var doc = new Document(documentId);
+ var content = Current.Services.ContentService.GetById(documentId);
Services.PublicAccessService.RemoveRule(
- doc.ContentEntity,
+ content,
Constants.Conventions.PublicAccess.MemberRoleRuleType,
role);
}
private void RemoveProtection(int documentId)
{
- var doc = new Document(documentId);
- var entry = Services.PublicAccessService.GetEntryForContent(doc.ContentEntity);
+ var content = Current.Services.ContentService.GetById(documentId);
+ var entry = Services.PublicAccessService.GetEntryForContent(content);
if (entry != null)
{
Services.PublicAccessService.Delete(entry);
@@ -210,7 +205,7 @@ namespace umbraco.presentation.umbraco.dialogs
{
// Check for editing
int documentId = int.Parse(Request.GetItemAsString("nodeId"));
- var documentObject = new Document(documentId);
+ var content = Current.Services.ContentService.GetById(documentId);
jsShowWindow.Text = "";
ph_errorpage.Controls.Add(errorPagePicker);
@@ -235,16 +230,16 @@ namespace umbraco.presentation.umbraco.dialogs
bt_buttonRemoveProtection.Attributes.Add("onClick", "return confirm('" + Services.TextService.Localize("areyousure") + "')");
// Get login and error pages
- int errorPage = GetErrorPage(documentObject.Path);
- int loginPage = GetLoginPage(documentObject.Path);
+ int errorPage = GetErrorPage(content.Path);
+ int loginPage = GetLoginPage(content.Path);
try
{
- var loginPageObj = new Document(loginPage);
- if (loginPageObj != null)
+ var loginPageContent = Current.Services.ContentService.GetById(loginPage);
+ if (loginPageContent != null)
{
loginPagePicker.Value = loginPage.ToString(CultureInfo.InvariantCulture);
}
- var errorPageObj = new Document(errorPage);
+ var errorPageContent = Current.Services.ContentService.GetById(errorPage);
errorPagePicker.Value = errorPage.ToString(CultureInfo.InvariantCulture);
}
catch (Exception ex)
@@ -355,9 +350,11 @@ namespace umbraco.presentation.umbraco.dialogs
else
{
//if it's the umbraco membership provider, then we need to tell it what member type to create it with
- if (MemberType.GetByAlias(Constants.Conventions.MemberTypes.SystemDefaultProtectType) == null)
+ if (Current.Services.MemberTypeService.Get(Constants.Conventions.MemberTypes.SystemDefaultProtectType) == null)
+ //if (MemberType.GetByAlias(Constants.Conventions.MemberTypes.SystemDefaultProtectType) == null)
{
- MemberType.MakeNew(Services.UserService.GetUserById(0), Constants.Conventions.MemberTypes.SystemDefaultProtectType);
+ var defm = new MemberType(null, Constants.Conventions.MemberTypes.SystemDefaultProtectType);
+ Current.Services.MemberTypeService.Save(defm);
}
var castedProvider = provider.AsUmbracoMembershipProvider();
MembershipCreateStatus status;
@@ -415,17 +412,19 @@ namespace umbraco.presentation.umbraco.dialogs
}
}
- feedback.Text = Services.TextService.Localize("publicAccess/paIsProtected", new[] { new cms.businesslogic.CMSNode(pageId).Text}) + "
" + Services.TextService.Localize("closeThisWindow") + "";
+ var content = Services.ContentService.GetById(pageId);
+ var text = content == null ? "" : content.Name;
+ feedback.Text = Services.TextService.Localize("publicAccess/paIsProtected", new[] { text }) + "
" + Services.TextService.Localize("closeThisWindow") + "";
p_buttons.Visible = false;
pane_advanced.Visible = false;
pane_simple.Visible = false;
- var content = Services.ContentService.GetById(pageId);
+
//reloads the current node in the tree
ClientTools.SyncTree(content.Path, true);
//reloads the current node's children in the tree
ClientTools.ReloadActionNode(false, true);
- feedback.type = global::umbraco.uicontrols.Feedback.feedbacktype.success;
+ feedback.type = global::Umbraco.Web._Legacy.Controls.Feedback.feedbacktype.success;
}
@@ -438,14 +437,15 @@ namespace umbraco.presentation.umbraco.dialogs
RemoveProtection(pageId);
- feedback.Text = Services.TextService.Localize("publicAccess/paIsRemoved", new[] { new cms.businesslogic.CMSNode(pageId).Text}) + "
" + Services.TextService.Localize("closeThisWindow") + "";
-
var content = Services.ContentService.GetById(pageId);
+ var text = content == null ? "" : content.Name;
+ feedback.Text = Services.TextService.Localize("publicAccess/paIsRemoved", new[] { text }) + "
" + Services.TextService.Localize("closeThisWindow") + "";
+
//reloads the current node in the tree
ClientTools.SyncTree(content.Path, true);
//reloads the current node's children in the tree
ClientTools.ReloadActionNode(false, true);
- feedback.type = global::umbraco.uicontrols.Feedback.feedbacktype.success;
+ feedback.type = global::Umbraco.Web._Legacy.Controls.Feedback.feedbacktype.success;
}
protected CustomValidator SimpleLoginNameValidator;
@@ -467,7 +467,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Feedback feedback;
+ protected global::Umbraco.Web._Legacy.Controls.Feedback feedback;
///
/// p_mode control.
@@ -485,7 +485,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane pane_chooseMode;
+ protected global::Umbraco.Web._Legacy.Controls.Pane pane_chooseMode;
///
/// rb_simple control.
@@ -530,7 +530,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane pane_simple;
+ protected global::Umbraco.Web._Legacy.Controls.Pane pane_simple;
///
/// PropertyPanel1 control.
@@ -539,7 +539,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel1;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel PropertyPanel1;
///
/// pp_login control.
@@ -548,7 +548,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_login;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_login;
///
/// simpleLogin control.
@@ -566,7 +566,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_pass;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_pass;
///
/// simplePassword control.
@@ -584,7 +584,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane pane_advanced;
+ protected global::Umbraco.Web._Legacy.Controls.Pane pane_advanced;
///
/// PropertyPanel3 control.
@@ -593,7 +593,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel3;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel PropertyPanel3;
///
/// PropertyPanel2 control.
@@ -602,7 +602,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel2;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel PropertyPanel2;
///
/// groupsSelector control.
@@ -629,7 +629,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane pane_pages;
+ protected global::Umbraco.Web._Legacy.Controls.Pane pane_pages;
///
/// pp_loginPage control.
@@ -638,7 +638,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_loginPage;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_loginPage;
///
/// ph_loginpage control.
@@ -665,7 +665,7 @@ namespace umbraco.presentation.umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_errorPage;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_errorPage;
///
/// ph_errorpage control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/republish.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/republish.aspx.designer.cs
index 901e05f9e1..81bd26801d 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/republish.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/republish.aspx.designer.cs
@@ -38,7 +38,7 @@ namespace umbraco.cms.presentation {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.ProgressBar progbar;
+ protected global::Umbraco.Web._Legacy.Controls.ProgressBar progbar;
///
/// p_done control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs
index a070e50d4a..225e4a154e 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs
@@ -27,7 +27,7 @@
// }
// private Document currentDoc = new Document(int.Parse(helper.Request("nodeId")));
-
+
// protected void version_load(object sender, EventArgs e) {
// if (allVersions.SelectedValue != "")
@@ -95,7 +95,7 @@
// }
// Button1.Visible = true;
-
+
// }
// else
@@ -135,7 +135,7 @@
// InitializeComponent();
// base.OnInit(e);
// }
-
+
// ///
// /// Required method for Designer support - do not modify
// /// the contents of this method with the code editor.
@@ -151,13 +151,13 @@
// if (allVersions.SelectedValue.Trim() != "") {
// Document d = new Document(int.Parse(helper.Request("nodeId")));
// d.RollBack(new Guid(allVersions.SelectedValue), Security.CurrentUser);
-
+
// BusinessLogic.Log.Add(BusinessLogic.LogTypes.RollBack, Security.CurrentUser, d.Id, "Version rolled back to revision '" + allVersions.SelectedValue + "'");
-
+
// Document rollback = new Document(d.Id, new Guid(allVersions.SelectedValue));
-// feedBackMsg.type = global::umbraco.uicontrols.Feedback.feedbacktype.success;
+// feedBackMsg.type = global::Umbraco.Web._Legacy.Controls.Feedback.feedbacktype.success;
// string[] vars = {rollback.Text, rollback.VersionDate.ToLongDateString()};
-
+
// feedBackMsg.Text = ui.Text("rollback", "documentRolledBack", vars, new global::umbraco.BusinessLogic.User(0)) + "
" + Services.TextService.Localize("closeThisWindow") + "";
// diffPanel.Visible = false;
// pl_buttons.Visible = false;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.designer.cs
index ff4420468b..5f33bfb0bb 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.designer.cs
@@ -28,7 +28,7 @@ namespace umbraco.presentation.dialogs {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Feedback feedBackMsg;
+ protected global::Umbraco.Web._Legacy.Controls.Feedback feedBackMsg;
///
/// pp_selectVersion control.
@@ -37,7 +37,7 @@ namespace umbraco.presentation.dialogs {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane pp_selectVersion;
+ protected global::Umbraco.Web._Legacy.Controls.Pane pp_selectVersion;
///
/// pp_currentVersion control.
@@ -46,7 +46,7 @@ namespace umbraco.presentation.dialogs {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_currentVersion;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_currentVersion;
///
/// currentVersionTitle control.
@@ -73,7 +73,7 @@ namespace umbraco.presentation.dialogs {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_rollBackTo;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_rollBackTo;
///
/// allVersions control.
@@ -91,7 +91,7 @@ namespace umbraco.presentation.dialogs {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_view;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_view;
///
/// rbl_mode control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/search.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/search.aspx.designer.cs
index f8a12de376..efc60d5bed 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/search.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/search.aspx.designer.cs
@@ -19,7 +19,7 @@ namespace umbraco.presentation.dialogs {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane Wizard;
+ protected global::Umbraco.Web._Legacy.Controls.Pane Wizard;
///
/// keyword control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs
index 5af8a13cb2..39f65bd468 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs
@@ -1,26 +1,24 @@
using System;
-using System.Linq;
using System.Net.Mail;
using System.Web;
+using System.Linq;
using System.Web.UI.WebControls;
-using umbraco.cms.businesslogic;
-using umbraco.uicontrols;
using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
+using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Models.Membership;
using Umbraco.Web;
using Umbraco.Web.Composing;
using Umbraco.Web.UI.Pages;
-using Language = umbraco.cms.businesslogic.language.Language;
namespace umbraco.presentation.dialogs
{
public partial class sendToTranslation : UmbracoEnsuredPage
{
- private CMSNode _currentPage;
+ private IUmbracoEntity _currentPage;
public sendToTranslation()
{
@@ -29,45 +27,48 @@ namespace umbraco.presentation.dialogs
protected void Page_Load(object sender, EventArgs e)
{
- _currentPage = new CMSNode(Int32.Parse(Request.GetItemAsString("id")));
+ _currentPage = Services.EntityService.Get(Int32.Parse(Request.GetItemAsString("id")));
pp_translator.Text = Services.TextService.Localize("translation/translator");
pp_language.Text = Services.TextService.Localize("translation/translateTo");
pp_includeSubs.Text = Services.TextService.Localize("translation/includeSubpages");
pp_comment.Text = Services.TextService.Localize("comment");
- pane_form.Text = Services.TextService.Localize("translation/sendToTranslate", new[] { _currentPage.Text});
-
+ pane_form.Text = Services.TextService.Localize("translation/sendToTranslate", new[] { _currentPage.Name});
+
if (!IsPostBack)
{
// default language
var selectedLanguage = 0;
- var domains = library.GetCurrentDomains(_currentPage.Id);
+ var domains = Current.Services.DomainService.GetAssignedDomains(_currentPage.Id, false).ToArray();
+ //var domains = library.GetCurrentDomains(_currentPage.Id);
if (domains != null)
{
- selectedLanguage = domains[0].Language.id;
- defaultLanguage.Text = Services.TextService.Localize("defaultLanguageIs") + " " + domains[0].Language.FriendlyName;
+ var lang = Current.Services.LocalizationService.GetLanguageById(domains[0].LanguageId.Value);
+ selectedLanguage = lang.Id;
+ defaultLanguage.Text = Services.TextService.Localize("defaultLanguageIs") + " " + lang.CultureName;
}
else
{
defaultLanguage.Text = Services.TextService.Localize("defaultLanguageIsNotAssigned");
}
-
+
// languages
language.Items.Add(new ListItem(Services.TextService.Localize("general/choose"), ""));
- foreach (var l in Language.getAll)
+ foreach (var l in Current.Services.LocalizationService.GetAllLanguages())
{
var li = new ListItem();
- li.Text = l.FriendlyName;
- li.Value = l.id.ToString();
- if (selectedLanguage == l.id)
+ li.Text = l.CultureName;
+ li.Value = l.Id.ToString();
+ if (selectedLanguage == l.Id)
li.Selected = true;
language.Items.Add(li);
}
// Subpages
- if (_currentPage.Children.Length == 0)
+ var c = Services.EntityService.GetChildren(_currentPage.Id);
+ if (c.Any())
includeSubpages.Enabled = false;
// Translators
@@ -78,7 +79,7 @@ namespace umbraco.presentation.dialogs
if (translator.Items.Count == 0) {
feedback.Text = Services.TextService.Localize("translation/noTranslators");
- feedback.type = Feedback.feedbacktype.error;
+ feedback.type = Umbraco.Web._Legacy.Controls.Feedback.feedbacktype.error;
doTranslation.Enabled = false;
}
@@ -87,9 +88,9 @@ namespace umbraco.presentation.dialogs
}
}
- private bool UserHasTranslatePermission(IUser u, CMSNode node)
+ private bool UserHasTranslatePermission(IUser u, IUmbracoEntity node)
{
- //the permissions column in umbracoUserType is legacy and needs to be rewritten but for now this is the only way to test
+ //the permissions column in umbracoUserType is legacy and needs to be rewritten but for now this is the only way to test
var permissions = Services.UserService.GetPermissions(u, node.Path);
return permissions.AssignedPermissions.Contains("4");
}
@@ -104,41 +105,41 @@ namespace umbraco.presentation.dialogs
_currentPage,
Security.CurrentUser,
Services.UserService.GetUserById(int.Parse(translator.SelectedValue)),
- new Language(int.Parse(language.SelectedValue)),
+ Current.Services.LocalizationService.GetLanguageById(int.Parse(language.SelectedValue)),
comment.Text, includeSubpages.Checked,
true);
pane_form.Visible = false;
pl_buttons.Visible = false;
- feedback.Text = Services.TextService.Localize("translation/pageHasBeenSendToTranslation", _currentPage.Text) +
+ feedback.Text = Services.TextService.Localize("translation/pageHasBeenSendToTranslation", _currentPage.Name) +
"
" +
Services.TextService.Localize("defaultdialogs/closeThisWindow") + "
";
- feedback.type = Feedback.feedbacktype.success;
+ feedback.type = Umbraco.Web._Legacy.Controls.Feedback.feedbacktype.success;
}
else
{
feedback.Text = Services.TextService.Localize("translation/noLanguageSelected");
- feedback.type = Feedback.feedbacktype.error;
+ feedback.type = Umbraco.Web._Legacy.Controls.Feedback.feedbacktype.error;
}
}
-
- public void MakeNew(CMSNode Node, IUser User, IUser Translator, Language Language, string Comment,
+
+ public void MakeNew(IUmbracoEntity Node, IUser User, IUser Translator, ILanguage Language, string Comment,
bool IncludeSubpages, bool SendEmail)
{
// Get translation taskType for obsolete task constructor
var taskType = Services.TaskService.GetTaskTypeByAlias("toTranslate");
// Create pending task
- var t = new cms.businesslogic.task.Task(new Task(taskType));
+ var t = new Umbraco.Web._Legacy.BusinessLogic.Task(new Task(taskType));
t.Comment = Comment;
- t.Node = Node;
+ t.TaskEntity.EntityId = Node.Id;
t.ParentUser = User;
t.User = Translator;
t.Save();
Services.AuditService.Add(AuditType.SendToTranslate,
- "Translator: " + Translator.Name + ", Language: " + Language.FriendlyName,
+ "Translator: " + Translator.Name + ", Language: " + Language.CultureName,
User.Id, Node.Id);
// send it
@@ -153,17 +154,17 @@ namespace umbraco.presentation.dialogs
serverName += IOHelper.ResolveUrl(SystemDirectories.Umbraco);
// Send mail
- string[] subjectVars = { serverName, Node.Text };
+ string[] subjectVars = { serverName, Node.Name };
string[] bodyVars = {
- Translator.Name, Node.Text, User.Name,
+ Translator.Name, Node.Name, User.Name,
serverName, t.Id.ToString(),
- Language.FriendlyName
+ Language.CultureName
};
if (User.Email != "" && User.Email.Contains("@") && Translator.Email != "" &&
Translator.Email.Contains("@"))
{
- // create the mail message
+ // create the mail message
using (MailMessage mail = new MailMessage(User.Email, Translator.Email))
{
// populate the message
@@ -182,7 +183,7 @@ namespace umbraco.presentation.dialogs
Current.Logger.Error("Error sending translation e-mail", ex);
}
}
-
+
}
else
{
@@ -194,8 +195,9 @@ namespace umbraco.presentation.dialogs
if (IncludeSubpages)
{
//store children array here because iterating over an Array property object is very inneficient.
- var c = Node.Children;
- foreach (CMSNode n in c)
+ var c = Services.EntityService.GetChildren(Node.Id);
+ //var c = Node.Children;
+ foreach (var n in c)
{
MakeNew(n, User, Translator, Language, Comment, true, false);
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.designer.cs
index 181a94beba..626f1fc8cd 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.designer.cs
@@ -8,7 +8,7 @@
//------------------------------------------------------------------------------
using System.Web.UI.WebControls;
-using umbraco.uicontrols;
+
namespace umbraco.presentation.dialogs
{
@@ -23,7 +23,7 @@ namespace umbraco.presentation.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected Feedback feedback;
+ protected Umbraco.Web._Legacy.Controls.Feedback feedback;
///
/// pane_form control.
@@ -32,7 +32,7 @@ namespace umbraco.presentation.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected Pane pane_form;
+ protected Umbraco.Web._Legacy.Controls.Pane pane_form;
///
/// pp_translator control.
@@ -41,7 +41,7 @@ namespace umbraco.presentation.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected PropertyPanel pp_translator;
+ protected Umbraco.Web._Legacy.Controls.PropertyPanel pp_translator;
///
/// translator control.
@@ -59,7 +59,7 @@ namespace umbraco.presentation.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected PropertyPanel pp_language;
+ protected Umbraco.Web._Legacy.Controls.PropertyPanel pp_language;
///
/// language control.
@@ -86,7 +86,7 @@ namespace umbraco.presentation.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected PropertyPanel pp_includeSubs;
+ protected Umbraco.Web._Legacy.Controls.PropertyPanel pp_includeSubs;
///
/// includeSubpages control.
@@ -104,7 +104,7 @@ namespace umbraco.presentation.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected PropertyPanel pp_comment;
+ protected Umbraco.Web._Legacy.Controls.PropertyPanel pp_comment;
///
/// comment control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs
index fbb632bb2c..227a4bb507 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx.cs
@@ -179,7 +179,7 @@ namespace umbraco.cms.presentation
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.ProgressBar prog1;
+ protected global::Umbraco.Web._Legacy.Controls.ProgressBar prog1;
///
/// sortDone control.
@@ -197,7 +197,7 @@ namespace umbraco.cms.presentation
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane sortPane;
+ protected global::Umbraco.Web._Legacy.Controls.Pane sortPane;
///
/// lt_nodes control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/umbracoField.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/umbracoField.aspx.cs
index edf89e4e5d..84f98d9de8 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/umbracoField.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/umbracoField.aspx.cs
@@ -132,7 +132,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane pane_form;
+ protected global::Umbraco.Web._Legacy.Controls.Pane pane_form;
///
/// pp_insertField control.
@@ -141,7 +141,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_insertField;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_insertField;
///
/// fieldPicker control.
@@ -150,7 +150,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.FieldDropDownList fieldPicker;
+ protected global::Umbraco.Web._Legacy.Controls.FieldDropDownList fieldPicker;
///
/// pp_insertAltField control.
@@ -159,7 +159,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_insertAltField;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_insertAltField;
///
/// altFieldPicker control.
@@ -168,7 +168,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.FieldDropDownList altFieldPicker;
+ protected global::Umbraco.Web._Legacy.Controls.FieldDropDownList altFieldPicker;
///
/// pp_insertAltText control.
@@ -177,7 +177,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_insertAltText;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_insertAltText;
///
/// pp_recursive control.
@@ -186,7 +186,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_recursive;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_recursive;
///
/// pp_insertBefore control.
@@ -195,7 +195,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_insertBefore;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_insertBefore;
///
/// pp_insertAfter control.
@@ -204,7 +204,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_insertAfter;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_insertAfter;
///
/// pp_FormatAsDate control.
@@ -213,7 +213,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_FormatAsDate;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_FormatAsDate;
///
/// pp_casing control.
@@ -222,7 +222,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_casing;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_casing;
///
/// pp_encode control.
@@ -231,7 +231,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_encode;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_encode;
///
/// pp_convertLineBreaks control.
@@ -240,7 +240,7 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_convertLineBreaks;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_convertLineBreaks;
///
/// pp_removePTags control.
@@ -249,6 +249,6 @@ namespace umbraco.dialogs
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_removePTags;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_removePTags;
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.cs
index afb0820b71..b0c3885c79 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.cs
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using umbraco.cms.businesslogic;
using Umbraco.Core;
using Umbraco.Core.Models;
+using Umbraco.Web.Composing;
namespace umbraco.presentation.settings {
@@ -11,15 +11,15 @@ namespace umbraco.presentation.settings {
public partial class DictionaryItemList : Umbraco.Web.UI.Pages.UmbracoEnsuredPage {
- private readonly cms.businesslogic.language.Language[] _languages = cms.businesslogic.language.Language.getAll;
+ private readonly ILanguage[] _languages = Current.Services.LocalizationService.GetAllLanguages().ToArray();
protected void Page_Load(object sender, EventArgs e) {
string header = "| Key | ";
- foreach (cms.businesslogic.language.Language lang in _languages) {
- header += "" + lang.FriendlyName + " | ";
+ foreach (var lang in _languages) {
+ header += "" + lang.CultureName + " | ";
}
header += "
";
@@ -43,7 +43,7 @@ namespace umbraco.presentation.settings {
foreach (var lang in _languages) {
lt_table.Text += "";
- var trans = di.Translations.FirstOrDefault(x => x.LanguageId == lang.id);
+ var trans = di.Translations.FirstOrDefault(x => x.LanguageId == lang.Id);
if (trans == null || string.IsNullOrEmpty(trans.Value))
lt_table.Text += "";
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.designer.cs
index d8d2688dcd..b314c8e7eb 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/DictionaryItemList.aspx.designer.cs
@@ -19,7 +19,7 @@ namespace umbraco.presentation.settings {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.UmbracoPanel Panel1;
+ protected global::Umbraco.Web._Legacy.Controls.UmbracoPanel Panel1;
///
/// pane1 control.
@@ -28,7 +28,7 @@ namespace umbraco.presentation.settings {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane pane1;
+ protected global::Umbraco.Web._Legacy.Controls.Pane pane1;
///
/// lt_table control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs
index e7cb51a650..b8cbc0454d 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs
@@ -8,6 +8,7 @@ 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
@@ -19,7 +20,7 @@ namespace umbraco.settings
public partial class EditDictionaryItem : Umbraco.Web.UI.Pages.UmbracoEnsuredPage
{
protected LiteralControl keyTxt = new LiteralControl();
- protected uicontrols.TabView tbv = new uicontrols.TabView();
+ 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;
@@ -39,9 +40,9 @@ namespace umbraco.settings
save.Click += save_Click;
save.ToolTip = Services.TextService.Localize("save");
save.ID = "save";
- save.ButtonType = uicontrols.MenuButtonType.Primary;
+ save.ButtonType = Umbraco.Web._Legacy.Controls.MenuButtonType.Primary;
- uicontrols.Pane p = new uicontrols.Pane();
+ var p = new Umbraco.Web._Legacy.Controls.Pane();
boxChangeKey = new TextBox
{
@@ -68,21 +69,21 @@ namespace umbraco.settings
txt.Text = " " + Services.TextService.Localize("dictionaryItem/description", new[] { currentItem.ItemKey }) + " ";
p.addProperty(txt);
- foreach (cms.businesslogic.language.Language l in cms.businesslogic.language.Language.getAll)
+ foreach (var l in Current.Services.LocalizationService.GetAllLanguages())
{
TextBox languageBox = new TextBox();
languageBox.TextMode = TextBoxMode.MultiLine;
- languageBox.ID = l.id.ToString();
+ languageBox.ID = l.Id.ToString();
languageBox.CssClass = "umbEditorTextFieldMultiple";
if (!IsPostBack)
{
- languageBox.Text = currentItem.GetTranslatedValue(l.id);
+ languageBox.Text = currentItem.GetTranslatedValue(l.Id);
}
languageFields.Add(languageBox);
- p.addProperty(l.FriendlyName, languageBox);
+ p.addProperty(l.CultureName, languageBox);
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.designer.cs
index 15921e7445..03448bce09 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.designer.cs
@@ -19,6 +19,6 @@ namespace umbraco.settings {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.UmbracoPanel Panel1;
+ protected global::Umbraco.Web._Legacy.Controls.UmbracoPanel Panel1;
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs
index 561165f6a9..9a20747e40 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs
@@ -3,8 +3,10 @@ using System.Collections;
using System.Globalization;
using System.Web.UI.WebControls;
using Umbraco.Core;
+using Umbraco.Core.Models;
using Umbraco.Core.Services;
using Umbraco.Web;
+using Umbraco.Web.Composing;
using Umbraco.Web.UI;
namespace umbraco.settings
@@ -22,11 +24,13 @@ namespace umbraco.settings
}
protected System.Web.UI.WebControls.TextBox NameTxt;
protected System.Web.UI.WebControls.Literal DisplayName;
- cms.businesslogic.language.Language currentLanguage;
+ //cms.businesslogic.language.Language currentLanguage;
+ private ILanguage lang;
protected void Page_Load(object sender, System.EventArgs e)
{
- currentLanguage = new cms.businesslogic.language.Language(int.Parse(Request.GetItemAsString("id")));
+ //currentLanguage = new cms.businesslogic.language.Language(int.Parse(Request.GetItemAsString("id")));
+ lang = Current.Services.LocalizationService.GetLanguageById(int.Parse(Request.GetItemAsString("id")));
// Put user code to initialize the page here
@@ -55,17 +59,19 @@ namespace umbraco.settings
while (ide.MoveNext())
{
ListItem li = new ListItem(ide.Key.ToString().Substring(0, ide.Key.ToString().IndexOf("|||")), ide.Value.ToString());
- if (ide.Value.ToString() == currentLanguage.CultureAlias)
+ if (ide.Value.ToString() == lang.IsoCode)
li.Selected = true;
Cultures.Items.Add(li);
}
}
- private void save_click(object sender, EventArgs e)
+ private void save_click(object sender, EventArgs e)
{
- currentLanguage.CultureAlias = Cultures.SelectedValue;
- currentLanguage.Save();
+ //currentLanguage.CultureAlias = Cultures.SelectedValue;
+ //currentLanguage.Save();
+ lang.IsoCode = Cultures.SelectedValue;
+ Current.Services.LocalizationService.Save(lang);
updateCultureList();
ClientTools.ShowSpeechBubble(SpeechBubbleIcon.Save, Services.TextService.Localize("speechBubbles/languageSaved"), "");
@@ -80,7 +86,7 @@ namespace umbraco.settings
save.ToolTip = Services.TextService.Localize("save");
save.Text = Services.TextService.Localize("save");
save.ID = "save";
- save.ButtonType = uicontrols.MenuButtonType.Primary;
+ save.ButtonType = Umbraco.Web._Legacy.Controls.MenuButtonType.Primary;
Panel1.Text = Services.TextService.Localize("language/editLanguage");
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.designer.cs
index 4647664406..7abd800029 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.designer.cs
@@ -19,7 +19,7 @@ namespace umbraco.settings {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.UmbracoPanel Panel1;
+ protected global::Umbraco.Web._Legacy.Controls.UmbracoPanel Panel1;
///
/// Pane7 control.
@@ -28,7 +28,7 @@ namespace umbraco.settings {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane Pane7;
+ protected global::Umbraco.Web._Legacy.Controls.Pane Pane7;
///
/// pp_language control.
@@ -37,7 +37,7 @@ namespace umbraco.settings {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_language;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_language;
///
/// Cultures control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs
index 5847dc1bf5..e4f1fa516e 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs
@@ -8,9 +8,8 @@ using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
-using umbraco.cms.businesslogic.template;
-using umbraco.uicontrols;
-using Umbraco.Web;
+using Umbraco.Core.Models;
+using Umbraco.Web._Legacy.Controls;
using Umbraco.Web.Composing;
using Umbraco.Web.UI.Pages;
@@ -21,7 +20,7 @@ namespace umbraco.cms.presentation.settings
///
public partial class editTemplate : UmbracoEnsuredPage
{
- private Template _template;
+ private Umbraco.Core.Models.ITemplate _template;
public MenuButton SaveButton;
public editTemplate()
@@ -49,28 +48,37 @@ namespace umbraco.cms.presentation.settings
if (!IsPostBack)
{
MasterTemplate.Items.Add(new ListItem(Services.TextService.Localize("none"), "0"));
- foreach (Template t in Template.GetAllAsList())
- {
- if (t.Id != _template.Id)
- {
- var li = new ListItem(t.Text, t.Id.ToString());
- li.Attributes.Add("id", t.Alias.Replace(" ", ""));
- MasterTemplate.Items.Add(li);
- }
- }
+ foreach (var t in Current.Services.FileService.GetTemplates())
+ {
+ if (t.Id != _template.Id)
+ {
+ var text = t.Name;
+ if (text.StartsWith("#"))
+ {
+ var lang = Current.Services.LocalizationService.GetLanguageByIsoCode(System.Threading.Thread.CurrentThread.CurrentCulture.Name);
+ if (lang != null && Current.Services.LocalizationService.DictionaryItemExists(text.Substring(1)))
+ {
+ var di = Current.Services.LocalizationService.GetDictionaryItemByKey(text.Substring(1));
+ text = di.GetTranslatedValue(lang.Id);
+ }
+ else
+ {
+ text = "[" + text + "]";
+ }
+ }
+ var li = new ListItem(text, t.Id.ToString());
+ li.Attributes.Add("id", t.Alias.Replace(" ", ""));
+ MasterTemplate.Items.Add(li);
+ }
+ }
- NameTxt.Text = _template.GetRawText();
+ NameTxt.Text = _template.Name;
AliasTxt.Text = _template.Alias;
- editorSource.Text = _template.Design;
+ editorSource.Text = _template.Content;
- try
- {
- if (_template.MasterTemplate > 0)
- MasterTemplate.SelectedValue = _template.MasterTemplate.ToString();
- }
- catch (Exception ex)
- {
- }
+ var master = Current.Services.FileService.GetTemplate(_template.MasterTemplateAlias);
+ if (master != null)
+ MasterTemplate.SelectedValue = master.Id.ToString();
ClientTools
.SetActiveTreeType(Constants.Trees.Templates)
@@ -83,7 +91,7 @@ namespace umbraco.cms.presentation.settings
protected override void OnInit(EventArgs e)
{
- _template = new Template(int.Parse(Request.QueryString["templateID"]));
+ _template = Current.Services.FileService.GetTemplate(int.Parse(Request.QueryString["templateID"]));
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
@@ -262,7 +270,7 @@ namespace umbraco.cms.presentation.settings
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.TabView Panel1;
+ protected global::Umbraco.Web._Legacy.Controls.TabView Panel1;
///
/// Pane7 control.
@@ -271,8 +279,8 @@ namespace umbraco.cms.presentation.settings
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane Pane7;
- protected global::umbraco.uicontrols.Pane Pane8;
+ protected global::Umbraco.Web._Legacy.Controls.Pane Pane7;
+ protected global::Umbraco.Web._Legacy.Controls.Pane Pane8;
///
/// pp_name control.
@@ -281,7 +289,7 @@ namespace umbraco.cms.presentation.settings
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_name;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_name;
///
/// NameTxt control.
@@ -299,7 +307,7 @@ namespace umbraco.cms.presentation.settings
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_alias;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_alias;
///
/// AliasTxt control.
@@ -317,7 +325,7 @@ namespace umbraco.cms.presentation.settings
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_masterTemplate;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_masterTemplate;
///
/// MasterTemplate control.
@@ -335,7 +343,7 @@ namespace umbraco.cms.presentation.settings
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_source;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_source;
///
/// editorSource control.
@@ -344,7 +352,7 @@ namespace umbraco.cms.presentation.settings
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.CodeArea editorSource;
+ protected global::Umbraco.Web._Legacy.Controls.CodeArea editorSource;
///
/// rpt_codeTemplates control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/modals/ShowUmbracoTags.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/modals/ShowUmbracoTags.aspx.cs
index 0938a1a377..3d23d12393 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/modals/ShowUmbracoTags.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/modals/ShowUmbracoTags.aspx.cs
@@ -1,14 +1,4 @@
using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Web;
-using System.Web.SessionState;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using System.Web.UI.HtmlControls;
-using umbraco.BusinessLogic;
using Umbraco.Core;
namespace umbraco.cms.presentation.settings.modal
@@ -38,6 +28,6 @@ namespace umbraco.cms.presentation.settings.modal
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected uicontrols.Pane Pane7;
+ protected Umbraco.Web._Legacy.Controls.Pane Pane7;
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs
index 413da8a117..2d616cbe9e 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs
@@ -6,7 +6,7 @@ using Umbraco.Core.Services;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using umbraco.cms.presentation.Trees;
-using umbraco.uicontrols;
+using Umbraco.Web._Legacy.Controls;
using Umbraco.Web;
using Umbraco.Web.Composing;
@@ -20,16 +20,16 @@ namespace umbraco.cms.presentation.settings.scripts
}
protected System.Web.UI.HtmlControls.HtmlForm Form1;
- protected uicontrols.TabView Panel1;
+ protected Umbraco.Web._Legacy.Controls.TabView Panel1;
protected System.Web.UI.WebControls.TextBox NameTxt;
- protected uicontrols.Pane Pane7;
- protected uicontrols.Pane Pane8;
+ protected Umbraco.Web._Legacy.Controls.Pane Pane7;
+ protected Umbraco.Web._Legacy.Controls.Pane Pane8;
protected System.Web.UI.WebControls.Literal lttPath;
protected System.Web.UI.WebControls.Literal editorJs;
- protected umbraco.uicontrols.CodeArea editorSource;
- protected umbraco.uicontrols.PropertyPanel pp_name;
- protected umbraco.uicontrols.PropertyPanel pp_path;
+ protected Umbraco.Web._Legacy.Controls.CodeArea editorSource;
+ protected Umbraco.Web._Legacy.Controls.PropertyPanel pp_name;
+ protected Umbraco.Web._Legacy.Controls.PropertyPanel pp_path;
protected MenuButton SaveButton;
@@ -80,9 +80,9 @@ namespace umbraco.cms.presentation.settings.scripts
//need to change the editor type if it is XML
if (filename.EndsWith("xml"))
- editorSource.CodeBase = uicontrols.CodeArea.EditorType.XML;
+ editorSource.CodeBase = Umbraco.Web._Legacy.Controls.CodeArea.EditorType.XML;
else if (filename.EndsWith("master"))
- editorSource.CodeBase = uicontrols.CodeArea.EditorType.HTML;
+ editorSource.CodeBase = Umbraco.Web._Legacy.Controls.CodeArea.EditorType.HTML;
var editor = Panel1.NewTabPage(Services.TextService.Localize("settings/script"));
@@ -98,17 +98,17 @@ namespace umbraco.cms.presentation.settings.scripts
SaveButton.ID = "save";
SaveButton.CssClass = "client-side";
- if (editorSource.CodeBase == uicontrols.CodeArea.EditorType.HTML)
+ if (editorSource.CodeBase == Umbraco.Web._Legacy.Controls.CodeArea.EditorType.HTML)
{
// Editing buttons
Panel1.Menu.InsertSplitter();
- uicontrols.MenuIconI umbField = Panel1.Menu.NewIcon();
+ Umbraco.Web._Legacy.Controls.MenuIconI umbField = Panel1.Menu.NewIcon();
umbField.ImageURL = SystemDirectories.Umbraco + "/images/editor/insField.gif";
umbField.OnClickCommand = Umbraco.Web.UI.Pages.ClientTools.Scripts.OpenModalWindow(IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/dialogs/umbracoField.aspx?objectId=" + editorSource.ClientID + "&tagName=UMBRACOGETDATA", Services.TextService.Localize("template/insertPageField"), 640, 550);
umbField.AltText = Services.TextService.Localize("template/insertPageField");
// TODO: Update icon
- uicontrols.MenuIconI umbDictionary = Panel1.Menu.NewIcon();
+ Umbraco.Web._Legacy.Controls.MenuIconI umbDictionary = Panel1.Menu.NewIcon();
umbDictionary.ImageURL = GlobalSettings.Path + "/images/editor/dictionaryItem.gif";
umbDictionary.OnClickCommand = Umbraco.Web.UI.Pages.ClientTools.Scripts.OpenModalWindow(IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/dialogs/umbracoField.aspx?objectId=" + editorSource.ClientID + "&tagName=UMBRACOGETDICTIONARY", Services.TextService.Localize("template/insertDictionaryItem"), 640, 550);
umbDictionary.AltText = "Insert umbraco dictionary item";
@@ -116,7 +116,7 @@ namespace umbraco.cms.presentation.settings.scripts
// Help
Panel1.Menu.InsertSplitter();
- uicontrols.MenuIconI helpIcon = Panel1.Menu.NewIcon();
+ Umbraco.Web._Legacy.Controls.MenuIconI helpIcon = Panel1.Menu.NewIcon();
helpIcon.OnClickCommand = Umbraco.Web.UI.Pages.ClientTools.Scripts.OpenModalWindow(Umbraco.Core.IO.IOHelper.ResolveUrl(Umbraco.Core.IO.SystemDirectories.Umbraco) + "/settings/modals/showumbracotags.aspx?alias=", Services.TextService.Localize("template/quickGuide"), 600, 580);
helpIcon.ImageURL = SystemDirectories.Umbraco + "/images/editor/help.png";
helpIcon.AltText = Services.TextService.Localize("template/quickGuide");
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/editstylesheet.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/editstylesheet.aspx.cs
index 9b2a5590ce..248cd8886f 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/editstylesheet.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/editstylesheet.aspx.cs
@@ -1,14 +1,9 @@
using Umbraco.Core.Services;
using System;
using System.IO;
-using System.Linq;
using System.Web.UI;
-using Umbraco.Core.IO;
-using Umbraco.Web;
-using umbraco.BusinessLogic;
-using umbraco.cms.businesslogic.web;
using umbraco.cms.presentation.Trees;
-using umbraco.uicontrols;
+using Umbraco.Web._Legacy.Controls;
using Umbraco.Core;
using Umbraco.Web.UI.Pages;
@@ -87,7 +82,7 @@ namespace umbraco.cms.presentation.settings.stylesheet
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.TabView Panel1;
+ protected global::Umbraco.Web._Legacy.Controls.TabView Panel1;
///
/// Pane7 control.
@@ -96,8 +91,8 @@ namespace umbraco.cms.presentation.settings.stylesheet
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.Pane Pane7;
- protected global::umbraco.uicontrols.Pane Pane8;
+ protected global::Umbraco.Web._Legacy.Controls.Pane Pane7;
+ protected global::Umbraco.Web._Legacy.Controls.Pane Pane8;
///
/// pp_name control.
@@ -106,7 +101,7 @@ namespace umbraco.cms.presentation.settings.stylesheet
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_name;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_name;
///
/// NameTxt control.
@@ -124,7 +119,7 @@ namespace umbraco.cms.presentation.settings.stylesheet
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_path;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_path;
///
/// lttPath control.
@@ -142,7 +137,7 @@ namespace umbraco.cms.presentation.settings.stylesheet
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::umbraco.uicontrols.PropertyPanel pp_source;
+ protected global::Umbraco.Web._Legacy.Controls.PropertyPanel pp_source;
/// |