Patching from 6.1

This commit is contained in:
Shannon Deminick
2013-05-08 17:33:48 -10:00
parent 15bff44ec1
commit 38c6a21896
9 changed files with 192 additions and 242 deletions

View File

@@ -376,6 +376,13 @@
<Compile Include="Umbraco\settings\Stylesheet\editstylesheet.aspx.designer.cs">
<DependentUpon>editstylesheet.aspx</DependentUpon>
</Compile>
<Compile Include="Umbraco\settings\Stylesheet\Property\EditStyleSheetProperty.aspx.cs">
<DependentUpon>EditStyleSheetProperty.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Umbraco\settings\Stylesheet\Property\EditStyleSheetProperty.aspx.designer.cs">
<DependentUpon>EditStyleSheetProperty.aspx</DependentUpon>
</Compile>
<Compile Include="Umbraco\Settings\Views\EditView.aspx.cs">
<DependentUpon>EditView.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@@ -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" %>
<asp:Content ContentPlaceHolderID="body" runat="server">
<cc1:UmbracoPanel ID="Panel1" runat="server" Text="Edit stylesheet property" Width="432px"
Height="176px" hasMenu="true">
<cc1:UmbracoPanel ID="Panel1" runat="server" Text="Edit stylesheet property" Width="432px" Height="176px" hasMenu="true">
<cc1:Pane ID="Pane7" CssClass="pane" runat="server">
<table cellspacing="0" cellpadding="4" border="0">
<tr>
<th width="30%">
<%=umbraco.ui.Text("name", base.getUser())%>:
<%=umbraco.ui.Text("name", UmbracoUser)%>:
</th>
<td class="propertyContent">
<asp:TextBox ID="NameTxt" Width="350px" runat="server" /><br />
<small><%=umbraco.ui.Text("stylesheet", "nameHelp", base.getUser())%></small>
<small><%=umbraco.ui.Text("stylesheet", "nameHelp", UmbracoUser)%></small>
</td>
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("alias", base.getUser())%>:
<%=umbraco.ui.Text("alias", UmbracoUser)%>:
</th>
<td class="propertyContent">
<asp:TextBox ID="AliasTxt" Width="350px" runat="server" /><br />
<small><%=umbraco.ui.Text("stylesheet", "aliasHelp", base.getUser())%></small>
<small><%=umbraco.ui.Text("stylesheet", "aliasHelp", UmbracoUser)%></small>
</td>
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("styles", base.getUser())%>:
<%=umbraco.ui.Text("styles", UmbracoUser)%>:
</th>
<td class="propertyContent">
<asp:TextBox ID="Content" Style="width: 350px" TextMode="MultiLine" runat="server" />
@@ -38,7 +38,7 @@
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("preview", base.getUser())%>:
<%=umbraco.ui.Text("preview", UmbracoUser)%>:
</th>
<td class="propertyContent">
<div id="preview" style="padding: 10px; border: 1px solid #ccc; width: 330px;">
@@ -57,9 +57,11 @@
</table>
</cc1:Pane>
</cc1:UmbracoPanel>
<script type="text/javascript">
jQuery(document).ready(function () {
UmbClientMgr.appActions().bindSaveShortCut();
});
<script type="text/javascript">
jQuery(document).ready(function () {
UmbClientMgr.appActions().bindSaveShortCut();
});
</script>
</asp:Content>

View File

@@ -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
{
}
}

View File

@@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Umbraco.Settings.Stylesheet.Property {
public partial class EditStyleSheetProperty {
}
}

View File

@@ -417,7 +417,12 @@
<Compile Include="umbraco.presentation\umbraco\settings\modals\ShowUmbracoTags.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\settings\stylesheet\editstylesheet.aspx.cs" />
<Compile Include="umbraco.presentation\umbraco\settings\stylesheet\editstylesheet.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\settings\stylesheet\property\EditStyleSheetProperty.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\templateControls\Image.cs" />
<Compile Include="umbraco.presentation\umbraco\uQuery\IGetProperty.cs" />
<Compile Include="umbraco.presentation\XsltExtensionAttribute.cs" />
@@ -1515,13 +1520,6 @@
<DependentUpon>editScript.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\settings\stylesheet\property\EditStyleSheetProperty.aspx.cs">
<DependentUpon>EditStyleSheetProperty.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\settings\stylesheet\property\EditStyleSheetProperty.aspx.designer.cs">
<DependentUpon>EditStyleSheetProperty.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\templateControls\Script.cs" />
<Compile Include="umbraco.presentation\umbraco\Trees\BaseMediaTree.cs" />
<Compile Include="umbraco.presentation\umbraco\Trees\loadDLRScripts.cs" />
@@ -2041,7 +2039,6 @@
<Content Include="umbraco.presentation\umbraco\settings\EditMediaType.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\settings\stylesheet\property\EditStyleSheetProperty.aspx" />
<Content Include="umbraco.presentation\umbraco\test.aspx" />
<Content Include="umbraco.presentation\umbraco\tree.aspx">
<SubType>ASPXCodeBehind</SubType>

