public static ComponentBuilder <TConfig, MediaObject> SetAlt <TConfig>(this ComponentBuilder <TConfig, MediaObject> builder, string alt)
     where TConfig : BootstrapConfig
 {
     builder.Component.Alt = alt;
     return(builder);
 }
 public static ComponentBuilder <TConfig, Navbar> SetFluid <TConfig>(this ComponentBuilder <TConfig, Navbar> builder, bool fluid = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.Fluid = fluid;
     return(builder);
 }
 public static ComponentBuilder <TConfig, Navbar> SetInverse <TConfig>(this ComponentBuilder <TConfig, Navbar> builder, bool inverse = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.ToggleCss(Css.NavbarInverse, inverse);
     return(builder);
 }
 public static ComponentBuilder <MvcBootstrapConfig <TModel>, Pagination> AddPage <TModel>(
     this ComponentBuilder <MvcBootstrapConfig <TModel>, Pagination> builder, string actionName, string controllerName, object routeValues = null, bool active = false, bool disabled = false)
 {
     builder.AddChild(x => x.PageNum((++builder.GetComponent().AutoPageNumber).ToString(), actionName, controllerName, routeValues).SetActive(active).SetDisabled(disabled));
     return(builder);
 }
 public static ComponentBuilder <TConfig, NavbarLink> SetActive <TConfig>(this ComponentBuilder <TConfig, NavbarLink> builder, bool active = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.Active = active;
     return(builder);
 }
예제 #6
0
 public static ComponentBuilder <TConfig, Page> SetAlignment <TConfig>(this ComponentBuilder <TConfig, Page> builder, PageAlignment alignment)
     where TConfig : BootstrapConfig
 {
     builder.Component.Alignment = alignment;
     return(builder);
 }
 public static ComponentBuilder <MvcBootstrapConfig <TModel>, Pager> AddPage <TModel>(
     this ComponentBuilder <MvcBootstrapConfig <TModel>, Pager> builder, string text, string actionName, string controllerName, object routeValues = null, bool disabled = false)
 {
     builder.AddChild(x => x.Page(text, actionName, controllerName, routeValues).SetDisabled(disabled));
     return(builder);
 }
예제 #8
0
 public static ComponentBuilder <TConfig, ButtonGroup> SetSize <TConfig>(this ComponentBuilder <TConfig, ButtonGroup> builder, ButtonGroupSize size)
     where TConfig : BootstrapConfig
 {
     builder.Component.ToggleCss(size);
     return(builder);
 }
예제 #9
0
 public static ComponentBuilder <TConfig, ButtonGroup> SetJustified <TConfig>(this ComponentBuilder <TConfig, ButtonGroup> builder, bool justified = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.ToggleCss(Css.BtnGroupJustified, justified);
     return(builder);
 }
예제 #10
0
 public static ComponentBuilder <TConfig, Pagination> AddNext <TConfig>(this ComponentBuilder <TConfig, Pagination> builder, string href = "#", bool active = false, bool disabled = false)
     where TConfig : BootstrapConfig
 {
     builder.AddChild(x => x.PageNum("&raquo;", href).SetActive(active).SetDisabled(disabled));
     return(builder);
 }
예제 #11
0
 public static ComponentBuilder <TConfig, LinkButton> SetDisabled <TConfig>(this ComponentBuilder <TConfig, LinkButton> builder, bool disabled = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.ToggleCss(Css.Disabled, disabled);
     return(builder);
 }
 public static ComponentBuilder <TConfig, MediaBody> SetHeading <TConfig>(this ComponentBuilder <TConfig, MediaBody> builder, string heading)
     where TConfig : BootstrapConfig
 {
     builder.Component.Heading = heading;
     return(builder);
 }
 public static ComponentBuilder <TConfig, MediaObject> SetBottom <TConfig>(this ComponentBuilder <TConfig, MediaObject> builder, bool bottom = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.ToggleCss(Css.MediaBottom, bottom, Css.MediaMiddle);
     return(builder);
 }
 public static ComponentBuilder <TConfig, MediaObject> SetRight <TConfig>(this ComponentBuilder <TConfig, MediaObject> builder, bool right = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.ToggleCss(Css.MediaRight, right, Css.MediaLeft);
     return(builder);
 }
 public static ComponentBuilder <TConfig, TTag> SetXsPull <TConfig, TTag>(this ComponentBuilder <TConfig, TTag> builder, int?value)
     where TConfig : BootstrapConfig
     where TTag : Tag, IHasGridColumnExtensions
 {
     return(SetColumnClass(builder, "col-xs-pull-", value));
 }
예제 #16
0
 public static ComponentBuilder <TConfig, ButtonDropdown> SetSplit <TConfig>(this ComponentBuilder <TConfig, ButtonDropdown> builder, bool split = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.Split = split;
     return(builder);
 }
예제 #17
0
 public static ComponentBuilder <TConfig, Pager> AddPage <TConfig>(this ComponentBuilder <TConfig, Pager> builder, string text, string href = "#", bool disabled = false)
     where TConfig : BootstrapConfig
 {
     builder.AddChild(x => x.Page(text, href).SetDisabled(disabled));
     return(builder);
 }
