-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Add AdvancedSearchBoxDefinition - support AdvancedSearchBox webpart…
… provision #857 + CSOM impl and tests
- Loading branch information
1 parent
c5f6b32
commit 2ec7d0e
Showing
6 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
Binary file modified
BIN
+8.45 KB
(460%)
SPMeta2/SPMeta2.CSOM.Standard/ModelHandlers/Webparts/AdvancedSearchBoxModelHandler.cs
Binary file not shown.
Binary file modified
BIN
+2.38 KB
(260%)
...Containers.Standard/DefinitionGenerators/Webparts/AdvancedSearchBoxDefinitionGenerator.cs
Binary file not shown.
Binary file modified
BIN
+38.3 KB
(1400%)
SPMeta2/SPMeta2.Regression.CSOM.Standard/Validation/Webparts/AdvancedSearchBoxValidator.cs
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
SPMeta2/SPMeta2/Utils/AdvancedSearchBoxWebPartXmlExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System.Xml.Linq; | ||
|
||
namespace SPMeta2.Utils | ||
{ | ||
/// <summary> | ||
/// Helper class to work with AdvancedSearchBoxWebPart xml properties. | ||
/// Allows to props with xmlns="urn:schemas-microsoft-com:AdvancedSearchBox" | ||
/// </summary> | ||
public static class AdvancedSearchBoxWebPartXmlExtensions | ||
{ | ||
#region properties | ||
|
||
private const string XmlNs = "urn:schemas-microsoft-com:AdvancedSearchBox"; | ||
|
||
#endregion | ||
|
||
#region methods | ||
|
||
public static string GetAdvancedSearchBoxWebPartProperty(this XDocument webpartXmlDocument, string propName) | ||
{ | ||
return webpartXmlDocument.GetProperty(propName, XmlNs); | ||
} | ||
|
||
public static XDocument SetOrUpdateAdvancedSearchBoxWebPartProperty(this XDocument webpartXmlDocument, | ||
string propName, | ||
string propValue) | ||
{ | ||
return SetOrUpdateAdvancedSearchBoxWebPartProperty(webpartXmlDocument, propName, propValue, false); | ||
} | ||
|
||
public static XDocument SetOrUpdateAdvancedSearchBoxWebPartProperty(this XDocument webpartXmlDocument, string propName, | ||
string propValue, bool isCData) | ||
{ | ||
return webpartXmlDocument.SetOrUpdateProperty(propName, propValue, "string", XmlNs, isCData); | ||
} | ||
|
||
#endregion | ||
} | ||
} |