Beispiel #1
0
        private WebControl getIconButton()
        {
            var icon  = new FontAwesomeIcon("fa-calendar", "datepickerIcon");
            var style = new CustomActionControlStyle(control => control.AddControlsReturnThis(icon));

            return(new CustomButton(() => "$( '#{0}' ).datepicker( 'show' )".FormatWith(textBox.TextBoxClientId))
            {
                ActionControlStyle = style, CssClass = "icon"
            });
        }
        private WebControl getIconButton()
        {
            var icon = new LiteralControl {
                Text = @"<i class=""{0}""></i>".FormatWith("fa fa-clock-o timepickerIcon")
            };
            var style = new CustomActionControlStyle(control => control.AddControlsReturnThis(icon));

            return(new CustomButton(() => "$( '#{0}' ).timepicker( 'show' )".FormatWith(textBox.TextBoxClientId))
            {
                ActionControlStyle = style, CssClass = "icon"
            });
        }
Beispiel #3
0
        private WebControl getIconButton()
        {
            var parent = new EwfLabel {
                CssClass = "fa-stack datetimepickerIcon"
            };
            var iconCal  = new FontAwesomeIcon("fa-calendar-o", "fa-stack-2x");
            var iconTime = new FontAwesomeIcon("fa-clock-o", "fa-stack-1x");

            iconTime.Style.Add(HtmlTextWriterStyle.Position, "relative");
            iconTime.Style.Add(HtmlTextWriterStyle.Top, ".20em");
            parent.AddControlsReturnThis(iconCal, iconTime);

            var style = new CustomActionControlStyle(control => control.AddControlsReturnThis(parent));

            return(new CustomButton(() => "$( '#{0}' ).datetimepicker( 'show' )".FormatWith(textBox.TextBoxClientId))
            {
                ActionControlStyle = style,
                CssClass = "icon"
            });
        }
        private WebControl getIconButton()
        {
            var parent = new HtmlGenericControl("span");

            parent.Attributes["class"] = "fa-stack datetimepickerIcon";
            var iconCal = new LiteralControl {
                Text = @"<i class=""{0}""></i>".FormatWith("fa fa-calendar-o fa-stack-2x")
            };
            var iconTime = new LiteralControl
            {
                Text = @"<i class=""{0}"" style=""{1}""></i>".FormatWith("fa fa-clock-o fa-stack-1x", "position:relative; top: .20em")
            };

            parent.AddControlsReturnThis(iconCal, iconTime);

            var style = new CustomActionControlStyle(control => control.AddControlsReturnThis(parent));

            return(new CustomButton(() => "$( '#{0}' ).datetimepicker( 'show' )".FormatWith(textBox.TextBoxClientId))
            {
                ActionControlStyle = style,
                CssClass = "icon"
            });
        }