View File

@@ -23,11 +23,7 @@ namespace umbraco.cms.presentation.settings.stylesheet
}
protected void Page_Load(object sender, EventArgs e)
{
ClientTools
.SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree<loadStylesheets>().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<loadStylesheets>().Tree.Alias)
.SyncTree("-1,init," + Request.GetItemAsString("id"), false);
}
}

View File

@@ -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" %>
<asp:Content ContentPlaceHolderID="body" runat="server">
<cc1:UmbracoPanel ID="Panel1" runat="server" Text="Edit stylesheet property" Width="432px"
Height="176px" hasMenu="true">
<cc1:Pane ID="Pane7" CssClass="pane" runat="server">
<table cellspacing="0" cellpadding="4" border="0">
<tr>
<th width="30%">
<%=umbraco.ui.Text("name", base.getUser())%>:
</th>
<td class="propertyContent">
<asp:TextBox ID="NameTxt" Width="350px" runat="server" /><br />
<small><%=umbraco.ui.Text("stylesheet", "nameHelp", base.getUser())%></small>
</td>
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("alias", base.getUser())%>:
</th>
<td class="propertyContent">
<asp:TextBox ID="AliasTxt" Width="350px" runat="server" /><br />
<small><%=umbraco.ui.Text("stylesheet", "aliasHelp", base.getUser())%></small>
</td>
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("styles", base.getUser())%>:
</th>
<td class="propertyContent">
<asp:TextBox ID="Content" Style="width: 350px" TextMode="MultiLine" runat="server" />
<br />
<br />
</td>
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("preview", base.getUser())%>:
</th>
<td class="propertyContent">
<div id="preview" style="padding: 10px; border: 1px solid #ccc; width: 330px;">
<div runat="server" id="prStyles">
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
<br />
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<br />
1 2 3 4 5 6 7 8 9 0 € £ $ % & (.,;:'\"!?)
<br />
<br />
Just keep examining every bid quoted for zinc etchings.
</div>
</div>
</td>
</tr>
</table>
</cc1:Pane>
</cc1:UmbracoPanel>
<script type="text/javascript">
jQuery(document).ready(function () {
UmbClientMgr.appActions().bindSaveShortCut();
});
</script>
</asp:Content>

View File

@@ -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>
/// Summary description for EditStyleSheetProperty.
/// </summary>
public partial class EditStyleSheetProperty : BasePages.UmbracoEnsuredPage
{
public EditStyleSheetProperty()
{
/// <summary>
/// Summary description for EditStyleSheetProperty.
/// </summary>
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<loadStylesheetProperty>().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<loadStylesheetProperty>().Tree.Alias)
.SyncTree(Request.GetItemAsString("id"), false);
}
else
{
//true = force reload from server on post back
ClientTools
.SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree<loadStylesheetProperty>().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;
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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;
}
/// <summary>
/// Panel1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.UmbracoPanel Panel1;
/// <summary>
/// Pane7 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane Pane7;
/// <summary>
/// NameTxt control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox NameTxt;
/// <summary>
/// AliasTxt control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox AliasTxt;
/// <summary>
/// Content control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox Content;
/// <summary>
/// prStyles control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl prStyles;
}
}

View File

@@ -1,69 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.cms.presentation.settings.stylesheet {
public partial class EditStyleSheetProperty {
/// <summary>
/// Panel1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.UmbracoPanel Panel1;
/// <summary>
/// Pane7 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane Pane7;
/// <summary>
/// NameTxt control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox NameTxt;
/// <summary>
/// AliasTxt control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox AliasTxt;
/// <summary>
/// Content control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox Content;
/// <summary>
/// prStyles control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl prStyles;
}
}