From 9ae12d501cff3727136617affa1a9e2b80a68439 Mon Sep 17 00:00:00 2001 From: "Hendy@Blueberry" Date: Wed, 30 May 2012 22:33:38 -0100 Subject: [PATCH] removed the NVarchar / NText configuration option from XPath CheckBoxList (as this datatype has a new guid, no backwards compatibility required - so now always uses NText) --- .../XPathCheckBoxListPreValueEditor.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/components/editorControls/XPathCheckBoxList/XPathCheckBoxListPreValueEditor.cs b/components/editorControls/XPathCheckBoxList/XPathCheckBoxListPreValueEditor.cs index e6e585426a..cd07ceeae3 100644 --- a/components/editorControls/XPathCheckBoxList/XPathCheckBoxListPreValueEditor.cs +++ b/components/editorControls/XPathCheckBoxList/XPathCheckBoxListPreValueEditor.cs @@ -85,10 +85,6 @@ namespace umbraco.editorControls.XPathCheckBoxList /// protected override void CreateChildControls() { - this.dbTypeDropDownList.ID = "dbTypeDropDownList"; - this.dbTypeDropDownList.Items.Add(new ListItem(DBTypes.Nvarchar.ToString())); - this.dbTypeDropDownList.Items.Add(new ListItem(DBTypes.Ntext.ToString())); - this.xPathTextBox.ID = "xPathTextBox"; this.xPathTextBox.CssClass = "umbEditorTextField"; @@ -126,7 +122,6 @@ namespace umbraco.editorControls.XPathCheckBoxList base.OnLoad(e); // Read in stored configuration values - this.dbTypeDropDownList.SelectedValue = base.m_DataType.DBType.ToString(); this.xPathTextBox.Text = this.Options.XPath; this.storageTypeRadioButtonList.SelectedValue = this.Options.UseXml.ToString(); this.valueTypeDropDownList.SelectedValue = this.Options.UseIds.ToString(); @@ -164,7 +159,8 @@ namespace umbraco.editorControls.XPathCheckBoxList { if (this.Page.IsValid) { - base.m_DataType.DBType = (umbraco.cms.businesslogic.datatype.DBTypes)Enum.Parse(typeof(umbraco.cms.businesslogic.datatype.DBTypes), this.dbTypeDropDownList.SelectedValue, true); + // always use NText + base.m_DataType.DBType = cms.businesslogic.datatype.DBTypes.Ntext; this.Options.XPath = this.xPathTextBox.Text; this.Options.UseXml = bool.Parse(this.storageTypeRadioButtonList.SelectedValue); @@ -180,7 +176,7 @@ namespace umbraco.editorControls.XPathCheckBoxList /// protected override void RenderContents(HtmlTextWriter writer) { - writer.AddPrevalueRow("Database Type", this.dbTypeDropDownList); + //writer.AddPrevalueRow("Database Type", this.dbTypeDropDownList); writer.AddPrevalueRow("XPath Expression", this.xPathTextBox, this.xPathRequiredFieldValidator, this.xPathCustomValidator); writer.AddPrevalueRow("Storage Type", this.storageTypeRadioButtonList); writer.AddPrevalueRow("Values", this.valueTypeDropDownList);