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
function visualizeOrgChart(orgChartProperties) { | |
google.load('visualization', '1', { packages: ['orgchart'] }); | |
google.OrgChartData = orgChartProperties; | |
google.setOnLoadCallback(loadOrgChart); | |
} |
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
function loadOrgChart() { | |
var soapEnv = | |
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \ | |
<soapenv:Body> \ | |
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \ | |
<listName>" + google.OrgChartData.ListName + "</listName> \ | |
<viewFields> \ | |
<ViewFields> \ | |
<FieldRef Name='" + google.OrgChartData.TitleFieldName + "' /> \ | |
<FieldRef Name='" + google.OrgChartData.TooltipFieldName + "' /> \ |
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
function onOrgChartDataLoaded(orgChartData, status) { | |
var data = new google.visualization.DataTable(); | |
data.addColumn('string', 'Name'); | |
data.addColumn('string', 'Parent'); | |
data.addColumn('string', 'ToolTip'); | |
var chartFieldNames = { Title: generateOwsFieldName(google.OrgChartData.TitleFieldName), | |
Tooltip: generateOwsFieldName(google.OrgChartData.TooltipFieldName), | |
Parent: generateOwsFieldName(google.OrgChartData.ParentFieldName), | |
Properties: generateOwsFieldName(google.OrgChartData.StyleFieldName) | |
}; |
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
/// <summary> | |
/// Context DataItem for All Approvers in Xml format | |
/// </summary> | |
public class AllApproverCommentsXml : ContextDataItemBase | |
{ | |
/// <summary> | |
/// | |
/// </summary> | |
/// <param name="ctx"></param> |
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
public static void Add(string typeName, string assemblyName, string displayName, string description) |
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
CustomCommonDataCollection.Add( | |
"SharePoint.NW2010.Deployment.ContextDataItems.AllApproverCommentsXml", | |
"SharePoint.NW2010.Deployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b6acd7f49f7aeb64", | |
"Approver Comments (XML)", | |
"Approver comments in XML format"); |
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
/// <summary> | |
/// Publish Reusable Workflow | |
/// </summary> | |
/// <param name="mapping"></param> | |
public void PublishReusableWorkflow(NWFMappingEntry mapping) | |
{ | |
SPContentType ct = web.ContentTypes[mapping.BindingName]; | |
string workflowName = mapping.WorkflowName; | |
string pathToNWF = Path.Combine(properties.Definition.RootDirectory, mapping.WorkflowFileName); | |
byte[] workflowData = File.ReadAllBytes(pathToNWF); |
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
WorkflowMetaData PublishAWorkflow(string wfName, NWActionConfigurations configs, Guid listId, SPWeb web, ImportContext importCtx, bool validate, SPContentTypeId contentTypeId, string changeNotes) |
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
//Init People Picker | |
//peoplePickerId - SharePoint People Editor ClientID | |
//pickerEntityXml - PickerEntity in xml (see method ToXmlData for class PickerEntity) | |
function initPeoplePickerBox(peoplePickerId, pickerEntityXml) { | |
var $pe = $("#" + peoplePickerId); | |
var entityProps = {LoginName: pickerEntityXml.attr("Key"), | |
UserName: pickerEntityXml.attr("DisplayText"), | |
Description: pickerEntityXml.attr("Description")}; |
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
//Clear People Picker | |
//peoplePickerId - SharePoint People Editor ClientID | |
function clearPeoplePickerBox(peoplePickerId) { | |
var $pe = $("#" + peoplePickerId); | |
var $peData = $pe.find("input[id$='hiddenSpanData']"); | |
var $peDisplayArea = $pe.find("div[id$='_upLevelDiv']"); | |
$peDisplayArea.children().remove(); | |
$peData.val(""); | |
} |