protected override void RenderContents(HtmlTextWriter writer) { SPSEditorPartsTools tools = new SPSEditorPartsTools(writer); tools.DecorateControls(Controls); tools.SectionBeginTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_LinkedTo")); ddlWebparts.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_MaxLevels")); txtMaxLevels.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(); chkNavigateToList.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_NavigateToListView")); ddlListViews.RenderControl(writer); tools.SectionFooterTag(); tools.SectionEndTag(); }
protected void DebugRender(HtmlTextWriter writer) { SPSEditorPartsTools editorTools = new SPSEditorPartsTools(writer); if (DebugQuery) { string resultQuery = editorTools.FormatXml(CamlQuery); writer.Write("<font color=red>DEBUG CAML Query (Original)</font><br><font color=blue>"); writer.Write("<pre>" + SPEncode.HtmlEncode(resultQuery) + "</pre>"); writer.Write("</font><br>"); resultQuery = editorTools.FormatXml(_camlPreprocessor.Preprocess()); writer.Write("<font color=red>DEBUG CAML Query (Processed)</font><br><font color=blue>"); writer.Write("<pre>" + SPEncode.HtmlEncode(resultQuery) + "</pre>"); writer.Write("</font><br>"); } if (DebugResults) { writer.Write("<font color=red>DEBUG XML DATA</font><br><font color=blue>"); writer.Write("<pre>" + SPEncode.HtmlEncode(editorTools.FormatXml(_rollupEngine.Data.GetXml())) + "</pre>"); writer.Write("</font><br>"); } if (DebugEvaluator) { writer.Write("<font color=red>DEBUG Evaluator</font><br>"); writer.Write(EvaluatorSample()); writer.Write("<br>"); } }
public override bool ApplyChanges() { EnsureChildControls(); FolderExplorer webpart = WebPartToEdit as FolderExplorer; if (webpart != null) { webpart.ListGuid = SPSEditorPartsTools.GetListGuidFromListViewGuid(Context, ddlWebparts.SelectedValue); webpart.ListViewGuid = ddlWebparts.SelectedValue; webpart.FollowListView = chkFollowListView.Checked; webpart.NavigateToList = chkNavigateToList.Checked; webpart.NavigateToListView = ddlListViews.SelectedValue; webpart.ShowCounter = chkShowCounter.Checked; webpart.Filter = txtFilter.Text.ToUpper(); webpart.HideStartUnder = chkHideStartUnder.Checked; int converted; if (int.TryParse(txtExpandDepth.Text, out converted)) { webpart.ExpandDepth = converted; } webpart.ClearControlState(); webpart.ClearCache(); return(true); } return(false); }
protected override void CreateChildControls() { ddlWebparts = new DropDownList(); ddlWebparts.Width = new Unit("100%"); SPSEditorPartsTools.FillWebParts(Context, ddlWebparts); ddlWebparts.SelectedIndexChanged += ddlWebParts_SelectedIndexChanged; ddlWebparts.AutoPostBack = true; Controls.Add(ddlWebparts); txtMaxLevels = new TextBox(); txtMaxLevels.Width = new Unit("100%"); txtMaxLevels.Text = string.Empty; Controls.Add(txtMaxLevels); chkNavigateToList = new CheckBox(); chkNavigateToList.Text = SPSResources.GetResourceString("SPSPE_NavigateToList"); chkNavigateToList.Checked = false; chkNavigateToList.CheckedChanged += chkNavigateToList_CheckedChanged; chkNavigateToList.AutoPostBack = true; Controls.Add(chkNavigateToList); ddlListViews = new DropDownList(); ddlListViews.Width = new Unit("100%"); Controls.Add(ddlListViews); }
public override void SyncChanges() { EnsureChildControls(); SPSListExplorer webpart = WebPartToEdit as SPSListExplorer; if (webpart != null) { Debug.WriteLine("*ListGuid:" + ddlLists.SelectedValue); Debug.WriteLine("*ListViewGuid:" + ddlViews.SelectedValue); if (!string.IsNullOrEmpty(webpart.ListGuid)) { ddlLists.SelectedValue = webpart.ListGuid; if (!string.IsNullOrEmpty(webpart.ListViewGuid)) { SPSEditorPartsTools.FillListViews(ddlViews, webpart.ListGuid); ddlViews.SelectedValue = webpart.ListViewGuid; } chkShowNewButton.Checked = webpart.ShowNewButton; chkShowActionsButton.Checked = webpart.ShowActionsButton; chkShowUpButton.Checked = webpart.ShowUpButton; chkShowNumberOfItems.Checked = webpart.ShowNumberOfItems; chkShowBreadCrumb.Checked = webpart.ShowBreadCrumb; chkShowTree.Checked = webpart.ShowTree; chkSortHierarchyTree.Checked = webpart.SortHierarchyTree; } } }
public override void RenderBeginTag(HtmlTextWriter writer) { tools = new SPSEditorPartsTools(writer); tools.DecorateControls(Controls); tools.SectionBeginTag(); }
/// <summary> /// Debugs the render. /// </summary> /// <param name="writer">The writer.</param> protected void DebugRender(HtmlTextWriter writer) { SPSEditorPartsTools editorTools = new SPSEditorPartsTools(writer); if (DebugQuery) { if (!string.IsNullOrEmpty(CamlQuery)) { WriteDebug(writer, "DEBUG CAML Query (No Query)", string.Empty); } else { string resultQuery = editorTools.FormatXml(CamlQuery); WriteDebug(writer, "DEBUG CAML Query (Original)", resultQuery); resultQuery = editorTools.FormatXml(_camlPreprocessor.Evaluate()); WriteDebug(writer, "DEBUG CAML Query (Processed)", resultQuery); } } if (DebugResults) { WriteDebug(writer, "DEBUG XML DATA", editorTools.FormatXml(_collector.GetXml())); } if (DebugEvaluator) { writer.Write("<font color=red>DEBUG Evaluator</font><br>"); writer.Write(EvaluatorSample()); writer.Write("<br>"); } }
protected override void CreateChildControls() { ddlWebparts = new DropDownList(); ddlWebparts.Width = new Unit("100%"); SPSEditorPartsTools.FillWebParts(Context, ddlWebparts); ddlWebparts.SelectedIndexChanged += ddlWebParts_SelectedIndexChanged; ddlWebparts.AutoPostBack = true; Controls.Add(ddlWebparts); txtFilter = new TextBox(); txtFilter.Width = new Unit("100%"); Controls.Add(txtFilter); chkFollowListView = new CheckBox(); chkFollowListView.Text = SPSResources.GetResourceString("SPSPE_FollowListView"); chkFollowListView.Checked = false; chkFollowListView.AutoPostBack = true; chkFollowListView.CheckedChanged += chkFollowListView_CheckedChanged; chkFollowListView.ToolTip = SPSResources.GetResourceString("SPSPE_FollowListViewTip"); Controls.Add(chkFollowListView); chkNavigateToList = new CheckBox(); chkNavigateToList.Text = SPSResources.GetResourceString("SPSPE_NavigateToList"); chkNavigateToList.Checked = false; chkNavigateToList.AutoPostBack = true; chkNavigateToList.CheckedChanged += chkNavigateToList_CheckedChanged; chkNavigateToList.ToolTip = SPSResources.GetResourceString("SPSPE_NavigateToListTip"); Controls.Add(chkNavigateToList); chkSortHierarchy = new CheckBox(); chkSortHierarchy.Text = SPSResources.GetResourceString("SPSPE_SortHierarchy"); chkSortHierarchy.Checked = false; chkSortHierarchy.AutoPostBack = true; chkSortHierarchy.ToolTip = SPSResources.GetResourceString("SPSPE_SortHierarchyTip"); Controls.Add(chkSortHierarchy); ddlListViews = new DropDownList(); ddlListViews.Width = new Unit("100%"); Controls.Add(ddlListViews); chkShowCounter = new CheckBox(); chkShowCounter.Text = SPSResources.GetResourceString("SPSPE_ShowFileCounter"); chkShowCounter.Checked = false; chkShowCounter.ToolTip = SPSResources.GetResourceString("SPSPR_ShowFileCounterTip"); Controls.Add(chkShowCounter); txtExpandDepth = new TextBox(); txtExpandDepth.Width = new Unit("100%"); Controls.Add(txtExpandDepth); chkHideStartUnder = new CheckBox(); chkHideStartUnder.Text = SPSResources.GetResourceString("SPSPE_HideUnderScoreFolders"); chkHideStartUnder.Checked = false; chkHideStartUnder.ToolTip = SPSResources.GetResourceString("SPSPE_HideUnderScoreFoldersTip"); Controls.Add(chkHideStartUnder); }
private void ddlWebParts_SelectedIndexChanged(object sender, EventArgs e) { if (chkNavigateToList.Checked) { string listName = ddlWebparts.SelectedItem.Text; string guid = SPContext.Current.Web.Lists[listName].ID.ToString("B"); SPSEditorPartsTools.FillListViews(ddlListViews, guid); } }
protected override void CreateChildControls() { ddlLists = new DropDownList(); ddlLists.Width = new Unit("100%"); if (_documentLibrary) { SPSEditorPartsTools.FillLists(ddlLists, SPBaseType.DocumentLibrary); } else { SPSEditorPartsTools.FillListsExclude(ddlLists, SPBaseType.DocumentLibrary); } ddlLists.SelectedIndexChanged += ddlLists_SelectedIndexChanged; ddlLists.AutoPostBack = true; //NavigationTools.FillWebParts(Context, ddlLists); Controls.Add(ddlLists); ddlViews = new DropDownList(); ddlViews.Width = new Unit("100%"); SPSEditorPartsTools.FillListViews(ddlViews, ddlLists.SelectedValue); Controls.Add(ddlViews); chkShowTree = new CheckBox(); chkShowTree.Text = SPSResources.GetResourceString("SPSPE_ShowTree"); Controls.Add(chkShowTree); chkSortHierarchyTree = new CheckBox(); chkSortHierarchyTree.Text = SPSResources.GetResourceString("SPSPE_SortHierarchyTree"); Controls.Add(chkSortHierarchyTree); chkShowBreadCrumb = new CheckBox(); chkShowBreadCrumb.Text = SPSResources.GetResourceString("SPSPE_ShowBreadCrumb"); Controls.Add(chkShowBreadCrumb); chkShowNewButton = new CheckBox(); chkShowNewButton.Text = SPSResources.GetResourceString("SPSPE_ShowNewButton"); Controls.Add(chkShowNewButton); chkShowActionsButton = new CheckBox(); chkShowActionsButton.Text = SPSResources.GetResourceString("SPSPE_ShowActionsButton"); Controls.Add(chkShowActionsButton); chkShowUpButton = new CheckBox(); chkShowUpButton.Text = SPSResources.GetResourceString("SPSPE_ShowUpFolderButton"); Controls.Add(chkShowUpButton); chkShowNumberOfItems = new CheckBox(); chkShowNumberOfItems.Text = SPSResources.GetResourceString("SPSPE_CountItemsInTree"); Controls.Add(chkShowNumberOfItems); }
protected override void RenderContents(HtmlTextWriter writer) { SPSEditorPartsTools partsTools = new SPSEditorPartsTools(writer); partsTools.SectionBeginTag(); partsTools.SectionHeaderTag("Configuration:"); partsTools.CreateTextBoxAndBuilderXml(txtConfig); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); chkDevErrors.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionEndTag(); }
protected override void RenderContents(HtmlTextWriter writer) { SPSEditorPartsTools tools = new SPSEditorPartsTools(writer); tools.DecorateControls(Controls); tools.SectionBeginTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_LinkedTo")); ddlWebparts.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_Filter")); txtFilter.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_Behaviour")); chkFollowListView.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(); chkNavigateToList.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(); chkSortHierarchy.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(); ddlListViews.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(); chkShowCounter.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_TreeExpandDepth")); txtExpandDepth.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(); chkHideStartUnder.RenderControl(writer); tools.SectionFooterTag(); tools.SectionEndTag(); }
protected override void RenderContents(HtmlTextWriter writer) { SPSEditorPartsTools tools = new SPSEditorPartsTools(writer); tools.SectionBeginTag(); tools.DecorateControls(Controls); tools.SectionHeaderTag("Variable Names:"); txtQueryParameters.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag("Default Values:"); txtDefaultParameters.RenderControl(writer); tools.SectionFooterTag(); tools.SectionEndTag(); }
/// <summary> /// Debugs the render. /// </summary> /// <param name="writer">The writer.</param> /// <param name="transformed">The transformated.</param> internal void DebugRender(HtmlTextWriter writer, string transformed) { SPSEditorPartsTools tools = new SPSEditorPartsTools(writer); //if (DebugSource) //{ // writer.Write("<font color=red>DEBUG XML DATA</font><br><font color=blue>"); // writer.Write("<pre>" + SPEncode.HtmlEncode(tools.FormatXml(XmlData)) + "</pre>"); // writer.Write("</font><br>"); //} if (DebugTransformation) { writer.Write("<font color=red>DEBUG XML TRANSFORM</font><br><font color=blue>"); writer.Write("<pre>" + SPEncode.HtmlEncode(tools.FormatXml(transformed)) + "</pre>"); writer.Write("</font><br>"); } }
public override bool ApplyChanges() { EnsureChildControls(); FolderBreadCrumb webpart = WebPartToEdit as FolderBreadCrumb; if (webpart != null) { webpart.ListGuid = SPSEditorPartsTools.GetListGuidFromListViewGuid(Context, ddlWebparts.SelectedValue); webpart.ListViewGuid = ddlWebparts.SelectedValue; int converted; if (int.TryParse(txtMaxLevels.Text, out converted)) { webpart.MaxLevels = converted; } webpart.NavigateToList = chkNavigateToList.Checked; webpart.NavigateToListView = ddlListViews.SelectedValue; return(true); } return(false); }
protected override void RenderContents(HtmlTextWriter writer) { SPSEditorPartsTools tools = new SPSEditorPartsTools(writer); tools.DecorateControls(Controls); tools.SectionBeginTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_TopUrl")); txtRootWeb.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(); chkShowSubsites.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(); chkShowLists.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(); chkShowFolders.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_FilterWeb")); txtFilterWeb.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_FilterList")); txtFilterList.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_TreeExpandDepth")); txtExpandDepth.RenderControl(writer); tools.SectionFooterTag(); tools.SectionEndTag(); }
protected override void RenderContents(HtmlTextWriter writer) { SPSEditorPartsTools tools = new SPSEditorPartsTools(writer); tools.DecorateControls(Controls); tools.SectionBeginTag(); tools.SectionHeaderTag(); chkEnableCache.RenderControl(writer); tools.SectionFooterTag(); tools.SectionHeaderTag(SPSLocalization.GetResourceString("SPSFW_CacheTimeOut")); txtCacheTimeInSeconds.RenderControl(writer); tools.SectionFooterTag(); tools.SectionEndTag(); if (!string.IsNullOrEmpty(_errorMessage)) { Zone.ErrorText += Environment.NewLine + _errorMessage; } }
protected override void RenderContents(HtmlTextWriter writer) { SPSEditorPartsTools partsTools = new SPSEditorPartsTools(writer); partsTools.DecorateControls(Controls); partsTools.SectionBeginTag(); partsTools.SectionHeaderTag(SPSResources.GetString("SPSEP_TopSite")); partsTools.CreateTextBoxAndBuilder(_topSite); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSResources.GetString("SPSEP_Lists")); partsTools.CreateTextBoxAndBuilder(_lists); partsTools.SectionNextLineTag(); _btnListInfo.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSResources.GetString("SPSEP_Fields")); partsTools.CreateTextBoxAndBuilder(_fields); partsTools.SectionNextLineTag(); _btnFieldInfo.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSResources.GetString("SPSEP_CAMLQuery")); partsTools.CreateTextBoxAndBuilderXml(_camlQuery); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSResources.GetString("SPSEP_OrderFields")); partsTools.CreateTextBoxAndBuilder(_sortFields); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSResources.GetString("SPSEP_XSL")); partsTools.CreateTextBoxAndBuilderXml(_xsl); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSResources.GetString("SPSEP_MaxResults")); partsTools.CreateTextBoxAndBuilderXml(_maxResults); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _camlQueryRecursive.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _includeListData.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _dateTimeISO.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _fixLookUp.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _provideFirstRow.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _debugResults.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _debugQuery.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _debugEvaluator.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _showExtendedErrors.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionEndTag(); }
private void ddlLists_SelectedIndexChanged(object sender, EventArgs e) { SPSEditorPartsTools.FillListViews(ddlViews, ddlLists.SelectedValue); }
protected override void RenderContents(HtmlTextWriter writer) { SPSEditorPartsTools partsTools = new SPSEditorPartsTools(writer); partsTools.DecorateControls(Controls); partsTools.SectionBeginTag(); partsTools.SectionHeaderTag(SPSRollUpEngine.GetResourceString("SPSEP_TopSite")); partsTools.CreateTextBoxAndBuilder(_topSite); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSRollUpEngine.GetResourceString("SPSEP_Lists")); partsTools.CreateTextBoxAndBuilder(_lists); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSRollUpEngine.GetResourceString("SPSEP_Fields")); partsTools.CreateTextBoxAndBuilder(_fields); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSRollUpEngine.GetResourceString("SPSEP_CAMLQuery")); partsTools.CreateTextBoxAndBuilderXml(_camlQuery); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSRollUpEngine.GetResourceString("SPSEP_XMLTreeConfiguration")); partsTools.CreateTextBoxAndBuilderXml(_xsl); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(SPSRollUpEngine.GetResourceString("SPSEP_MaxResults")); partsTools.CreateTextBoxAndBuilderXml(_maxResults); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _camlQueryRecursive.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _includeListData.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _dateTimeISO.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _fixLookUp.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _debugResults.RenderControl(writer); partsTools.SectionFooterTag(); //partsTools.SectionHeaderTag(); //_debugResultsXML.RenderControl(writer); //partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _debugQuery.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _debugEvaluator.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionHeaderTag(); _showExtendedErrors.RenderControl(writer); partsTools.SectionFooterTag(); partsTools.SectionEndTag(); }