Пример #1
0
        public void BeginAccordion(Accordion accordion)
        {
            uiProvider.Scripts.Add(string.Format(
                                       @"$('#{0}').kendoPanelBar({{
    expandMode: 'single'
}});", accordion.Id));
        }
Пример #2
0
        public AccordionBuilder <TModel> Begin(Accordion accordion)
        {
            if (accordion == null)
            {
                throw new ArgumentNullException("accordion");
            }

            return(new AccordionBuilder <TModel>(this.html, accordion));
        }
Пример #3
0
        public void BeginAccordion(Accordion accordion, TextWriter writer)
        {
            accordion.EnsureClass("panel-group");
            accordion.EnsureHtmlAttribute("role", "tablist");
            accordion.EnsureHtmlAttribute("aria-multiselectable", "true");

            var builder = new TagBuilder("div");

            builder.MergeAttributes <string, object>(accordion.HtmlAttributes);
            string tag = builder.ToString(TagRenderMode.StartTag);

            writer.Write(tag);
        }
Пример #4
0
        public void BeginAccordion(Accordion accordion, TextWriter writer)
        {
            uiProvider.Scripts.Add(string.Format(
                                       @"$('#{0}').kendoPanelBar({{
    expandMode: 'single'
}});", accordion.Id));

            var builder = new TagBuilder("ul");

            builder.MergeAttributes <string, object>(accordion.HtmlAttributes);
            string tag = builder.ToString(TagRenderMode.StartTag);

            writer.Write(tag);
        }
Пример #5
0
 public void EndAccordion(Accordion accordion, TextWriter writer)
 {
     writer.Write("</ul>");
 }
Пример #6
0
 public void BeginAccordion(Accordion accordion)
 {
     accordion.EnsureClass("panel-group");
     accordion.EnsureHtmlAttribute("role", "tablist");
     accordion.EnsureHtmlAttribute("aria-multiselectable", "true");
 }
Пример #7
0
 internal AccordionBuilder(HtmlHelper <TModel> htmlHelper, Accordion accordion)
     : base(htmlHelper, accordion)
 {
 }