From 13e5590efaaca0f58802d251752ce2b5e4f3a527 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Wed, 6 Feb 2013 05:56:49 +0600 Subject: [PATCH] Obsoleted methods in old Casing class and redirects to use StringExtensions. Removes eroneous webforms files not needed in the Umbraco.Web prject (didn't convert the related UI project ones to have code behinds though... one thing at a time and there's a lot of them to do... over time) --- src/Umbraco.Core/StringExtensions.cs | 8 +- src/Umbraco.Web/Mvc/RenderRouteHandler.cs | 2 +- src/Umbraco.Web/Umbraco.Web.csproj | 174 +++++------------- .../umbraco.presentation/umbraco/Default.aspx | 55 ------ .../umbraco/Default.aspx.cs | 34 ++-- .../umbraco/Default.aspx.designer.cs | 24 --- .../umbraco.presentation/umbraco/Help.cs | 101 ++++++++++ .../umbraco/cacheBrowser.aspx | 16 -- .../umbraco/cacheBrowser.aspx.cs | 63 ++++--- .../umbraco/cacheBrowser.aspx.designer.cs | 17 -- .../umbraco.presentation/umbraco/canvas.aspx | 16 -- .../umbraco/canvas.aspx.cs | 13 +- .../umbraco/canvas.aspx.designer.cs | 25 --- .../umbraco.presentation/umbraco/create.aspx | 38 ---- .../umbraco/create.aspx.cs | 25 +-- .../umbraco/create.aspx.designer.cs | 25 --- .../umbraco/dashboard.aspx | 11 -- .../umbraco/dashboard.aspx.cs | 38 ++-- .../umbraco/dashboard.aspx.designer.cs | 43 ----- .../umbraco/editContent.aspx | 62 ------- .../umbraco/editContent.aspx.cs | 72 +++++++- .../umbraco/editContent.aspx.designer.cs | 69 ------- .../umbraco/editMedia.aspx | 28 --- .../umbraco/editMedia.aspx.cs | 106 ++++++----- .../umbraco/editMedia.aspx.designer.cs | 42 ----- .../umbraco/endPreview.aspx | 16 -- .../umbraco/endPreview.aspx.cs | 11 +- .../umbraco/endPreview.aspx.designer.cs | 25 --- .../umbraco/helpRedirect.aspx | 12 -- .../umbraco/helpRedirect.aspx.cs | 106 +---------- .../umbraco/helpRedirect.aspx.designer.cs | 15 -- .../umbraco/js/UmbracoCasingRules.aspx.cs | 3 +- .../umbraco.presentation/umbraco/login.aspx | 127 ------------- .../umbraco/login.aspx.cs | 173 +++++++++++++++-- .../umbraco/login.aspx.designer.cs | 168 ----------------- .../umbraco.presentation/umbraco/logout.aspx | 21 --- .../umbraco/logout.aspx.cs | 45 ++--- .../umbraco/logout.aspx.designer.cs | 16 -- .../umbraco/macroResultWrapper.aspx | 12 -- .../umbraco/macroResultWrapper.aspx.cs | 97 +++++----- .../macroResultWrapper.aspx.designer.cs | 34 ---- .../umbraco/publishStatus.aspx | 18 -- .../umbraco/publishStatus.aspx.cs | 100 ++++++---- .../umbraco/publishStatus.aspx.designer.cs | 40 ---- .../umbraco.presentation/umbraco/tree.aspx | 1 - .../umbraco.presentation/umbraco/tree.aspx.cs | 28 +-- .../umbraco/tree.aspx.designer.cs | 15 -- src/umbraco.cms/helpers/Casing.cs | 7 + 48 files changed, 689 insertions(+), 1508 deletions(-) delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx.designer.cs create mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/Help.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx.designer.cs diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/StringExtensions.cs index 87e2cb5fbc..d4c7e46812 100644 --- a/src/Umbraco.Core/StringExtensions.cs +++ b/src/Umbraco.Core/StringExtensions.cs @@ -21,6 +21,10 @@ namespace Umbraco.Core /// public static class StringExtensions { + + public const string UmbracoValidAliasCharacters = "_-abcdefghijklmnopqrstuvwxyz1234567890"; + public const string UmbracoInvalidFirstCharacters = "01234567890"; + /// /// Encrypt the string using the MachineKey in medium trust /// @@ -830,8 +834,8 @@ namespace Umbraco.Core /// An alias guaranteed not to contain illegal characters public static string ToSafeAlias(this string alias) { - const string validAliasCharacters = "_-abcdefghijklmnopqrstuvwxyz1234567890"; - const string invalidFirstCharacters = "01234567890"; + const string validAliasCharacters = UmbracoValidAliasCharacters; + const string invalidFirstCharacters = UmbracoInvalidFirstCharacters; var safeString = new StringBuilder(); int aliasLength = alias.Length; for (int i = 0; i < aliasLength; i++) diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs index 39bf65160a..d267677408 100644 --- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs @@ -274,7 +274,7 @@ namespace Umbraco.Web.Mvc //the template Alias should always be already saved with a safe name. //if there are hyphens in the name and there is a hijacked route, then the Action will need to be attributed // with the action name attribute. - var templateName = global::umbraco.cms.helpers.Casing.SafeAlias(publishedContentRequest.TemplateAlias.Split('.')[0]); + var templateName = publishedContentRequest.TemplateAlias.Split('.')[0].ToSafeAlias(); def.ActionName = templateName; } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 577b15b8b9..e3d3daa97d 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -385,6 +385,49 @@ + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + ASPXCodeBehind @@ -580,13 +623,6 @@ publish.aspx - - cacheBrowser.aspx - ASPXCodeBehind - - - cacheBrowser.aspx - code @@ -820,20 +856,6 @@ TemplateSkinning.aspx - - endPreview.aspx - ASPXCodeBehind - - - endPreview.aspx - - - helpRedirect.aspx - ASPXCodeBehind - - - helpRedirect.aspx - UmbracoCasingRules.aspx ASPXCodeBehind @@ -953,13 +975,6 @@ SendPublish.aspx - - create.aspx - ASPXCodeBehind - - - create.aspx - content.ascx ASPXCodeBehind @@ -1022,13 +1037,6 @@ xslt.ascx - - dashboard.aspx - ASPXCodeBehind - - - dashboard.aspx - LatestEdits.ascx ASPXCodeBehind @@ -1036,13 +1044,6 @@ LatestEdits.ascx - - Default.aspx - ASPXCodeBehind - - - Default.aspx - assemblyBrowser.aspx ASPXCodeBehind @@ -1272,20 +1273,6 @@ viewAuditTrail.aspx - - editContent.aspx - ASPXCodeBehind - - - editContent.aspx - - - editMedia.aspx - ASPXCodeBehind - - - editMedia.aspx - language.aspx ASPXCodeBehind @@ -1315,27 +1302,6 @@ - - login.aspx - ASPXCodeBehind - - - login.aspx - - - logout.aspx - ASPXCodeBehind - - - logout.aspx - - - macroResultWrapper.aspx - ASPXCodeBehind - - - macroResultWrapper.aspx - default.Master ASPXCodeBehind @@ -1430,13 +1396,6 @@ tinymce3tinymceCompress.aspx - - publishStatus.aspx - ASPXCodeBehind - - - publishStatus.aspx - QuickSearchHandler.ashx @@ -1554,13 +1513,6 @@ Code - - canvas.aspx - ASPXCodeBehind - - - canvas.aspx - default.aspx ASPXCodeBehind @@ -1589,13 +1541,6 @@ xml.aspx - - tree.aspx - ASPXCodeBehind - - - tree.aspx - ASPXCodeBehind @@ -1812,7 +1757,6 @@ - @@ -1821,7 +1765,6 @@ - @@ -1894,7 +1837,6 @@ - ASPXCodeBehind @@ -1929,14 +1871,10 @@ ASPXCodeBehind - - - ASPXCodeBehind - ASPXCodeBehind @@ -1952,11 +1890,9 @@ ASPXCodeBehind - ASPXCodeBehind - @@ -1964,26 +1900,12 @@ - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - Form - Form - Designer @@ -2003,9 +1925,6 @@ ASPXCodeBehind - - ASPXCodeBehind - @@ -2101,11 +2020,8 @@ - xcopy /s /y "$(ProjectDir)umbraco.presentation\*.aspx" "$(ProjectDir)..\Umbraco.Web.UI\" -xcopy /s /y "$(ProjectDir)umbraco.presentation\*.ascx" "$(ProjectDir)..\Umbraco.Web.UI\" -xcopy /s /y "$(ProjectDir)umbraco.presentation\*.asmx" "$(ProjectDir)..\Umbraco.Web.UI\" -xcopy /s /y "$(ProjectDir)umbraco.presentation\*.ashx" "$(ProjectDir)..\Umbraco.Web.UI\" -xcopy /s /y "$(ProjectDir)umbraco.presentation\*.master" "$(ProjectDir)..\Umbraco.Web.UI\" + + diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx deleted file mode 100644 index 963ced80c2..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx +++ /dev/null @@ -1,55 +0,0 @@ -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - -<%@ Page Language="c#" CodeBehind="Default.aspx.cs" AutoEventWireup="True" Inherits="umbraco._Default" %> - - - - - Start Umbraco - - - - - - -
- umbraco
-
-