예제 #18
0
 public static ComponentBuilder <TConfig, ButtonDropdown> SetDropup <TConfig>(this ComponentBuilder <TConfig, ButtonDropdown> builder, bool dropup = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.Dropup = dropup;
     return(builder);
 }
 public static ComponentBuilder <TConfig, NavbarToggle> SetHamburger <TConfig>(this ComponentBuilder <TConfig, NavbarToggle> builder, bool hamburger = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.Hamburger = hamburger;
     return(builder);
 }
예제 #20
0
        public static ComponentBuilder <MvcBootstrapConfig <TModel>, FormControlListFor <TModel, TValue> > EditorOrDisplayListFor <TComponent, TModel, TValue>(
            this BootstrapHelper <MvcBootstrapConfig <TModel>, TComponent> helper, bool editor, Expression <Func <TModel, IEnumerable <TValue> > > expression,
            ListType listType = ListType.Unstyled, bool addDescription = true, bool addValidationMessage = true, string templateName = null, object additionalViewData = null, bool addHidden = true)
            where TComponent : Component, ICanCreate <FormControl>
        {
            ComponentBuilder <MvcBootstrapConfig <TModel>, FormControlListFor <TModel, TValue> > builder =
                new ComponentBuilder <MvcBootstrapConfig <TModel>, FormControlListFor <TModel, TValue> >(helper.GetConfig(), new FormControlListFor <TModel, TValue>(helper, editor, expression, listType))
                .AddHidden(addHidden)
                .AddDescription(addDescription)
                .AddValidationMessage(addValidationMessage)
                .SetTemplateName(templateName)
                .AddAdditionalViewData(additionalViewData);

            builder.GetComponent().Label = GetControlLabel(helper, expression).GetComponent();
            return(builder);
        }
예제 #21
0
        // Pagination

        public static ComponentBuilder <MvcBootstrapConfig <TModel>, Pagination> AddPrevious <TModel>(
            this ComponentBuilder <MvcBootstrapConfig <TModel>, Pagination> builder, string actionName, string controllerName, object routeValues = null, bool active = false, bool disabled = false)
        {
            builder.AddChild(x => x.PageNum("&laquo;", actionName, controllerName, routeValues).SetActive(active).SetDisabled(disabled));
            return(builder);
        }
예제 #22
0
 public static ComponentBuilder <TConfig, Pagination> SetSize <TConfig>(this ComponentBuilder <TConfig, Pagination> builder, PaginationSize size)
     where TConfig : BootstrapConfig
 {
     builder.Component.ToggleCss(size);
     return(builder);
 }
예제 #23
0
 public static ComponentBuilder <TConfig, Label> SetState <TConfig>(this ComponentBuilder <TConfig, Label> builder, LabelState state)
     where TConfig : BootstrapConfig
 {
     builder.Component.ToggleCss(state);
     return(builder);
 }
예제 #24
0
 public static ComponentBuilder <TConfig, Pagination> AddPage <TConfig>(this ComponentBuilder <TConfig, Pagination> builder, string href = "#", bool active = false, bool disabled = false)
     where TConfig : BootstrapConfig
 {
     builder.AddChild(x => x.PageNum((++builder.Component.AutoPageNumber).ToString(), href).SetActive(active).SetDisabled(disabled));
     return(builder);
 }
 public static ComponentBuilder <TConfig, NavbarLink> SetDisabled <TConfig>(this ComponentBuilder <TConfig, NavbarLink> builder, bool disabled = true)
     where TConfig : BootstrapConfig
 {
     builder.Component.Disabled = disabled;
     return(builder);
 }
예제 #26
0
 public static ComponentBuilder <TConfig, Pagination> AddPages <TConfig>(this ComponentBuilder <TConfig, Pagination> builder, IEnumerable <string> hrefs, int?activePageNumber = null, int?firstPageNumber = null)
     where TConfig : BootstrapConfig
 {
     return(builder.AddPages(hrefs.Select(x => new KeyValuePair <string, string>(null, x)), activePageNumber, firstPageNumber));
 }
 public static ComponentBuilder <TConfig, Navbar> SetPosition <TConfig>(this ComponentBuilder <TConfig, Navbar> builder, NavbarPosition position)
     where TConfig : BootstrapConfig
 {
     builder.Component.ToggleCss(position);
     return(builder);
 }
 private static ComponentBuilder <TConfig, TTag> SetColumnClass <TConfig, TTag>(ComponentBuilder <TConfig, TTag> builder, string prefix, int?value)
     where TConfig : BootstrapConfig
     where TTag : Tag, IHasGridColumnExtensions
 {
     builder.Component.SetColumnClass(builder.Config, prefix, value);
     return(builder);
 }
 public static ComponentBuilder <TConfig, NavbarToggle> SetDataTarget <TConfig>(this ComponentBuilder <TConfig, NavbarToggle> builder, string dataTarget)
     where TConfig : BootstrapConfig
 {
     builder.Component.DataTarget = dataTarget;
     return(builder);
 }
 public static ComponentBuilder <TConfig, MediaObject> SetSrc <TConfig>(this ComponentBuilder <TConfig, MediaObject> builder, string src)
     where TConfig : BootstrapConfig
 {
     builder.Component.Src = src;
     return(builder);
 }