public void CheckLanguage(CopyItemsArgs args) { Assert.ArgumentNotNull(args, "args"); if (args.IsPostBack) { if (args.Result != "yes") { args.AbortPipeline(); } } else { bool flag = false; foreach (Item item in GetSubItems(args)) { if (item.TemplateID == TemplateIDs.Language) { flag = true; break; } } if (flag) { SheerResponse.Confirm("You are coping a language.\n\nA language item must have a name that is a valid ISO-code.\n\nPlease rename the copied item afterward.\n\nAre you sure you want to continue?"); args.WaitForPostBack(); } } }
public void GetDestination(CopyItemsArgs args) { Assert.ArgumentNotNull(args, "args"); if (SheerResponse.CheckModified()) { Database database = GetDatabase(args); ListString str = new ListString(args.Parameters["items"], '|'); Item item = database.Items[str[0]]; UrlString str2 = new UrlString(this.GetDialogUrl()); if (item != null) { str2.Append("fo", item.ID.ToString()); str2.Append("sc_content", item.Database.Name); } Context.ClientPage.ClientResponse.ShowModalDialog(str2.ToString(), true); args.WaitForPostBack(false); } }
public void GetDestination(CopyItemsArgs args) { Assert.ArgumentNotNull((object)args, nameof(args)); if (!SheerResponse.CheckModified()) { return; } Item obj = GetDatabase(args).Items[new ListString(args.Parameters["destination"], '|')[0]]; UrlString urlString = new UrlString(this.GetDialogUrl()); if (obj != null) { urlString.Append("fo", obj.ID.ToString()); urlString.Append("sc_content", obj.Database.Name); urlString.Append("la", args.Parameters["language"]); } Context.ClientPage.ClientResponse.ShowModalDialog(urlString.ToString(), "1200px", "700px", string.Empty, true); args.WaitForPostBack(false); }