namespace Framework.Json.Bootstrap { using Framework.DataAccessLayer; using System.Collections.Generic; public class BootstrapContainer : Div { public BootstrapContainer(ComponentJson owner) : base(owner) { CssClass = "container"; } } public class BootstrapRow : DivContainer { public BootstrapRow(ComponentJson owner) : base(owner) { CssClass = "row"; } } public class BootstrapCol : Div { public BootstrapCol(BootstrapRow owner) : base(owner) { CssClass = "col"; } public new BootstrapRow Owner { get { return (BootstrapRow)base.Owner; } } } /// /// See also: https://getbootstrap.com/docs/4.1/components/navbar/ /// Change background color with style "background-color: red !important". /// public class BootstrapNavbar : ComponentJson { public BootstrapNavbar(ComponentJson owner) : base(owner, nameof(BootstrapNavbar)) { } /// /// Gets or sets TextHtml. Rendered by Angular as innerHtml. /// public string BrandTextHtml; /// /// Gets or sets GridIndexList. Data grid row should have a field "Text" and "ParentId" for hierarchical navigation. /// public List GridIndexList = new List(); // Empty list is removed by json serializer. [Serialize(SerializeEnum.Session)] internal List GridList = new List(); /// /// Add data grid to Navbar. /// /// Data grid with Id, ParentId and TextHtml columns. /// If true, currently selected row is shown on top as drop down button. Used for example for language switch. public void GridAdd(Grid grid, bool isSelectMode = false) { GridList.Add(new BootstrapNavbarGrid { Grid = grid, IsSelectMode = isSelectMode }); } internal List ButtonList; /// /// Returns TextHtml to display in navbar button. /// protected virtual internal void ButtonTextHtml(BootstrapNavbarButtonArgs args, BootstrapNavbarButtonResult result) { } /*