umbraco <%=umbraco.ui.Text("dashboard", "openinnew")%>

- - -
-
- - <%=umbraco.ui.Text("dashboard", "restart")%> - umbraco   - <%=umbraco.ui.Text("dashboard", "browser")%>
- -
-
- - (<%=umbraco.ui.Text("dashboard", "nothinghappens")%>) -
-
- - <%=umbraco.ui.Text("dashboard", "visit")%> - umbraco.org -
- - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx.cs index 40b7b17832..e3f11e6d80 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.ComponentModel; using System.Data; @@ -11,18 +11,26 @@ using System.Web.UI.HtmlControls; namespace umbraco { - /// - /// Summary description for _Default. - /// - public partial class _Default : System.Web.UI.Page - { - protected void Page_Load(object sender, System.EventArgs e) - { + /// + /// Summary description for _Default. + /// + public partial class _Default : System.Web.UI.Page + { + protected void Page_Load(object sender, System.EventArgs e) + { - Server.Transfer("umbraco.aspx"); - // Put user code to initialize the page here - } + Server.Transfer("umbraco.aspx"); + // Put user code to initialize the page here + } - - } + /// + /// Form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm Form1; + + } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx.designer.cs deleted file mode 100644 index 2e30fad8dc..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Default.aspx.designer.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco { - - - public partial class _Default { - - /// - /// Form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm Form1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Help.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Help.cs new file mode 100644 index 0000000000..9ff4a8efcb --- /dev/null +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Help.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.Xml; + +namespace umbraco.presentation.umbraco +{ + public class Help + { + public string DefaultURL { get; set; } + public List HelpConfigPages { get; set; } + + public Help(XmlNode helpConfigNode) + { + DefaultURL = GetXmlAttributeAsString(helpConfigNode.Attributes["defaultUrl"]); + + HelpConfigPages = new List(); + + foreach (XmlNode linkNode in helpConfigNode.SelectNodes("link")) + { + + HelpConfigPages.Add(new HelpConfigPage + { + Application = GetXmlAttributeAsString(linkNode.Attributes["application"]), + ApplicationUrl = GetXmlAttributeAsString(linkNode.Attributes["applicationUrl"]), + Language = GetXmlAttributeAsString(linkNode.Attributes["language"]), + UserType = GetXmlAttributeAsString(linkNode.Attributes["userType"]), + HelpUrl = GetXmlAttributeAsString(linkNode.Attributes["helpUrl"]) + }); + } + } + + public string ResolveHelpUrl(HelpPage requestedHelpPage) + { + HelpConfigPage bestMatchingConfigPage = null; + + int currentBestMatchCount = 0; + + foreach (HelpConfigPage helpConfigPage in HelpConfigPages) + { + int attributeMatchCount = 0; + + if ((helpConfigPage.Application != "" && String.Compare(helpConfigPage.Application, requestedHelpPage.Application, true) != 0) || + (helpConfigPage.ApplicationUrl != "" && String.Compare(helpConfigPage.ApplicationUrl, requestedHelpPage.ApplicationUrl, true) != 0) || + (helpConfigPage.Language != "" && String.Compare(helpConfigPage.Language, requestedHelpPage.Language, true) != 0) || + (helpConfigPage.UserType != "" && String.Compare(helpConfigPage.UserType, requestedHelpPage.UserType, true) != 0)) + { + continue; + } + + if (String.Compare(helpConfigPage.Application, requestedHelpPage.Application, true) == 0) attributeMatchCount++; + if (String.Compare(helpConfigPage.ApplicationUrl, requestedHelpPage.ApplicationUrl, true) == 0) attributeMatchCount++; + if (String.Compare(helpConfigPage.Language, requestedHelpPage.Language, true) == 0) attributeMatchCount++; + if (String.Compare(helpConfigPage.UserType, requestedHelpPage.UserType, true) == 0) attributeMatchCount++; + + if (attributeMatchCount > currentBestMatchCount) + { + currentBestMatchCount = attributeMatchCount; + bestMatchingConfigPage = helpConfigPage; + } + } + return bestMatchingConfigPage == null ? GenerateDefaultUrl(requestedHelpPage) : GenerateConfiguredUrl(bestMatchingConfigPage); + } + + public string GenerateConfiguredUrl(HelpConfigPage helpConfigPage) + { + return String.Format(helpConfigPage.HelpUrl, + helpConfigPage.Application, + helpConfigPage.ApplicationUrl, + helpConfigPage.Language, + helpConfigPage.UserType).ToLower(); + } + + public string GenerateDefaultUrl(HelpPage helpPage) + { + return string.Format(DefaultURL, + helpPage.Application, + helpPage.ApplicationUrl); + } + + private string GetXmlAttributeAsString(XmlAttribute attribute) { + + if (attribute == null) return ""; + + return attribute.Value.Trim(); + + } + } + + public class HelpPage + { + public string Application { get; set; } + public string ApplicationUrl { get; set; } + public string Language { get; set; } + public string UserType { get; set; } + } + + public class HelpConfigPage : HelpPage + { + public string HelpUrl { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx deleted file mode 100644 index 7aa26dda00..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page language="c#" Codebehind="cacheBrowser.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.cacheBrowser" trace="true" %> - - - - cacheBrowser - - - - - - -
- -
- - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx.cs index a497af4325..8941939aa3 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx.cs @@ -1,39 +1,42 @@ -using System.Collections; +using System.Collections; using umbraco.BasePages; namespace umbraco.cms.presentation { - /// - /// Summary description for cacheBrowser. - /// + /// + /// Summary description for cacheBrowser. + /// public partial class cacheBrowser : UmbracoEnsuredPage - { - public cacheBrowser() - { + { + public cacheBrowser() + { CurrentApp = BusinessLogic.DefaultApps.developer.ToString(); - } - protected void Page_Load(object sender, System.EventArgs e) - { - // Cache removal checks - if (Request.QueryString["clearByType"] != null) - cms.businesslogic.cache.Cache.ClearCacheObjectTypes(Request.QueryString["clearByType"]); - else if (Request.QueryString["clearByKey"] != null) - cms.businesslogic.cache.Cache.ClearCacheItem(Request.QueryString["clearByKey"]); + } + protected void Page_Load(object sender, System.EventArgs e) + { + // Cache removal checks + if (Request.QueryString["clearByType"] != null) + cms.businesslogic.cache.Cache.ClearCacheObjectTypes(Request.QueryString["clearByType"]); + else if (Request.QueryString["clearByKey"] != null) + cms.businesslogic.cache.Cache.ClearCacheItem(Request.QueryString["clearByKey"]); - // Put user code to initialize the page here - Hashtable ht = cms.businesslogic.cache.Cache.ReturnCacheItemsOrdred(); - foreach(string key in ht.Keys) - { - Response.Write("" + key + ": " + ((ArrayList) ht[key]).Count.ToString() + " (Delete)
"); - if (Request.QueryString["key"] == key) - for (int i=0; i<((ArrayList) ht[key]).Count;i++) - Response.Write(" - " + ((ArrayList) ht[key])[i] + " (Delete)
"); - } - } - protected void Button1_Click(object sender, System.EventArgs e) - { - cms.businesslogic.cache.Cache.ClearAllCache(); - } - } + // Put user code to initialize the page here + Hashtable ht = cms.businesslogic.cache.Cache.ReturnCacheItemsOrdred(); + foreach (string key in ht.Keys) + { + Response.Write("" + key + ": " + ((ArrayList)ht[key]).Count.ToString() + " (Delete)
"); + if (Request.QueryString["key"] == key) + for (int i = 0; i < ((ArrayList)ht[key]).Count; i++) + Response.Write(" - " + ((ArrayList)ht[key])[i] + " (Delete)
"); + } + } + protected void Button1_Click(object sender, System.EventArgs e) + { + cms.businesslogic.cache.Cache.ClearAllCache(); + } + + protected System.Web.UI.HtmlControls.HtmlForm Form1; + protected System.Web.UI.WebControls.Button Button1; + } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx.designer.cs deleted file mode 100644 index 8e7e47979d..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/cacheBrowser.aspx.designer.cs +++ /dev/null @@ -1,17 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation { - - public partial class cacheBrowser { - protected System.Web.UI.HtmlControls.HtmlForm Form1; - protected System.Web.UI.WebControls.Button Button1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx deleted file mode 100644 index 28f22eeb16..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="canvas.aspx.cs" Inherits="umbraco.presentation.LiveEditingEnabler" %> - - - - - - Untitled Page - - -
-
- -
-
- - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx.cs index 44d5441efe..67639923ef 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using umbraco.BasePages; using umbraco.businesslogic.Exceptions; @@ -8,7 +8,7 @@ namespace umbraco.presentation { protected void Page_Load(object sender, EventArgs e) { - if ((UmbracoSettings.EnableCanvasEditing || !String.IsNullOrEmpty(UmbracoContext.Current.Request["umbSkinning"]) ) && base.getUser() != null) + if ((UmbracoSettings.EnableCanvasEditing || !String.IsNullOrEmpty(UmbracoContext.Current.Request["umbSkinning"])) && base.getUser() != null) { UmbracoContext.Current.LiveEditingContext.Enabled = true; @@ -29,5 +29,14 @@ namespace umbraco.presentation throw new Exception("User not logged in"); } } + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx.designer.cs deleted file mode 100644 index f64e241692..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/canvas.aspx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation { - - - public partial class LiveEditingEnabler { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx deleted file mode 100644 index 8bcc0cacb9..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx +++ /dev/null @@ -1,38 +0,0 @@ -<%@ Page Language="c#" MasterPageFile="masterpages/umbracoDialog.Master" Codebehind="create.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.Create" %> - -<%@ Register Namespace="umbraco" TagPrefix="umb" Assembly="umbraco" %> - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.cs index 802b955839..664cceae90 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.ComponentModel; using System.Data; @@ -55,24 +55,13 @@ namespace umbraco.cms.presentation } } - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. + /// UI control. /// - private void InitializeComponent() - { - - } - #endregion + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder UI; } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.designer.cs deleted file mode 100644 index a3d4616bfd..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create.aspx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation { - - - public partial class Create { - - /// - /// UI control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder UI; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx deleted file mode 100644 index 91a4de4c0d..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx +++ /dev/null @@ -1,11 +0,0 @@ -<%@ Page language="c#" MasterPageFile="masterpages/umbracoPage.Master" Title="dashboard" Codebehind="dashboard.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.dashboard" trace="false" validateRequest="false"%> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - -
- -
-
- -
\ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx.cs index 6bff08325f..d010c33be4 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.ComponentModel; using System.Data; @@ -43,13 +43,9 @@ namespace umbraco.cms.presentation return placeHolder; } - #region Web Form Designer generated code override protected void OnInit(EventArgs e) { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); + base.OnInit(e); // Load dashboard content if (helper.Request("app") != "") @@ -330,13 +326,31 @@ namespace umbraco.cms.presentation } /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. + /// Panel2 control. /// - private void InitializeComponent() - { + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.UmbracoPanel Panel2; + + /// + /// dashBoardContent control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder dashBoardContent; + + /// + /// dashboardTabs control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.TabView dashboardTabs; - } - #endregion } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx.designer.cs deleted file mode 100644 index 3223fc26b8..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx.designer.cs +++ /dev/null @@ -1,43 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation { - - - public partial class dashboard { - - /// - /// Panel2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoPanel Panel2; - - /// - /// dashBoardContent control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder dashBoardContent; - - /// - /// dashboardTabs control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.TabView dashboardTabs; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx deleted file mode 100644 index 8c7ec1317f..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx +++ /dev/null @@ -1,62 +0,0 @@ -<%@ Page Title="Edit content" Language="c#" MasterPageFile="masterpages/umbracoPage.Master" - CodeBehind="editContent.aspx.cs" ValidateRequest="false" AutoEventWireup="True" - Inherits="umbraco.cms.presentation.editContent" Trace="false" %> - -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> - - - - - - - - - - - -
- - -
- - - -
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs index d6ef34ee67..c2b8fe2260 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Web.UI; using System.Web.UI.WebControls; using Umbraco.Core; @@ -80,7 +80,7 @@ namespace umbraco.cms.presentation // Check to see if the user has send to publish permissions if (!base.getUser().GetPermissions(_document.Path).Contains(ActionToPublish.Instance.Letter.ToString())) { - //If no send to publish permission then revert to NoPublish mode + //If no send to publish permission then revert to NoPublish mode _canPublish = controls.ContentControl.publishModes.NoPublish; } else @@ -335,7 +335,7 @@ namespace umbraco.cms.presentation if (previouslyPublished == false) { - var descendants = ((ContentService) ApplicationContext.Current.Services.ContentService) + var descendants = ((ContentService)ApplicationContext.Current.Services.ContentService) .GetPublishedDescendants(_document.Content).ToList(); if (descendants.Any()) @@ -356,7 +356,7 @@ namespace umbraco.cms.presentation else { ClientTools.ShowSpeechBubble(speechBubbleIcon.warning, ui.Text("publish"), ui.Text("speechBubbles", "editContentPublishedFailedByParent")); - + } } } @@ -477,20 +477,20 @@ namespace umbraco.cms.presentation // Find the first splitter in the Menu - Should be the rte toolbar's splitter var startIndex = menu.FindSplitter(1); - + if (startIndex == -1) { // No Splitter found - rte toolbar isn't loaded - menu.InsertSplitter(); + menu.InsertSplitter(); menuItem = menu.NewIcon(); - } + } else { // Rte toolbar is loaded, inject after it's Splitter menuItem = menu.NewIcon(startIndex + 1); menu.InsertSplitter(startIndex + 2); } - + menuItem.ImageURL = SystemDirectories.Umbraco + "/images/editor/vis.gif"; // Fix for U4-682, if there's no template, disable the preview button if (_document.Template != -1) @@ -505,9 +505,63 @@ namespace umbraco.cms.presentation showPageDisabledText = ui.GetText("buttons", "showPageDisabled", null, "en"); ; menuItem.AltText = showPageDisabledText; - ((Image) menuItem).Attributes.Add("style", "opacity: 0.5"); + ((Image)menuItem).Attributes.Add("style", "opacity: 0.5"); } } + /// + /// JsInclude1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; + + /// + /// JsInclude2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude2; + + /// + /// JsInclude3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; + + /// + /// plc control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder plc; + + /// + /// doSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlInputHidden doSave; + + /// + /// doPublish control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlInputHidden doPublish; + } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.designer.cs deleted file mode 100644 index cfb5246ba7..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.designer.cs +++ /dev/null @@ -1,69 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation { - - - public partial class editContent { - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// JsInclude2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude2; - - /// - /// JsInclude3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; - - /// - /// plc control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder plc; - - /// - /// doSave control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlInputHidden doSave; - - /// - /// doPublish control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlInputHidden doPublish; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx deleted file mode 100644 index 50368f0cd7..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx +++ /dev/null @@ -1,28 +0,0 @@ -<%@ Page Language="c#" CodeBehind="editMedia.aspx.cs" ValidateRequest="false" MasterPageFile="masterpages/umbracoPage.Master" - AutoEventWireup="True" Inherits="umbraco.cms.presentation.editMedia" %> - - - - - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx.cs index aadd17841b..6092df5688 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Web.UI; using System.Web.UI.WebControls; using System.Xml; @@ -11,33 +11,29 @@ using umbraco.cms.businesslogic.property; namespace umbraco.cms.presentation { - /// - /// Summary description for editMedia. - /// - public partial class editMedia : BasePages.UmbracoEnsuredPage - { + /// + /// Summary description for editMedia. + /// + public partial class editMedia : BasePages.UmbracoEnsuredPage + { private uicontrols.Pane mediaPropertiesPane = new uicontrols.Pane(); private LiteralControl updateDateLiteral = new LiteralControl(); private LiteralControl mediaFileLinksLiteral = new LiteralControl(); - public editMedia() - { - CurrentApp = BusinessLogic.DefaultApps.media.ToString(); - } + public editMedia() + { + CurrentApp = BusinessLogic.DefaultApps.media.ToString(); + } - protected uicontrols.TabView TabView1; - protected System.Web.UI.WebControls.TextBox documentName; - private cms.businesslogic.media.Media _media; - controls.ContentControl tmp; + protected uicontrols.TabView TabView1; + protected System.Web.UI.WebControls.TextBox documentName; + private cms.businesslogic.media.Media _media; + controls.ContentControl tmp; - //protected System.Web.UI.WebControls.Literal SyncPath; + //protected System.Web.UI.WebControls.Literal SyncPath; override protected void OnInit(EventArgs e) { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); base.OnInit(e); _media = new cms.businesslogic.media.Media(int.Parse(Request.QueryString["id"])); @@ -66,33 +62,24 @@ namespace umbraco.cms.presentation mediaPropertiesPane.addProperty(ui.Text("content", "mediaLinks"), this.mediaFileLinksLiteral); // add the property pane to the page rendering - tmp.tpProp.Controls.AddAt(1, mediaPropertiesPane); + tmp.tpProp.Controls.AddAt(1, mediaPropertiesPane); } - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() + protected void Page_Load(object sender, System.EventArgs e) { - + //if (!IsPostBack) + //{ + // SyncPath.Text = _media.Path; + // newName.Text = _media.Text.Replace("'", "\\'"); + //} + if (!IsPostBack) + { + ClientTools.SyncTree(_media.Path, false); + } } - protected void Page_Load(object sender, System.EventArgs e) - { - //if (!IsPostBack) - //{ - // SyncPath.Text = _media.Path; - // newName.Text = _media.Text.Replace("'", "\\'"); - //} - if (!IsPostBack) - { - ClientTools.SyncTree(_media.Path, false); - } - } - - protected void Save(object sender, System.EventArgs e) - { + protected void Save(object sender, System.EventArgs e) + { // error handling test if (!Page.IsValid) { @@ -126,9 +113,9 @@ namespace umbraco.cms.presentation this.updateDateLiteral.Text = _media.VersionDate.ToShortDateString() + " " + _media.VersionDate.ToShortTimeString(); this.UpdateMediaFileLinksLiteral(); - _media.XmlGenerate(new XmlDocument()); - ClientTools.SyncTree(_media.Path, true); - } + _media.XmlGenerate(new XmlDocument()); + ClientTools.SyncTree(_media.Path, true); + } private void UpdateMediaFileLinksLiteral() @@ -155,7 +142,7 @@ namespace umbraco.cms.presentation { this.mediaFileLinksLiteral.Text += string.Format("{0} {1}", property.PropertyType.Name, property.Value); } - + this.mediaFileLinksLiteral.Text += ""; } } @@ -165,5 +152,32 @@ namespace umbraco.cms.presentation //have deleted it. } } - } + + /// + /// plc control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder plc; + + /// + /// doSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlInputHidden doSave; + + /// + /// doPublish control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlInputHidden doPublish; + } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx.designer.cs deleted file mode 100644 index b464383605..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/editMedia.aspx.designer.cs +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation { - - - public partial class editMedia { - - /// - /// plc control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder plc; - - /// - /// doSave control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlInputHidden doSave; - - /// - /// doPublish control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlInputHidden doPublish; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx deleted file mode 100644 index 915838ca53..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="endPreview.aspx.cs" Inherits="umbraco.presentation.endPreview" %> - - - - - - - - -
-
- Redirecting... -
-
- - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx.cs index 56dcf2b85b..526e6613c5 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx.cs @@ -11,8 +11,17 @@ namespace umbraco.presentation { protected void Page_Load(object sender, EventArgs e) { - preview.PreviewContent.ClearPreviewCookie(); + preview.PreviewContent.ClearPreviewCookie(); Response.Redirect(helper.Request("redir"), true); } + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx.designer.cs deleted file mode 100644 index f64ad1637f..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/endPreview.aspx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation { - - - public partial class endPreview { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx deleted file mode 100644 index 819f906d42..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx +++ /dev/null @@ -1,12 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="helpRedirect.aspx.cs" Inherits="umbraco.presentation.umbraco.helpRedirect" %> - - - - - - - - - Redirecting to help ... - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.cs index 2bd8d675ca..b09ef1565f 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.cs @@ -1,107 +1,12 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; -using System.Xml; namespace umbraco.presentation.umbraco { - public class Help - { - public string DefaultURL { get; set; } - public List HelpConfigPages { get; set; } - public Help(XmlNode helpConfigNode) - { - DefaultURL = GetXmlAttributeAsString(helpConfigNode.Attributes["defaultUrl"]); - - HelpConfigPages = new List(); - - foreach (XmlNode linkNode in helpConfigNode.SelectNodes("link")) - { - - HelpConfigPages.Add(new HelpConfigPage - { - Application = GetXmlAttributeAsString(linkNode.Attributes["application"]), - ApplicationUrl = GetXmlAttributeAsString(linkNode.Attributes["applicationUrl"]), - Language = GetXmlAttributeAsString(linkNode.Attributes["language"]), - UserType = GetXmlAttributeAsString(linkNode.Attributes["userType"]), - HelpUrl = GetXmlAttributeAsString(linkNode.Attributes["helpUrl"]) - }); - } - } - - public string ResolveHelpUrl(HelpPage requestedHelpPage) - { - HelpConfigPage bestMatchingConfigPage = null; - - int currentBestMatchCount = 0; - - foreach (HelpConfigPage helpConfigPage in HelpConfigPages) - { - int attributeMatchCount = 0; - - if ((helpConfigPage.Application != "" && String.Compare(helpConfigPage.Application, requestedHelpPage.Application, true) != 0) || - (helpConfigPage.ApplicationUrl != "" && String.Compare(helpConfigPage.ApplicationUrl, requestedHelpPage.ApplicationUrl, true) != 0) || - (helpConfigPage.Language != "" && String.Compare(helpConfigPage.Language, requestedHelpPage.Language, true) != 0) || - (helpConfigPage.UserType != "" && String.Compare(helpConfigPage.UserType, requestedHelpPage.UserType, true) != 0)) - { - continue; - } - - if (String.Compare(helpConfigPage.Application, requestedHelpPage.Application, true) == 0) attributeMatchCount++; - if (String.Compare(helpConfigPage.ApplicationUrl, requestedHelpPage.ApplicationUrl, true) == 0) attributeMatchCount++; - if (String.Compare(helpConfigPage.Language, requestedHelpPage.Language, true) == 0) attributeMatchCount++; - if (String.Compare(helpConfigPage.UserType, requestedHelpPage.UserType, true) == 0) attributeMatchCount++; - - if (attributeMatchCount > currentBestMatchCount) - { - currentBestMatchCount = attributeMatchCount; - bestMatchingConfigPage = helpConfigPage; - } - } - return bestMatchingConfigPage == null ? GenerateDefaultUrl(requestedHelpPage) : GenerateConfiguredUrl(bestMatchingConfigPage); - } - - public string GenerateConfiguredUrl(HelpConfigPage helpConfigPage) - { - return String.Format(helpConfigPage.HelpUrl, - helpConfigPage.Application, - helpConfigPage.ApplicationUrl, - helpConfigPage.Language, - helpConfigPage.UserType).ToLower(); - } - - public string GenerateDefaultUrl(HelpPage helpPage) - { - return string.Format(DefaultURL, - helpPage.Application, - helpPage.ApplicationUrl); - } - - private string GetXmlAttributeAsString(XmlAttribute attribute) { - - if (attribute == null) return ""; - - return attribute.Value.Trim(); - - } - } - - public class HelpPage - { - public string Application { get; set; } - public string ApplicationUrl { get; set; } - public string Language { get; set; } - public string UserType { get; set; } - } - - public class HelpConfigPage : HelpPage - { - public string HelpUrl { get; set; } - } public partial class helpRedirect : System.Web.UI.Page { @@ -109,11 +14,12 @@ namespace umbraco.presentation.umbraco { Help help = new Help(UmbracoSettings.HelpPages); - HelpPage requestedHelpPage = new HelpPage { - Application = Request.QueryString["Application"], - ApplicationUrl = Request.QueryString["ApplicationUrl"], - Language = Request.QueryString["Language"], - UserType = Request.QueryString["UserType"] + HelpPage requestedHelpPage = new HelpPage + { + Application = Request.QueryString["Application"], + ApplicationUrl = Request.QueryString["ApplicationUrl"], + Language = Request.QueryString["Language"], + UserType = Request.QueryString["UserType"] }; Response.Redirect(help.ResolveHelpUrl(requestedHelpPage)); diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.designer.cs deleted file mode 100644 index af35c1fcc1..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/helpRedirect.aspx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation.umbraco { - - - public partial class helpRedirect { - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/js/UmbracoCasingRules.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/js/UmbracoCasingRules.aspx.cs index 9b6f4a23d4..e2b556ff7a 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/js/UmbracoCasingRules.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/js/UmbracoCasingRules.aspx.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using Umbraco.Core; using umbraco.cms.helpers; namespace umbraco.presentation.js @@ -17,7 +18,7 @@ namespace umbraco.presentation.js var UMBRACO_FORCE_SAFE_ALIAS = {0}; var UMBRACO_FORCE_SAFE_ALIAS_VALIDCHARS = '{1}'; var UMBRACO_FORCE_SAFE_ALIAS_INVALID_FIRST_CHARS = '{2}'; -", UmbracoSettings.ForceSafeAliases.ToString().ToLower(), Casing.VALID_ALIAS_CHARACTERS, Casing.INVALID_FIRST_CHARACTERS)); +", UmbracoSettings.ForceSafeAliases.ToString().ToLower(), StringExtensions.UmbracoValidAliasCharacters, StringExtensions.UmbracoInvalidFirstCharacters)); } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx deleted file mode 100644 index 4d7aa7a7d1..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx +++ /dev/null @@ -1,127 +0,0 @@ -<%@ Page Language="c#" CodeBehind="login.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.login" %> - -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register Namespace="umbraco" TagPrefix="umb" Assembly="umbraco" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> - - - - Login - Umbraco - <%=Request.Url.Host.ToLower().Replace("www.", "") %> - - - - - - - - -
- -
-

- -

- - - - - - - - - - - - - - - - - - -
- - - -
-
- - - -
-
- -
-
-
- - - - - - - - - - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs index 7d9ceb4d1a..d4e5a1531a 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.ComponentModel; using System.Data; @@ -60,25 +60,7 @@ namespace umbraco.cms.presentation if (BottomText.Text.Contains("

")) BottomText.Text = BottomText.Text.Substring(29).Replace("
", "").Replace("

", ""); } - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - - } - #endregion protected void Button1_Click(object sender, System.EventArgs e) { @@ -189,5 +171,158 @@ namespace umbraco.cms.presentation u.addApplication("content"); } } + + /// + /// ClientLoader control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; + + /// + /// CssInclude1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.CssInclude CssInclude1; + + /// + /// JsInclude1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; + + /// + /// JsInclude3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; + + /// + /// JsInclude2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::ClientDependency.Core.Controls.JsInclude JsInclude2; + + /// + /// Form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm Form1; + + /// + /// Panel1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.UmbracoPanel Panel1; + + /// + /// TopText control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal TopText; + + /// + /// username control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label username; + + /// + /// lname control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox lname; + + /// + /// password control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label password; + + /// + /// passw control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox passw; + + /// + /// Button1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button Button1; + + /// + /// BottomText control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal BottomText; + + /// + /// hf_height control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hf_height; + + /// + /// hf_width control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hf_width; + + /// + /// loginError control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder loginError; } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.designer.cs deleted file mode 100644 index 33cc6357dd..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.designer.cs +++ /dev/null @@ -1,168 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation { - - - public partial class login { - - /// - /// ClientLoader control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader; - - /// - /// CssInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.CssInclude CssInclude1; - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// JsInclude3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; - - /// - /// JsInclude2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude2; - - /// - /// Form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm Form1; - - /// - /// Panel1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoPanel Panel1; - - /// - /// TopText control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal TopText; - - /// - /// username control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label username; - - /// - /// lname control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox lname; - - /// - /// password control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label password; - - /// - /// passw control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox passw; - - /// - /// Button1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button Button1; - - /// - /// BottomText control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal BottomText; - - /// - /// hf_height control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.HiddenField hf_height; - - /// - /// hf_width control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.HiddenField hf_width; - - /// - /// loginError control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder loginError; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx deleted file mode 100644 index 7828fb3d8e..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx +++ /dev/null @@ -1,21 +0,0 @@ -<%@ Page language="c#" Codebehind="logout.aspx.cs" AutoEventWireup="True" Inherits="umbraco.logout" %> - - - - - logout - - - - - - - -
- -
- - - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx.cs index f289602901..15f8be030f 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.ComponentModel; using System.Data; @@ -11,35 +11,18 @@ using System.Web.UI.HtmlControls; namespace umbraco { - /// - /// Summary description for logout. - /// - public partial class logout : BasePages.BasePage - { - protected void Page_Load(object sender, System.EventArgs e) - { - // Put user code to initialize the page here - if (umbracoUserContextID != "") - base.ClearLogin(); - } + /// + /// Summary description for logout. + /// + public partial class logout : BasePages.BasePage + { + protected void Page_Load(object sender, System.EventArgs e) + { + // Put user code to initialize the page here + if (umbracoUserContextID != "") + base.ClearLogin(); + } - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - } - #endregion - } + protected System.Web.UI.HtmlControls.HtmlForm Form1; + } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx.designer.cs deleted file mode 100644 index e418f5be3e..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx.designer.cs +++ /dev/null @@ -1,16 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco { - - public partial class logout { - protected System.Web.UI.HtmlControls.HtmlForm Form1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx deleted file mode 100644 index 4cf1d2af1c..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx +++ /dev/null @@ -1,12 +0,0 @@ -<%@ Page language="c#" Codebehind="macroResultWrapper.aspx.cs" ValidateRequest="false" AutoEventWireup="True" Inherits="umbraco.presentation.macroResultWrapper" %> - - - - macroResultWrapper - - -
- -
- - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx.cs index 4c9d13fb3b..50f9d852bc 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.ComponentModel; using System.Data; @@ -13,58 +13,57 @@ using System.Web.UI.HtmlControls; namespace umbraco.presentation { - /// - /// Summary description for macroResultWrapper. - /// - public partial class macroResultWrapper : BasePages.UmbracoEnsuredPage - { - - protected void Page_Load(object sender, System.EventArgs e) - { + /// + /// Summary description for macroResultWrapper. + /// + public partial class macroResultWrapper : BasePages.UmbracoEnsuredPage + { - int macroID = cms.businesslogic.macro.Macro.GetByAlias(helper.Request("umb_macroAlias")).Id; - int pageID = int.Parse(helper.Request("umbPageId")); - Guid pageVersion = new Guid(helper.Request("umbVersionId")); + protected void Page_Load(object sender, System.EventArgs e) + { - System.Web.HttpContext.Current.Items["macrosAdded"] = 0; - System.Web.HttpContext.Current.Items["pageID"] = pageID.ToString(); - - // Collect attributes - Hashtable attributes = new Hashtable(); - foreach(string key in Request.QueryString.AllKeys) - { - if (key.IndexOf("umb_") > -1) - { - attributes.Add(key.Substring(4, key.Length-4), Request.QueryString[key]); - } - } + int macroID = cms.businesslogic.macro.Macro.GetByAlias(helper.Request("umb_macroAlias")).Id; + int pageID = int.Parse(helper.Request("umbPageId")); + Guid pageVersion = new Guid(helper.Request("umbVersionId")); + + System.Web.HttpContext.Current.Items["macrosAdded"] = 0; + System.Web.HttpContext.Current.Items["pageID"] = pageID.ToString(); + + // Collect attributes + Hashtable attributes = new Hashtable(); + foreach (string key in Request.QueryString.AllKeys) + { + if (key.IndexOf("umb_") > -1) + { + attributes.Add(key.Substring(4, key.Length - 4), Request.QueryString[key]); + } + } - page p = new page(pageID, pageVersion); - macro m = macro.GetMacro(macroID); - - Control c = m.renderMacro(attributes, p.Elements, p.PageID); - PlaceHolder1.Controls.Add(c); - } + page p = new page(pageID, pageVersion); + macro m = macro.GetMacro(macroID); - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { + Control c = m.renderMacro(attributes, p.Elements, p.PageID); + PlaceHolder1.Controls.Add(c); + } - } - #endregion - } + + /// + /// Form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm Form1; + + /// + /// PlaceHolder1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolder1; + } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx.designer.cs deleted file mode 100644 index 3fec9ff1b0..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/macroResultWrapper.aspx.designer.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3074 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.presentation { - - - public partial class macroResultWrapper { - - /// - /// Form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm Form1; - - /// - /// PlaceHolder1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolder1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx deleted file mode 100644 index ed413dfd66..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx +++ /dev/null @@ -1,18 +0,0 @@ -<%@ Page language="c#" Codebehind="publishStatus.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.publishStatus" %> -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - publishStatus - - - - - - -
- -
- - diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx.cs index 9fc6ae4180..e2922829f3 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.ComponentModel; using System.Data; @@ -11,47 +11,67 @@ using System.Web.UI.HtmlControls; namespace umbraco.cms.presentation { - /// - /// Summary description for publishStatus. - /// - public partial class publishStatus : BasePages.UmbracoEnsuredPage - { - public publishStatus() - { + /// + /// Summary description for publishStatus. + /// + [Obsolete("This class is no longer used and will be removed from the codebase in future versions")] + public partial class publishStatus : BasePages.UmbracoEnsuredPage + { + public publishStatus() + { CurrentApp = BusinessLogic.DefaultApps.content.ToString(); - } - - protected void Page_Load(object sender, System.EventArgs e) - { - // Put user code to initialize the page here - int totalNodes = cms.businesslogic.CMSNode.CountByObjectType(cms.businesslogic.web.Document._objectType); - if (library.IsPublishing) - { - Panel1.Controls.Add(new LiteralControl("Der er nu publiseret " + library.NodesPublished.ToString() + " ud af " + totalNodes.ToString() + " noder...")); - base.RefreshPage(2); - } else - Panel1.Controls.Add(new LiteralControl("Færdig. Der er ialt publiseret " + library.NodesPublished.ToString() + " noder og det tog " + ((long) ((System.DateTime.Now.Ticks - library.PublishStart.Ticks) / 10000000)).ToString() + " sekunder...")); - } + } - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { + protected void Page_Load(object sender, System.EventArgs e) + { + // Put user code to initialize the page here + int totalNodes = cms.businesslogic.CMSNode.CountByObjectType(cms.businesslogic.web.Document._objectType); + if (library.IsPublishing) + { + Panel1.Controls.Add(new LiteralControl("Der er nu publiseret " + library.NodesPublished.ToString() + " ud af " + totalNodes.ToString() + " noder...")); + base.RefreshPage(2); + } + else + Panel1.Controls.Add(new LiteralControl("Færdig. Der er ialt publiseret " + library.NodesPublished.ToString() + " noder og det tog " + ((long)((System.DateTime.Now.Ticks - library.PublishStart.Ticks) / 10000000)).ToString() + " sekunder...")); + } - } - #endregion - } + #region Web Form Designer generated code + override protected void OnInit(EventArgs e) + { + // + // CODEGEN: This call is required by the ASP.NET Web Form Designer. + // + InitializeComponent(); + base.OnInit(e); + } + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + + } + #endregion + + /// + /// Form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm Form1; + + /// + /// Panel1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.UmbracoPanel Panel1; + } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx.designer.cs deleted file mode 100644 index 42c45775a4..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/publishStatus.aspx.designer.cs +++ /dev/null @@ -1,40 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.312 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation { - - - /// - /// publishStatus class. - /// - /// - /// Auto-generated class. - /// - public partial class publishStatus { - - /// - /// Form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm Form1; - - /// - /// Panel1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoPanel Panel1; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx deleted file mode 100644 index 3434b1eda5..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx +++ /dev/null @@ -1 +0,0 @@ -<%@ Page language="c#" Codebehind="tree.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.tree" trace="false" ContentType="text/xml" ResponseEncoding="UTF-8" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx.cs index e09e070590..9a620dbba6 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.ComponentModel; using System.Data; @@ -19,18 +19,18 @@ using umbraco.BusinessLogic; using System.Collections.Generic; -namespace umbraco.cms.presentation +namespace umbraco.cms.presentation { /// /// This still outputs the xml format of the tree in case developers are using it. /// - [Obsolete("this is no longer used for the client side tree")] + [Obsolete("this is no longer used for the client side tree")] public partial class tree : umbraco.BasePages.UmbracoEnsuredPage { private XmlTree m_xTree = new XmlTree(); - TreeRequestParams m_treeParams = TreeRequestParams.FromQueryStrings(); + TreeRequestParams m_treeParams = TreeRequestParams.FromQueryStrings(); /// /// This checks to see which request parameters have been set for the Tree xml service @@ -43,13 +43,13 @@ namespace umbraco.cms.presentation protected void Page_Load(object sender, System.EventArgs e) { - if (string.IsNullOrEmpty(m_treeParams.TreeType)) - if (!string.IsNullOrEmpty(m_treeParams.Application)) - LoadAppTrees(m_treeParams.Application); + if (string.IsNullOrEmpty(m_treeParams.TreeType)) + if (!string.IsNullOrEmpty(m_treeParams.Application)) + LoadAppTrees(m_treeParams.Application); else LoadNullTree(); else - LoadTree(m_treeParams.TreeType); + LoadTree(m_treeParams.TreeType); Response.Write(m_xTree.ToString(SerializedTreeType.XmlTree)); } @@ -67,7 +67,7 @@ namespace umbraco.cms.presentation foreach (TreeDefinition treeDef in treeDefs) { BaseTree bTree = treeDef.CreateInstance(); - bTree.SetTreeParameters(m_treeParams); + bTree.SetTreeParameters(m_treeParams); m_xTree.Add(bTree.RootNode); } } @@ -81,15 +81,15 @@ namespace umbraco.cms.presentation { TreeDefinition treeDef = TreeDefinitionCollection.Instance.FindTree(treeAlias); - + if (treeDef != null) { BaseTree bTree = treeDef.CreateInstance(); - bTree.SetTreeParameters(m_treeParams); + bTree.SetTreeParameters(m_treeParams); bTree.Render(ref m_xTree); } else - LoadNullTree(); + LoadNullTree(); } /// @@ -97,8 +97,8 @@ namespace umbraco.cms.presentation /// private void LoadNullTree() { - BaseTree nullTree = new NullTree(m_treeParams.Application); - nullTree.SetTreeParameters(m_treeParams); + BaseTree nullTree = new NullTree(m_treeParams.Application); + nullTree.SetTreeParameters(m_treeParams); nullTree.Render(ref m_xTree); } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx.designer.cs deleted file mode 100644 index 7a007faa5f..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/tree.aspx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace umbraco.cms.presentation { - - public partial class tree { - } -} diff --git a/src/umbraco.cms/helpers/Casing.cs b/src/umbraco.cms/helpers/Casing.cs index 4b25deb96e..c16fbaadb9 100644 --- a/src/umbraco.cms/helpers/Casing.cs +++ b/src/umbraco.cms/helpers/Casing.cs @@ -10,7 +10,10 @@ namespace umbraco.cms.helpers public class Casing { + [Obsolete("Use Umbraco.Core.StringExtensions.UmbracoValidAliasCharacters instead")] public const string VALID_ALIAS_CHARACTERS = "_-abcdefghijklmnopqrstuvwxyz1234567890"; + + [Obsolete("Use Umbraco.Core.StringExtensions.UmbracoInvalidFirstCharacters instead")] public const string INVALID_FIRST_CHARACTERS = "01234567890"; /// @@ -20,6 +23,7 @@ namespace umbraco.cms.helpers /// /// The alias. /// An alias guaranteed not to contain illegal characters + [Obsolete("Use Umbraco.Core.StringExtensions.ToSafeAlias instead")] public static string SafeAlias(string alias) { StringBuilder safeString = new StringBuilder(); @@ -51,6 +55,7 @@ namespace umbraco.cms.helpers return safeString.ToString(); } + [Obsolete("Use Umbraco.Core.StringExtensions.ToSafeAliasWithForcingCheck instead")] public static string SafeAliasWithForcingCheck(string alias) { if (UmbracoSettings.ForceSafeAliases) @@ -63,6 +68,8 @@ namespace umbraco.cms.helpers } } + //NOTE: Not sure what this actually does but is used a few places, need to figure it out and then move to StringExtensions and obsolete. + public static string SpaceCamelCasing(string text) { string s = text;