Esempio n. 1
0
        /// <summary>
        /// Turns modal to a message box with the specified color.
        /// </summary>
        /// <param name="modalBase">The modal instance that this method extends.</param>
        /// <param name="color">The color of the modal.</param>
        /// <returns>Current component.</returns>
        public static ModalBase Message(this ModalBase modalBase, BootstrapColorBase color)
        {
            modalBase.AddCssClass("modal-message");
            modalBase.AddCssClass(string.Format("{0}-{1}", modalBase.GetBaseClass(), color));

            return(modalBase);
        }
Esempio n. 2
0
        /// <summary>
        /// Changes the color of the popover title.
        /// </summary>
        /// <param name="popover">The popover instance that this method extends.</param>
        /// <param name="color">The value of the color.</param>
        /// <returns>Current component.</returns>
        public static PopoverBase TitleColor(this PopoverBase popover, BootstrapColorBase color)
        {
            var value = popover.GetAttribute("data-titleclass");

            value = string.Join(" ", value, color);
            popover.SetAttribute("data-titleclass", value);

            return(popover);
        }
Esempio n. 3
0
        /// <summary>
        /// Changes the background color of the popover content.
        /// </summary>
        /// <param name="popover">The popover instance that this method extends.</param>
        /// <param name="color">The value of the color.</param>
        /// <returns>Current component.</returns>
        public static PopoverBase ContentBackgroundColor(this PopoverBase popover, BootstrapColorBase color)
        {
            var value = popover.GetAttribute("data-titleclass");

            value = string.Join(" ", value, string.Format("bg-{0}", color));

            popover.SetAttribute("data-class", value);

            return(popover);
        }
Esempio n. 4
0
        /// <summary>
        /// Sets the color of the tab panel.
        /// </summary>
        /// <param name="color">The value of color.</param>
        /// <returns>Current component.</returns>
        public YimaTabPanel Color(BootstrapColorBase color)
        {
            _color = color;
            if (TitleValue != null)
            {
                TitleValue.Color(_color);
            }
            if (ContentValue != null)
            {
                ContentValue.Color(_color);
            }

            return(this);
        }
Esempio n. 5
0
        /// <summary>
        /// Sets the color of the tab panel content.
        /// </summary>
        /// <param name="tabPanelContentBase">The tab panel content instance that this method extends.</param>
        /// <param name="color">The value of the color.</param>
        /// <returns>Current component.</returns>
        public static TabPanelContentBase Color(this TabPanelContentBase tabPanelContentBase, BootstrapColorBase color)
        {
            tabPanelContentBase.AddCssClass(string.Format("tab-pane-{0}", color));

            return(tabPanelContentBase);
        }
Esempio n. 6
0
        /// <summary>
        /// Changes the background color of the text box.
        /// </summary>
        /// <param name="textBoxBase">The text box instance that this method extends.</param>
        /// <param name="color">The value of the color.</param>
        /// <returns>Current component.</returns>
        public static FormTextBoxBase Background(this FormTextBoxBase textBoxBase, BootstrapColorBase color)
        {
            textBoxBase.AddCssClass(string.Format("bg-{0}", color));

            return(textBoxBase);
        }
Esempio n. 7
0
        /// <summary>
        /// Sets the color of the switch.
        /// </summary>
        /// <param name="color">The value of the color.</param>
        /// <returns>Current component.</returns>
        public virtual YimaSwitch Color(BootstrapColorBase color)
        {
            AddCssClass(string.Format("switch-{0}", color));

            return(this);
        }
Esempio n. 8
0
        /// <summary>
        /// Changes the button to a tooltip with the specified value, placement, and color.
        /// </summary>
        /// <param name="button">The button instance that this method extends.</param>
        /// <param name="tooltip">The value of the tooltip.</param>
        /// <param name="placement">The placement of the tooltip.</param>
        /// <param name="color">The color of the tooltip.</param>
        /// <returns>Current component.</returns>
        public static ButtonBase Tooltip(this ButtonBase button, string tooltip, BootstrapTooltipPlacementType placement, BootstrapColorBase color)
        {
            button.AddCssClass(string.Format("tooltip-{0}", color));
            button.Tooltip(tooltip, placement);

            return(button);
        }
Esempio n. 9
0
        /// <summary>
        /// Sets the color of the modal header.
        /// </summary>
        /// <param name="modalHeaderBase">The modal header instance that this method extends.</param>
        /// <param name="color">The color of the modal header.</param>
        /// <returns>Current component.</returns>
        public static ModalHeaderBase Color(this ModalHeaderBase modalHeaderBase, BootstrapColorBase color)
        {
            modalHeaderBase.AddCssClass(string.Format("header-{0}", color));

            return(modalHeaderBase);
        }
Esempio n. 10
0
        /// <summary>
        /// Sets the color for the check box.
        /// </summary>
        /// <param name="formCheckBox">The form check box instance that this method extends.</param>
        /// <param name="color">The value of the color.</param>
        /// <returns>Current component.</returns>
        public static FormCheckBoxBase Color(this FormCheckBoxBase formCheckBox, BootstrapColorBase color)
        {
            formCheckBox.AddCssClass(string.Format("checkbox-{0}", color));

            return(formCheckBox);
        }
Esempio n. 11
0
        /// <summary>
        /// Sets the color for the radio button.
        /// </summary>
        /// <param name="formRadioButton">The form radio button instance that this method extends.</param>
        /// <param name="color">The value of the color.</param>
        /// <returns>Current component.</returns>
        public static FormRadioButtonBase Color(this FormRadioButtonBase formRadioButton, BootstrapColorBase color)
        {
            formRadioButton.AddCssClass(string.Format("radio-{0}", color));

            return(formRadioButton);
        }
Esempio n. 12
0
        /// <summary>
        /// Changes the color of the bootstrap accordion panel.
        /// </summary>
        /// <param name="accordionPanel">The accordion panel instance that this method extends.</param>
        /// <param name="color">The value of the color.</param>
        /// <returns>Current component.</returns>
        public static AccordionPanelBase Color(this AccordionPanelBase accordionPanel, BootstrapColorBase color)
        {
            ColorHelper.Color(accordionPanel, color);

            return(accordionPanel);
        }