Deprecated MacroProperty.Public because its value is ignored. Removed the checkbox

for setting MacroProperty.Public from the macro editor.
This commit is contained in:
Michiel van Oosterhout
2012-10-06 20:51:00 -02:00
parent 40a413cd70
commit c1cfcaf9ea
4 changed files with 4 additions and 23 deletions

View File

@@ -136,9 +136,6 @@
<HeaderTemplate>
<table cellspacing="0" cellpadding="2" width="98%" border="0">
<tr>
<td class="propertyHeader">
<%=umbraco.ui.Text("show",this.getUser())%>
</td>
<td class="propertyHeader">
<%=umbraco.ui.Text("general", "alias",this.getUser())%>
</td>
@@ -153,9 +150,6 @@
</HeaderTemplate>
<ItemTemplate>
<tr>
<td class="propertyContent">
<asp:CheckBox runat="server" ID="macroPropertyHidden" Checked='<%# macroIsVisible (DataBinder.Eval(Container.DataItem, "Public"))%>' />
</td>
<td class="propertyContent">
<input type="hidden" id="macroPropertyID" runat="server" value='<%#DataBinder.Eval(Container.DataItem, "id")%>'
name="macroPropertyID" />
@@ -179,13 +173,10 @@
<FooterTemplate>
<tr>
<td class="propertyContent">
<asp:CheckBox runat="server" ID="macroPropertyHiddenNew" />
<asp:TextBox runat="server" ID="macroPropertyAliasNew" Text='' OnTextChanged="macroPropertyCreate" />
</td>
<td class="propertyContent">
<asp:TextBox runat="server" ID="macroPropertyAliasNew" Text='New Alias' OnTextChanged="macroPropertyCreate" />
</td>
<td class="propertyContent">
<asp:TextBox runat="server" ID="macroPropertyNameNew" Text='New Name' />
<asp:TextBox runat="server" ID="macroPropertyNameNew" Text='' />
</td>
<td class="propertyContent">
<asp:DropDownList OnPreRender="AddChooseList" runat="server" ID="macroPropertyTypeNew"

View File

@@ -136,9 +136,6 @@
<HeaderTemplate>
<table cellspacing="0" cellpadding="2" width="98%" border="0">
<tr>
<td class="propertyHeader">
<%=umbraco.ui.Text("show",this.getUser())%>
</td>
<td class="propertyHeader">
<%=umbraco.ui.Text("general", "alias",this.getUser())%>
</td>
@@ -153,9 +150,6 @@
</HeaderTemplate>
<ItemTemplate>
<tr>
<td class="propertyContent">
<asp:CheckBox runat="server" ID="macroPropertyHidden" Checked='<%# macroIsVisible (DataBinder.Eval(Container.DataItem, "Public"))%>' />
</td>
<td class="propertyContent">
<input type="hidden" id="macroPropertyID" runat="server" value='<%#DataBinder.Eval(Container.DataItem, "id")%>'
name="macroPropertyID" />
@@ -178,9 +172,6 @@
</ItemTemplate>
<FooterTemplate>
<tr>
<td class="propertyContent">
<asp:CheckBox runat="server" ID="macroPropertyHiddenNew" />
</td>
<td class="propertyContent">
<asp:TextBox runat="server" ID="macroPropertyAliasNew" Text='New Alias' OnTextChanged="macroPropertyCreate" />
</td>

View File

@@ -136,7 +136,6 @@ namespace umbraco.cms.presentation.developer
DropDownList macroElementType = (DropDownList)item.FindControl("macroPropertyType");
MacroProperty mp = new MacroProperty(int.Parse(macroPropertyID.Value));
mp.Public = macroElementShow.Checked;
mp.Type = new MacroPropertyType(int.Parse(macroElementType.SelectedValue));
mp.Alias = macroElementAlias.Text;
mp.Name = macroElementName.Text;
@@ -253,7 +252,6 @@ namespace umbraco.cms.presentation.developer
public void macroPropertyCreate(object sender, EventArgs e)
{
CheckBox macroPropertyHiddenNew = (CheckBox)((Control)sender).Parent.FindControl("macroPropertyHiddenNew");
TextBox macroPropertyAliasNew = (TextBox)((Control)sender).Parent.FindControl("macroPropertyAliasNew");
TextBox macroPropertyNameNew = (TextBox)((Control)sender).Parent.FindControl("macroPropertyNameNew");
DropDownList macroPropertyTypeNew = (DropDownList)((Control)sender).Parent.FindControl("macroPropertyTypeNew");
@@ -277,7 +275,7 @@ namespace umbraco.cms.presentation.developer
{
MacroProperty mp = new MacroProperty();
mp.Macro = m_macro;
mp.Public = macroPropertyHiddenNew.Checked;
mp.Public = true;
mp.Type = new MacroPropertyType(int.Parse(macroPropertyTypeNew.SelectedValue));
mp.Alias = macroPropertyAliasNew.Text;
mp.Name = macroPropertyNameNew.Text;

View File

@@ -65,6 +65,7 @@ namespace umbraco.cms.businesslogic.macro
///
/// If not, the field can be manipulated by a default value given by the MacroPropertyType, this is s
/// </summary>
[Obsolete]
public bool Public
{
get { return _public; }