コード例 #1
0
        public static MvcHtmlString JQM_LinkPopup(this HtmlHelper htmlHelper, string name, string text, string href = null, Enums.IconType?icon = null, Enums.PositionType?iconPosition = null, PopupConfig popupConfig = null)
        {
            LinkConfig config = new LinkConfig(name, text)
            {
                Rel          = Enums.RelType.Popup,
                Href         = href,
                Icon         = icon,
                IconPosition = iconPosition,
                PopupConfig  = popupConfig
            };

            return(JQM_Button(htmlHelper, config));
        }
コード例 #2
0
        public static MvcHtmlString JQM_LinkHelper(this HtmlHelper htmlHelper, string name, string text, string href, string action, string controller, object objectRoute, SpongeSolutions.Core.Extension.Enums.RelType?rel, Enums.IconType?icon, Enums.PositionType?iconPosition = Enums.PositionType.Left)
        {
            if (!string.IsNullOrEmpty(action) || !string.IsNullOrEmpty(controller))
            {
                UrlHelper urlHelper = new UrlHelper(htmlHelper.ViewContext.RequestContext);
                href = urlHelper.Action(action, controller, objectRoute);
            }

            if (string.IsNullOrEmpty(href))
            {
                href = "#";
            }

            LinkConfig config = new LinkConfig(name, text)
            {
                Rel          = rel,
                Icon         = icon,
                IconPosition = iconPosition,
                Href         = href
            };

            return(JQM_Button(htmlHelper, config));
        }