Ejemplo n.º 1
0
 public static MvcHtmlString UxCancelButton(this HtmlHelper helper, ButtonSize size = null, string clientId = null)
 {
     var button = new Button("Cancel", ButtonCommand.Cancel)
         .SetValidation(false)
         .SetSize(size);
     button.SetClientId(clientId);
     return UxButton(helper, button);
 }
Ejemplo n.º 2
0
 public static MvcHtmlString UxSaveButton(this HtmlHelper helper, ButtonSize size = null, string clientId = null)
 {
     var button = new Button("Save", ButtonCommand.Save, ButtonAppearanceType.Success)
         .SetIcon(new Icon(IconType.Check))
         .SetSize(size);
     button.SetClientId(clientId);
     return UxButton(helper, button);
 }
Ejemplo n.º 3
0
 public static MvcHtmlString UxDeleteButton(this HtmlHelper helper, ButtonSize size = null, string clientId = null)
 {
     var button = new Button("Delete", ButtonCommand.Delete)
         .SetValidation(false)
         .SetIcon(new Icon(IconType.TrashOutlined))
         .SetSize(size);
     button.SetClientId(clientId);
     return UxButton(helper, button);
 }
Ejemplo n.º 4
0
 public LinkButton(string text, string url, string target = null, ButtonAppearanceType appearance = null, ButtonSize size = null, IconType icon = null, IconPosition position = null, Popover popover = null, string clientId = null)
     : base("_LinkButton",clientId)
 {
     SetLink(text, url)
         .SetTarget(target)
         .SetAppearance(appearance)
         .SetIcon(icon, position)
         .SetSize(size)
         .SetPopover(popover);
 }
Ejemplo n.º 5
0
    public static MvcHtmlString UxButton(this HtmlHelper helper,
        string text,
        ButtonAppearanceType appearance = null,
        ButtonSize size = null,
        IconType iconType = null,
        IconPosition position = null,
        bool causesValidation = true,
        bool disabled = false,
        string loadingText = null,
        string clientId = null)
    {
        var button = new Button(text, ButtonCommand.None, appearance)
            .SetSize(size)
            .SetValidation(causesValidation)
            .SetDisabled(disabled)
            .SetLoadingText(loadingText);

        button.SetClientId(clientId);

        if (iconType!=null)
            button.SetIcon(new Icon(iconType), position);

        return UxButton(helper, button);
    }
Ejemplo n.º 6
0
 public static MvcHtmlString UxLinkButton(this HtmlHelper helper, string text, string url, string target = null, ButtonAppearanceType appearance = null, ButtonSize size = null, IconType icon = null, IconPosition iconPosition = null, Popover popover = null, string clientId = null)
 {
     var link = new LinkButton(text, url, target, appearance, size, icon, iconPosition, popover,clientId);
     return helper.RenderUxControl(link);
 }
Ejemplo n.º 7
0
 public LinkButton SetSize(ButtonSize size)
 {
     Size = size ?? ButtonSize.Default;
     return this;
 }