From 38c6a21896ad6f7a47cfd4f20dcda1643db49aa0 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Wed, 8 May 2013 17:33:48 -1000 Subject: [PATCH] Patching from 6.1 --- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 7 + .../property/EditStyleSheetProperty.aspx | 28 +-- .../property/EditStyleSheetProperty.aspx.cs | 11 + .../EditStyleSheetProperty.aspx.designer.cs | 15 ++ src/Umbraco.Web/Umbraco.Web.csproj | 15 +- .../stylesheet/editstylesheet.aspx.cs | 10 +- .../property/EditStyleSheetProperty.aspx | 65 ------ .../property/EditStyleSheetProperty.aspx.cs | 214 +++++++++++------- .../EditStyleSheetProperty.aspx.designer.cs | 69 ------ 9 files changed, 192 insertions(+), 242 deletions(-) create mode 100644 src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs create mode 100644 src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.designer.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.designer.cs diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 44f7333b47..ad49af2196 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -376,6 +376,13 @@ editstylesheet.aspx + + EditStyleSheetProperty.aspx + ASPXCodeBehind + + + EditStyleSheetProperty.aspx + EditView.aspx ASPXCodeBehind diff --git a/src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx b/src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx index 708599afb0..c554ab88b9 100644 --- a/src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx +++ b/src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx @@ -1,34 +1,34 @@ <%@ Page Language="c#" MasterPageFile="../../../masterpages/umbracoPage.Master" CodeBehind="EditStyleSheetProperty.aspx.cs" - AutoEventWireup="True" Inherits="umbraco.cms.presentation.settings.stylesheet.EditStyleSheetProperty" + AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Settings.Stylesheet.Property.EditStyleSheetProperty" ValidateRequest="False" %> <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> + - +
- <%=umbraco.ui.Text("name", base.getUser())%>: + <%=umbraco.ui.Text("name", UmbracoUser)%>:
- <%=umbraco.ui.Text("stylesheet", "nameHelp", base.getUser())%> + <%=umbraco.ui.Text("stylesheet", "nameHelp", UmbracoUser)%>
- <%=umbraco.ui.Text("alias", base.getUser())%>: + <%=umbraco.ui.Text("alias", UmbracoUser)%>:
- <%=umbraco.ui.Text("stylesheet", "aliasHelp", base.getUser())%> + <%=umbraco.ui.Text("stylesheet", "aliasHelp", UmbracoUser)%>
- <%=umbraco.ui.Text("styles", base.getUser())%>: + <%=umbraco.ui.Text("styles", UmbracoUser)%>: @@ -38,7 +38,7 @@
- <%=umbraco.ui.Text("preview", base.getUser())%>: + <%=umbraco.ui.Text("preview", UmbracoUser)%>:
@@ -57,9 +57,11 @@
- +
diff --git a/src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs b/src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs new file mode 100644 index 0000000000..e5d366f7dd --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace Umbraco.Web.UI.Umbraco.Settings.Stylesheet.Property +{ + public partial class EditStyleSheetProperty : global::umbraco.cms.presentation.settings.stylesheet.EditStyleSheetProperty + { + } +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.designer.cs b/src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.designer.cs new file mode 100644 index 0000000000..41a9e1e887 --- /dev/null +++ b/src/Umbraco.Web.UI/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.designer.cs @@ -0,0 +1,15 @@ +//------------------------------------------------------------------------------ +// +// 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.Web.UI.Umbraco.Settings.Stylesheet.Property { + + + public partial class EditStyleSheetProperty { + } +} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 3e0507387b..b9c0d4e684 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -417,7 +417,12 @@ ASPXCodeBehind - + + ASPXCodeBehind + + + ASPXCodeBehind + @@ -1515,13 +1520,6 @@ editScript.aspx ASPXCodeBehind - - EditStyleSheetProperty.aspx - ASPXCodeBehind - - - EditStyleSheetProperty.aspx - @@ -2041,7 +2039,6 @@ ASPXCodeBehind - ASPXCodeBehind 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 30c6f9857b..f295782564 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 @@ -23,11 +23,7 @@ namespace umbraco.cms.presentation.settings.stylesheet } protected void Page_Load(object sender, EventArgs e) - { - ClientTools - .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias) - .SyncTree("-1,init," + Request.GetItemAsString("id"), false); - + { var save = Panel1.Menu.NewIcon(); save.ImageURL = SystemDirectories.Umbraco + "/images/editor/save.gif"; @@ -51,6 +47,10 @@ namespace umbraco.cms.presentation.settings.stylesheet { NameTxt.Text = stylesheet.Text; editorSource.Text = stylesheet.Content; + + ClientTools + .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias) + .SyncTree("-1,init," + Request.GetItemAsString("id"), false); } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx deleted file mode 100644 index 708599afb0..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx +++ /dev/null @@ -1,65 +0,0 @@ -<%@ Page Language="c#" MasterPageFile="../../../masterpages/umbracoPage.Master" CodeBehind="EditStyleSheetProperty.aspx.cs" - AutoEventWireup="True" Inherits="umbraco.cms.presentation.settings.stylesheet.EditStyleSheetProperty" - ValidateRequest="False" %> - -<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - - - - - - - - - - - - - - - - - -
- <%=umbraco.ui.Text("name", base.getUser())%>: - -
- <%=umbraco.ui.Text("stylesheet", "nameHelp", base.getUser())%> -
- <%=umbraco.ui.Text("alias", base.getUser())%>: - -
- <%=umbraco.ui.Text("stylesheet", "aliasHelp", base.getUser())%> -
- <%=umbraco.ui.Text("styles", base.getUser())%>: - - -
-
-
- <%=umbraco.ui.Text("preview", base.getUser())%>: - -
-
- a b c d e f g h i j k l m n o p q r s t u v w x t z -
- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
- 1 2 3 4 5 6 7 8 9 0 € £ $ % & (.,;:'\"!?) -
-
- Just keep examining every bid quoted for zinc etchings. -
-
-
-
-
- -
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs index 246bd866cc..e8b463d7d1 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.ComponentModel; using System.Data; @@ -8,98 +8,150 @@ using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; +using Umbraco.Web; using umbraco.cms.presentation.Trees; namespace umbraco.cms.presentation.settings.stylesheet { - /// - /// Summary description for EditStyleSheetProperty. - /// - public partial class EditStyleSheetProperty : BasePages.UmbracoEnsuredPage - { - public EditStyleSheetProperty() - { + /// + /// Summary description for EditStyleSheetProperty. + /// + public partial class EditStyleSheetProperty : BasePages.UmbracoEnsuredPage + { + public EditStyleSheetProperty() + { CurrentApp = BusinessLogic.DefaultApps.settings.ToString(); - - } - private cms.businesslogic.web.StylesheetProperty stylesheetproperty; - private DropDownList ddl = new DropDownList(); - - protected void Page_Load(object sender, System.EventArgs e) - { - stylesheetproperty = new cms.businesslogic.web.StylesheetProperty(int.Parse(Request.QueryString["id"])); - Panel1.Text = ui.Text("stylesheet", "editstylesheetproperty", base.getUser()); + } - if (!IsPostBack) { - stylesheetproperty.RefreshFromFile(); - NameTxt.Text = stylesheetproperty.Text; - Content.Text = stylesheetproperty.value; - AliasTxt.Text = stylesheetproperty.Alias; + private businesslogic.web.StylesheetProperty _stylesheetproperty; + private DropDownList _ddl = new DropDownList(); - ClientTools - .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias) - .SyncTree(helper.Request("id"), false); - } - - ImageButton bt = Panel1.Menu.NewImageButton(); - bt.Click += new System.Web.UI.ImageClickEventHandler(save_click); - bt.ImageUrl = UmbracoPath +"/images/editor/save.gif"; - bt.AlternateText = ui.Text("save"); - bt.ID = "save"; - setupPreView(); - } + protected void Page_Load(object sender, EventArgs e) + { + _stylesheetproperty = new businesslogic.web.StylesheetProperty(int.Parse(Request.QueryString["id"])); + Panel1.Text = ui.Text("stylesheet", "editstylesheetproperty", getUser()); - protected override void OnPreRender(EventArgs e) - { - prStyles.Attributes["style"] = stylesheetproperty.value; - - base.OnPreRender (e); - } + if (IsPostBack == false) + { + _stylesheetproperty.RefreshFromFile(); + NameTxt.Text = _stylesheetproperty.Text; + Content.Text = _stylesheetproperty.value; + AliasTxt.Text = _stylesheetproperty.Alias; - private void setupPreView() - { - prStyles.Attributes["style"] = stylesheetproperty.value; - } + ClientTools + .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias) + .SyncTree(Request.GetItemAsString("id"), false); + } + else + { + //true = force reload from server on post back + ClientTools + .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree().Tree.Alias) + .SyncTree(Request.GetItemAsString("id"), true); + } - private void save_click(object sender, System.Web.UI.ImageClickEventArgs e) - { - stylesheetproperty.value = Content.Text; - stylesheetproperty.Text = NameTxt.Text; - stylesheetproperty.Alias = AliasTxt.Text; + - try - { - stylesheetproperty.StyleSheet().saveCssToFile(); - } - catch {} - ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editStylesheetPropertySaved", base.getUser()), ""); - setupPreView(); + ImageButton bt = Panel1.Menu.NewImageButton(); + bt.Click += SaveClick; + bt.ImageUrl = UmbracoPath + "/images/editor/save.gif"; + bt.AlternateText = ui.Text("save"); + bt.ID = "save"; + SetupPreView(); + } - stylesheetproperty.Save(); - } + protected override void OnPreRender(EventArgs e) + { + prStyles.Attributes["style"] = _stylesheetproperty.value; - #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); - Content.TextMode = TextBoxMode.MultiLine; - Content.Height = 250; - Content.Width = 300; - - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - } - #endregion - } + base.OnPreRender(e); + } + + private void SetupPreView() + { + prStyles.Attributes["style"] = _stylesheetproperty.value; + } + + private void SaveClick(object sender, ImageClickEventArgs e) + { + _stylesheetproperty.value = Content.Text; + _stylesheetproperty.Text = NameTxt.Text; + _stylesheetproperty.Alias = AliasTxt.Text; + + try + { + _stylesheetproperty.StyleSheet().saveCssToFile(); + } + catch { } + ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editStylesheetPropertySaved", getUser()), ""); + SetupPreView(); + + _stylesheetproperty.Save(); + } + + + override protected void OnInit(EventArgs e) + { + base.OnInit(e); + Content.TextMode = TextBoxMode.MultiLine; + Content.Height = 250; + Content.Width = 300; + } + + + /// + /// Panel1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.UmbracoPanel Panel1; + + /// + /// Pane7 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.Pane Pane7; + + /// + /// NameTxt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox NameTxt; + + /// + /// AliasTxt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox AliasTxt; + + /// + /// Content control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox Content; + + /// + /// prStyles control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl prStyles; + } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.designer.cs deleted file mode 100644 index a6681cc651..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.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.settings.stylesheet { - - - public partial class EditStyleSheetProperty { - - /// - /// Panel1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.UmbracoPanel Panel1; - - /// - /// Pane7 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Pane Pane7; - - /// - /// NameTxt control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox NameTxt; - - /// - /// AliasTxt control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox AliasTxt; - - /// - /// Content control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox Content; - - /// - /// prStyles control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl prStyles; - } -}