From 8307da1a87027c76c5a98c85723e34a06551861e Mon Sep 17 00:00:00 2001 From: "Hendy@Blueberry" Date: Mon, 17 Sep 2012 21:21:33 -0100 Subject: [PATCH] XPath CBL / DDL prevalue descriptions for the XPath fields, and fix for CBL to load defaults --- .../XPathCheckBoxList/XPathCheckBoxListPreValueEditor.cs | 7 +++++-- .../XPathDropDownList/XPathDropDownListPreValueEditor.cs | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/umbraco.editorControls/XPathCheckBoxList/XPathCheckBoxListPreValueEditor.cs b/src/umbraco.editorControls/XPathCheckBoxList/XPathCheckBoxListPreValueEditor.cs index bd1c4c51cd..2064ff818b 100644 --- a/src/umbraco.editorControls/XPathCheckBoxList/XPathCheckBoxListPreValueEditor.cs +++ b/src/umbraco.editorControls/XPathCheckBoxList/XPathCheckBoxListPreValueEditor.cs @@ -65,7 +65,7 @@ namespace umbraco.editorControls.XPathCheckBoxList if (this.options == null) { // Create a new Options data object with the default values - this.options = new XPathCheckBoxListOptions(); + this.options = new XPathCheckBoxListOptions(true); } } return this.options; @@ -178,7 +178,10 @@ namespace umbraco.editorControls.XPathCheckBoxList protected override void RenderContents(HtmlTextWriter writer) { //writer.AddPrevalueRow("Database Type", this.dbTypeDropDownList); - writer.AddPrevalueRow("XPath Expression", this.xPathTextBox, this.xPathRequiredFieldValidator, this.xPathCustomValidator); + writer.AddPrevalueRow("XPath Expression", @"can use the tokens $ancestorOrSelf, $parentPage and $currentPage, eg.
+
+ all siblings: $parentPage//*[@id != $currentPage/@id]
+ ", this.xPathTextBox, this.xPathRequiredFieldValidator, this.xPathCustomValidator); writer.AddPrevalueRow("Storage Type", this.storageTypeRadioButtonList); writer.AddPrevalueRow("Values", this.valueTypeDropDownList); } diff --git a/src/umbraco.editorControls/XPathDropDownList/XPathDropDownListPreValueEditor.cs b/src/umbraco.editorControls/XPathDropDownList/XPathDropDownListPreValueEditor.cs index 66adf19e3d..82ee7c15a4 100644 --- a/src/umbraco.editorControls/XPathDropDownList/XPathDropDownListPreValueEditor.cs +++ b/src/umbraco.editorControls/XPathDropDownList/XPathDropDownListPreValueEditor.cs @@ -153,7 +153,10 @@ namespace umbraco.editorControls.XPathDropDownList /// protected override void RenderContents(HtmlTextWriter writer) { - writer.AddPrevalueRow("XPath Expression", this.xPathTextBox, this.xPathRequiredFieldValidator, this.xPathCustomValidator); + writer.AddPrevalueRow("XPath Expression", @"can use the tokens $ancestorOrSelf, $parentPage and $currentPage, eg.
+
+ all siblings: $parentPage//*[@id != $currentPage/@id]
+ ", this.xPathTextBox, this.xPathRequiredFieldValidator, this.xPathCustomValidator); writer.AddPrevalueRow("Value", this.valueTypeDropDownList); }