protected override PageContent getContent() { var content = new UiPageContent(isAutoDataUpdater: true); var omni = FormItemList.CreateGrid(numberOfColumns: 7); var boxId = new ModalBoxId(); omni.AddFormItems( new TextControl("", true).ToFormItem( setup: new FormItemSetup(columnSpan: 2), label: "Model number ".ToComponents() .Append( new EwfButton( new StandardButtonStyle("(popup)", buttonSize: ButtonSize.ShrinkWrap), behavior: new OpenModalBehavior(boxId, etherealChildren: new ModalBox(boxId, true, "More information...".ToComponents()).ToCollection()))) .Materialize()), "".ToComponents().ToFormItem(label: "Normal price".ToComponents()), new TextControl("", true).ToFormItem(label: "Actual price".ToComponents()), new TextControl("", true).ToFormItem(label: "Quantity".ToComponents()), "".ToComponents().ToFormItem(label: "Inventory".ToComponents()), "".ToComponents().ToFormItem(label: "Bill Number".ToComponents())); content.Add(omni); return(content); }
protected override PageContent getContent() { var content = new UiPageContent(); var modalBoxId = new ModalBoxId(); content.Add( new WrappingList( new EwfButton( new StandardButtonStyle("Open standard"), behavior: new OpenModalBehavior( modalBoxId, etherealChildren: new ModalBox( modalBoxId, true, new[] { "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi scelerisque venenatis mi id vehicula. Mauris iaculis tincidunt erat, sit amet fringilla magna porttitor a. Fusce a commodo felis. Phasellus sit amet augue quis dolor tincidunt tincidunt. Sed cursus vitae odio nec malesuada. Vestibulum odio lacus, auctor in facilisis ut, egestas eget lorem. Nam rutrum consequat orci, ac blandit purus interdum id. Aliquam sagittis massa sit amet nisl vestibulum fringilla.", "Suspendisse ut sagittis nunc. Maecenas tincidunt quam semper blandit sagittis. Sed consequat sollicitudin elementum. Curabitur pellentesque massa euismod, vestibulum mauris a, blandit leo. Aliquam fringilla lacinia diam, a commodo massa ultricies sit amet. Nullam et tincidunt ex, eget mattis quam. Nunc venenatis arcu a velit congue, nec tempus arcu egestas. Quisque magna dui, dignissim et libero id, efficitur convallis urna. Cras volutpat eget sapien sit amet rhoncus. Praesent eu metus eget urna imperdiet pretium. Nulla feugiat condimentum efficitur. Mauris aliquam scelerisque ex, ut blandit sem porttitor vitae.", "Vivamus dignissim quam eget hendrerit malesuada. Aenean aliquam risus at dui consequat luctus. Donec sollicitudin, elit quis pulvinar bibendum, urna magna facilisis nisi, ac tempor sem magna non enim. Vivamus porttitor dolor nulla, facilisis elementum neque euismod nec. Fusce sodales vitae enim at vulputate. Sed ut turpis pellentesque, iaculis turpis vitae, hendrerit metus. Sed posuere massa id quam gravida iaculis ac facilisis erat. Nullam ac risus at orci dictum bibendum. Nullam malesuada dui ut turpis volutpat, quis mollis orci iaculis. Quisque at eleifend urna, eget laoreet libero. Donec fringilla felis et ex rhoncus interdum. Cras semper semper eros, in gravida justo. Nullam vulputate, nulla et gravida fermentum, dui massa sodales leo, et ultricies purus quam et ex. Aliquam augue justo, ultricies ac nulla non, tristique convallis orci. Quisque feugiat eu quam quis feugiat.", "Fusce ornare ornare massa ut ullamcorper. Nunc commodo malesuada ante sed vulputate. Nam nec nulla sem. Quisque et cursus diam. Nullam vitae leo sed felis interdum pellentesque quis vel nisl. Sed cursus, tellus et ultrices pellentesque, lorem sem accumsan magna, eget imperdiet quam diam at sem. Ut diam ipsum, tristique non mauris et, aliquet accumsan justo. Pellentesque viverra tortor non eros consectetur pulvinar.", "Praesent suscipit nulla vitae fermentum elementum. Cras eu vehicula lectus, a luctus neque. In euismod congue sollicitudin. Ut fringilla massa ac orci blandit egestas. Aenean hendrerit ac leo ac interdum. Cras urna elit, rhoncus sit amet convallis sed, vulputate sed nisl. Nunc rutrum nunc quis dolor cursus pharetra. Mauris enim turpis, porttitor in mauris eu, consequat suscipit dolor. Donec tincidunt nisi et justo maximus, porttitor posuere odio placerat. Ut tempor justo eget lacus auctor, ut pharetra velit ullamcorper.", "Vivamus dignissim quam eget hendrerit malesuada. Aenean aliquam risus at dui consequat luctus. Donec sollicitudin, elit quis pulvinar bibendum, urna magna facilisis nisi, ac tempor sem magna non enim. Vivamus porttitor dolor nulla, facilisis elementum neque euismod nec. Fusce sodales vitae enim at vulputate. Sed ut turpis pellentesque, iaculis turpis vitae, hendrerit metus. Sed posuere massa id quam gravida iaculis ac facilisis erat. Nullam ac risus at orci dictum bibendum. Nullam malesuada dui ut turpis volutpat, quis mollis orci iaculis. Quisque at eleifend urna, eget laoreet libero. Donec fringilla felis et ex rhoncus interdum. Cras semper semper eros, in gravida justo. Nullam vulputate, nulla et gravida fermentum, dui massa sodales leo, et ultricies purus quam et ex. Aliquam augue justo, ultricies ac nulla non, tristique convallis orci. Quisque feugiat eu quam quis feugiat.", "Fusce ornare ornare massa ut ullamcorper. Nunc commodo malesuada ante sed vulputate. Nam nec nulla sem. Quisque et cursus diam. Nullam vitae leo sed felis interdum pellentesque quis vel nisl. Sed cursus, tellus et ultrices pellentesque, lorem sem accumsan magna, eget imperdiet quam diam at sem. Ut diam ipsum, tristique non mauris et, aliquet accumsan justo. Pellentesque viverra tortor non eros consectetur pulvinar.", "Praesent suscipit nulla vitae fermentum elementum. Cras eu vehicula lectus, a luctus neque. In euismod congue sollicitudin. Ut fringilla massa ac orci blandit egestas. Aenean hendrerit ac leo ac interdum. Cras urna elit, rhoncus sit amet convallis sed, vulputate sed nisl. Nunc rutrum nunc quis dolor cursus pharetra. Mauris enim turpis, porttitor in mauris eu, consequat suscipit dolor. Donec tincidunt nisi et justo maximus, porttitor posuere odio placerat. Ut tempor justo eget lacus auctor, ut pharetra velit ullamcorper." }.Select(i => new Paragraph(i.ToComponents())) .Materialize()).ToCollection())).ToCollection <FlowComponent>() .Append(new EwfHyperlink(Basic.ModalContent.GetInfo().ToHyperlinkModalBoxBehavior(), new ButtonHyperlinkStyle("Open browsing"))) .Append( new EwfButton( new StandardButtonStyle("Perform action with confirmation"), behavior: new ConfirmationButtonBehavior( new Paragraph( "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur lacinia et quam vel aliquam. Aliquam vel metus est. Donec finibus." .ToComponents()).ToCollection(), postBack: PostBack.CreateFull( id: "action1", modificationMethod: () => AddStatusMessage(StatusMessageType.Info, "Action performed."))))) .Select(i => i.ToCollection().ToComponentListItem().ToWrappingListItem()))); return(content); }
protected override void loadData() { var omni = FormItemList.CreateGrid(numberOfColumns: 7); var boxId = new ModalBoxId(); new ModalBox(boxId, true, "More information...".ToComponents()).ToCollection().AddEtherealControls(this); omni.AddFormItems( new TextControl("", true).ToFormItem( setup: new FormItemSetup(columnSpan: 2), label: "Model number ".ToComponents() .Append(new EwfButton(new StandardButtonStyle("(popup)", buttonSize: ButtonSize.ShrinkWrap), behavior: new OpenModalBehavior(boxId))) .Materialize()), "".ToComponents().ToFormItem(label: "Normal price".ToComponents()), new TextControl("", true).ToFormItem(label: "Actual price".ToComponents()), new TextControl("", true).ToFormItem(label: "Quantity".ToComponents()), "".ToComponents().ToFormItem(label: "Inventory".ToComponents()), "".ToComponents().ToFormItem(label: "Bill Number".ToComponents())); ph.AddControlsReturnThis(omni.ToCollection().GetControls()); }
void ControlTreeDataLoader.LoadData() { basicBody.Attributes.Add("onpagehide", "deactivateProcessingDialog();"); form.Action = EwfPage.Instance.InfoAsBaseType.GetUrl(); ph.AddControlsReturnThis( new NamingPlaceholder( EwfPage.Instance.StatusMessages.Any() && statusMessagesDisplayAsNotification() ? new Block { CssClass = notificationSpacerClass }.ToCollection() : Enumerable.Empty <Control>())); var warningLines = new List <IReadOnlyCollection <PhrasingComponent> >(); if (!ConfigurationStatics.IsLiveInstallation) { var components = new List <PhrasingComponent>(); components.Add(new FontAwesomeIcon("fa-exclamation-triangle", "fa-lg")); components.AddRange(" This is not the live system. Changes made here will be lost and are not recoverable. ".ToComponents()); if (ConfigurationStatics.IsIntermediateInstallation && AppRequestState.Instance.IntermediateUserExists) { components.AddRange( new EwfButton( new StandardButtonStyle("Log out", buttonSize: ButtonSize.ShrinkWrap), behavior: new PostBackBehavior( postBack: PostBack.CreateFull( id: "ewfIntermediateLogOut", firstModificationMethod: NonLiveInstallationStatics.ClearIntermediateAuthenticationCookie, actionGetter: () => new PostBackAction(new ExternalResourceInfo(NetTools.HomeUrl))))).Concat(" ".ToComponents())); } components.Add( new EwfButton( new StandardButtonStyle( "Hide this warning", buttonSize: ButtonSize.ShrinkWrap, icon: new ActionComponentIcon(new FontAwesomeIcon("fa-eye-slash"))), behavior: new PostBackBehavior( postBack: PostBack.CreateIntermediate( null, id: "ewfHideNonLiveWarnings", firstModificationMethod: NonLiveInstallationStatics.SetWarningsHiddenCookie)))); if (ConfigurationStatics.IsIntermediateInstallation && AppRequestState.Instance.IntermediateUserExists) { var boxId = new ModalBoxId(); components.AddRange( " ".ToComponents() .Append( new EwfButton( new StandardButtonStyle("Get link", buttonSize: ButtonSize.ShrinkWrap, icon: new ActionComponentIcon(new FontAwesomeIcon("fa-link"))), behavior: new OpenModalBehavior( boxId, etherealChildren: new ModalBox( boxId, true, FormItemList.CreateGrid( 1, items: new[] { false, true }.Select( i => { var url = AppRequestState.Instance.Url; if (AppRequestState.Instance.UserAccessible && AppRequestState.Instance.ImpersonatorExists) { url = SelectUser.GetInfo( url, optionalParameterPackage: new SelectUser.OptionalParameterPackage { User = AppTools.User.Email }) .GetUrl(); } url = IntermediateLogIn.GetInfo( url, new IntermediateLogIn.OptionalParameterPackage { Password = ConfigurationStatics.SystemGeneralProvider.IntermediateLogInPassword, HideWarnings = i }) .GetUrl(); return(new GenericPhrasingContainer( url.ToComponents(), classes: new ElementClass("ewfIntermediateUrl" /* This is used by EWF CSS files. */)).ToFormItem( label: i ? "Non-live warnings hidden:".ToComponents() : "Standard:".ToComponents())); }) .Materialize()) .ToCollection()).ToCollection())))); } warningLines.Add(components); } if (AppRequestState.Instance.UserAccessible && AppRequestState.Instance.ImpersonatorExists && (!ConfigurationStatics.IsIntermediateInstallation || AppRequestState.Instance.IntermediateUserExists)) { warningLines.Add( "User impersonation is in effect. ".ToComponents() .Append( new EwfHyperlink( SelectUser.GetInfo(AppRequestState.Instance.Url), new ButtonHyperlinkStyle("Change user", buttonSize: ButtonSize.ShrinkWrap))) .Concat(" ".ToComponents()) .Append( new EwfButton( new StandardButtonStyle("End impersonation", buttonSize: ButtonSize.ShrinkWrap), behavior: new PostBackBehavior( postBack: PostBack.CreateFull( id: "ewfEndImpersonation", firstModificationMethod: UserImpersonationStatics.EndImpersonation, actionGetter: () => new PostBackAction(new ExternalResourceInfo(NetTools.HomeUrl)))))) .Materialize()); } if (warningLines.Any()) { ph.AddControlsReturnThis( new GenericFlowContainer( warningLines.Aggregate((components, line) => components.Append(new LineBreak()).Concat(line).Materialize()), displaySetup: new DisplaySetup(ConfigurationStatics.IsLiveInstallation || !NonLiveInstallationStatics.WarningsHiddenCookieExists()), classes: topWarningContainerClass).ToCollection() .GetControls()); } // This is used by the EWF JavaScript file. const string clickBlockerId = "ewfClickBlocker"; ph2.AddControlsReturnThis( new Block { ClientIDMode = ClientIDMode.Static, ID = clickBlockerId, CssClass = clickBlockerInactiveClass }, new PlaceHolder().AddControlsReturnThis(getProcessingDialog().GetControls()), new NamingPlaceholder(getStatusMessageControl())); }
/// <summary> /// Creates a confirmation-dialog ID. /// </summary> public ConfirmationDialogId() { ModalBoxId = new ModalBoxId(); }
EntityUiSetup UiEntitySetup.GetUiSetup() { var one = new ModalBoxId(); var two = new ModalBoxId(); return(new EntityUiSetup( navActions: new HyperlinkSetup(new ExternalResource("http://www.microsoft.com"), "Go to Microsoft") .Append <ActionComponentSetup>(new ButtonSetup("Custom script", behavior: new CustomButtonBehavior(() => "alert('test');"))) .Append( new ButtonSetup( "Menu", behavior: new MenuButtonBehavior( new StackList( new EwfHyperlink(new ExternalResource("http://www.apple.com"), new StandardHyperlinkStyle("Apple")).ToComponentListItem() .Append( new EwfHyperlink(new ExternalResource("http://www.microsoft.com"), new StandardHyperlinkStyle("Microsoft")).ToComponentListItem()) .Append(new EwfHyperlink(new ExternalResource("http://www.google.com"), new StandardHyperlinkStyle("Google")).ToComponentListItem()) .Append( new EwfButton(new StandardButtonStyle("Custom script"), behavior: new CustomButtonBehavior(() => "alert('test!');")) .ToComponentListItem()) .Append( new EwfButton( new StandardButtonStyle("Modal"), behavior: new OpenModalBehavior( one, etherealChildren: new ModalBox( one, true, new Paragraph("This is a modal box!".ToComponents()).ToCollection()).ToCollection())) .ToComponentListItem())).ToCollection()))) .Append( new ButtonSetup( "Modal Window", behavior: new OpenModalBehavior( two, etherealChildren: new ModalBox( two, true, new EwfImage(new ImageSetup("Houses in the mountains"), new ExternalResource("http://r0k.us/graphics/kodak/kodak/kodim08.png")) .ToCollection()).ToCollection()))) .Materialize(), navFormControls: NavFormControl.CreateText( new NavFormControlSetup(100.ToPixels(), "Lookup!"), v => new NavFormControlValidationResult("Lookup '{0}' failed.".FormatWith(v))) .ToCollection(), actions: new ButtonSetup( "Delegate action", behavior: new PostBackBehavior( postBack: PostBack.CreateFull( id: "delegate", modificationMethod: () => PageBase.AddStatusMessage(StatusMessageType.Info, "Did Something.")))) .Append <ActionComponentSetup>( new HyperlinkSetup(new ExternalResource("http://www.google.com").ToHyperlinkNewTabBehavior(), "Go to Google in new window")) .Append( new ButtonSetup( "Generate error", behavior: new PostBackBehavior( postBack: PostBack.CreateFull(id: "error", modificationMethod: () => { throw new ApplicationException(); })))) .Materialize(), entitySummaryContent: new Paragraph( "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed quis semper dui. Aenean egestas dolor ac elementum lacinia. Vestibulum eget." .ToComponents()).ToCollection())); }