Popup
Popup Content
The content of Popup can be set with elements wrapped in a regular HTML tag or text tag (Razor syntax).
Features
Description
The content of Popup can be set with elements wrapped in a regular HTML tag or text tag (Razor syntax).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace MvcExplorer.Controllers { public partial class PopupController : Controller { public ActionResult Content() { return View(); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | @section Styles{ < style > .btn { height: auto; } .popover { display: block; } .tab-content > .tab-pane { display: block; } </ style > } < label > @Html .Raw(Resources.Popup.Content_PopupContents)</ label >< br /> <!-- The popup owners. --> < button id = "btn1" type = "button" class = "btn btn-default" > @Html .Raw(Resources.Popup.Content_ClickToShowPopupForm) < br > < small > @Html .Raw(Resources.Popup.Content_Description1)</ small > </ button > < button id = "btn2" type = "button" class = "btn btn-default" > @Html .Raw(Resources.Popup.Content_ClickToShowPopupForm) < br > < small > @Html .Raw(Resources.Popup.Content_Description2)</ small > </ button > <!-- Create popup controls with HtmlHelper. --> @ (Html.C1().Popup().Content( @<div class = "popover-content" > @Html .Raw(Resources.Popup.Content_Content1) </ div > ).Owner( "#btn1" ).FadeIn( false )) @ (Html.C1().Popup().Content( @<text> < h3 class = "popover-title" > @Html .Raw(Resources.Popup.Content_Title) </ h3 > < div class = "popover-content " > < form name = "popoverForm" > < p > @Html .Raw(Resources.Popup.Content_Text0)</ p > < div class = "form-group" > @ (Html.C1().InputDate().Value(DateTime.Now).Format( "d" )) </ div > < div class = "form-group" > @ (Html.C1().InputTime().Value(DateTime.Now).Format( "t" )) </ div > < div class = "form-actions" > < button type = "button" class = "btn btn-danger wj-hide" > @Html .Raw(Resources.Popup.Content_Close)</ button > < button type = "button" class = "btn btn-primary wj-hide" > @Html .Raw(Resources.Popup.Content_SaveChanges)</ button > </ div > </ form > </ div > </ text >).CssClass( "popover" ).CssStyle( "display" , "none" ) .Owner( "#btn2" ).FadeIn( false ).HideTrigger(PopupTrigger.None)) @section Description{ @Html .Raw(Resources.Popup.Content_Text1) } |