public override void Execute(CommandContext context) { Assert.ArgumentNotNull((object)context, "context"); WebEditCommand.ExplodeParameters(context); string formValue = WebUtil.GetFormValue("scPlainValue"); context.Parameters.Add("fieldValue", formValue); Context.ClientPage.Start((object)this, "Run", context.Parameters); }
/// <inheritdoc /> public override void Execute(CommandContext context) { Assert.ArgumentNotNull((object)context, nameof(context)); WebEditCommand.ExplodeParameters(context); string formValue = WebUtil.GetFormValue("scPlainValue"); context.Parameters.Add(Templates.ImportImageClientPipeline.Parameters.FieldValue, formValue); Context.ClientPage.Start((object)this, "Run", context.Parameters); }
public override void Execute(CommandContext context) { Assert.ArgumentNotNull(context, "context"); WebEditCommand.ExplodeParameters(context); bool containsTagNotFound = false; string currentValue = WebUtil.GetFormValue("scPlainValue"); doc = new HtmlDocument(); doc.LoadHtml(currentValue); if (doc.DocumentNode.SelectSingleNode("//span[@class='tagSet' or @class='tagNotFound']") != null) { string taxValue = string.Empty; foreach (HtmlNode span in doc.DocumentNode.SelectNodes("//span[@class='tagSet' or @class='tagNotFound']")) { string tagId; string weightId; switch (span.Attributes["class"].Value) { case "tagSet": tagId = span.Attributes["tagid"].Value; weightId = span.Attributes["weightid"].Value; taxValue = taxValue + tagId + ":" + weightId + "|"; break; case "tagNotFound": tagId = ID.Null.ToString(); weightId = span.InnerText; taxValue = taxValue + tagId + ":" + weightId + "|"; containsTagNotFound = true; break; } } taxValue = taxValue.Trim('|'); if (!string.IsNullOrEmpty(taxValue)) { currentValue = taxValue; } } if ((context.Parameters["mode"] == "check") && !containsTagNotFound) { SheerResponse.Alert("There are not any unrecognized categories."); } else { context.Parameters.Add("currentValue", currentValue); SheerResponse.SetAttribute("scHtmlValue", "value", string.Empty); SheerResponse.SetAttribute("scPlainValue", "value", string.Empty); Sitecore.Context.ClientPage.Start(this, "SelectTag", context.Parameters); } }
public override void Execute(CommandContext context) { Assert.ArgumentNotNull(context, "context"); WebEditCommand.ExplodeParameters(context); Sitecore.Context.ClientPage.Start(this, "Run", context.Parameters); }