public void Clicked(ClientPipelineArgs args) { if (!args.IsPostBack) { var options = new SelectAccountOptions { Multiple = Multiple, ExcludeUsers = ExcludeUsers, ExcludeRoles = ExcludeRoles }; if (!string.IsNullOrEmpty(DomainName)) { options.DomainName = DomainName; } SheerResponse.ShowModalDialog(options.ToUrlString().ToString(), true); args.WaitForPostBack(); } else { if (args.Result == null) { return; } Value = (args.HasResult) ? args.Result : String.Empty; Sitecore.Context.ClientPage.ClientResponse.Refresh(Parent); SitecoreVersion.V81.OrOlder(() => Sitecore.Context.ClientPage.ClientResponse.Eval("ResizeDialogControls();") ); } }
/// <summary> /// Macro main entry method /// </summary> /// <param name="element"> /// The element. /// </param> /// <param name="name"> /// The name. /// </param> /// <param name="parameters"> /// The parameters. /// </param> /// <param name="value"> /// The value. /// </param> public void Execute(XElement element, string name, UrlString parameters, string value) { Assert.ArgumentNotNull(element, "element"); Assert.ArgumentNotNull(name, "name"); Assert.ArgumentNotNull(parameters, "parameters"); Assert.ArgumentNotNull(value, "value"); SelectAccountOptions options = SelectAccountOptions.Parse(); string securityType = parameters["type"]; if (!string.IsNullOrEmpty(securityType)) { if (securityType.Equals("role", StringComparison.InvariantCultureIgnoreCase)) { options.ExcludeUsers = true; } else if (securityType.Equals("user", StringComparison.InvariantCultureIgnoreCase)) { options.ExcludeRoles = true; } } string multipleSelection = parameters["multiselect"]; if (!string.IsNullOrEmpty(multipleSelection)) { options.Multiple = multipleSelection.Equals("true", StringComparison.InvariantCultureIgnoreCase); } SheerResponse.ShowModalDialog(options.ToUrlString().ToString(), true); }
public new void Clicked(ClientPipelineArgs args) { if (!args.IsPostBack) { SelectAccountOptions options = new SelectAccountOptions(); options.Multiple = false; options.ExcludeUsers = "roles".Equals(Filter, StringComparison.InvariantCultureIgnoreCase); options.ExcludeRoles = "users".Equals(Filter, StringComparison.InvariantCultureIgnoreCase); if (string.IsNullOrEmpty("Folder")) { options.DomainName = Folder; } SheerResponse.ShowModalDialog(options.ToUrlString().ToString(), true); args.WaitForPostBack(); } else { if (args.Result != null) { Value = args.Result; Sitecore.Context.ClientPage.ClientResponse.Refresh(this.Parent); } } }
public new void Clicked(ClientPipelineArgs args) { if (!args.IsPostBack) { SelectAccountOptions options = new SelectAccountOptions(); options.Multiple = false; options.ExcludeUsers = "roles".Equals(Filter, StringComparison.InvariantCultureIgnoreCase); options.ExcludeRoles = "users".Equals(Filter,StringComparison.InvariantCultureIgnoreCase); if (string.IsNullOrEmpty("Folder")) options.DomainName = Folder; SheerResponse.ShowModalDialog(options.ToUrlString().ToString(), true); args.WaitForPostBack(); } else { if (args.Result != null) { Value = args.Result; Sitecore.Context.ClientPage.ClientResponse.Refresh(this.Parent); } } }
public void Clicked(ClientPipelineArgs args) { if (!args.IsPostBack) { var options = new SelectAccountOptions { Multiple = Multiple, ExcludeUsers = ExcludeUsers, ExcludeRoles = ExcludeRoles }; if (!string.IsNullOrEmpty(DomainName)) { options.DomainName = DomainName; } SheerResponse.ShowModalDialog(options.ToUrlString().ToString(), true); args.WaitForPostBack(); } else { if (args.Result == null) return; Value = (args.HasResult) ? args.Result : String.Empty; Sitecore.Context.ClientPage.ClientResponse.Refresh(Parent); Sitecore.Context.ClientPage.ClientResponse.Eval("ResizeDialogControls();"); } }
public void Clicked(ClientPipelineArgs args) { if (!args.IsPostBack) { SelectAccountOptions options = new SelectAccountOptions(); options.Multiple = Multiple; options.ExcludeUsers = ExcludeUsers; options.ExcludeRoles = ExcludeRoles; if (!string.IsNullOrEmpty(DomainName)) { options.DomainName = DomainName; } SheerResponse.ShowModalDialog(options.ToUrlString().ToString(), true); args.WaitForPostBack(); } else { if (args.Result != null) { Value = args.Result; Sitecore.Context.ClientPage.ClientResponse.Refresh(Parent); Sitecore.Context.ClientPage.ClientResponse.Eval("RefreshPickerSize()"); } } }