Exemplo n.º 1
0
        private static void MakeList()
        {
            jQuery row = new jQuery("<div>").AddClass("row");

            jQuery col1 = new jQuery("<div>").AddClass("col-sm-3").AppendTo(row);
            jQuery col2 = new jQuery("<div>").AddClass("col-sm-9").AppendTo(row);

            row.Get(0).Style.Padding = "20px";

            AccordionPanel p = AccordionPanel.Make("Sharp THREEjs", "(jus a try out :)", "myID", PanelType.panel_default);

            foreach (KeyValuePair <string, List <BaseDemo> > kvp in Demos)
            {
                ListMaker m = new ListMaker();
                foreach (BaseDemo d in kvp.Value)
                {
                    m.AddListItem(d.DemoName, clickDemo, d);
                }

                p.AddPanel(kvp.Key, m.List);
            }

            col1.Append(p.MainContainer);

            row.AppendTo(Document.Body);

            DemoContainer = col2.Get(0);
        }
Exemplo n.º 2
0
        public static AccordionPanel Make(string headerText, string subtext, string id, PanelType type)
        {
            AccordionPanel accor = new AccordionPanel();

            accor.id    = id;
            accor.PType = type;

            jQuery c = new jQuery("<div>");

            if (!string.IsNullOrEmpty(headerText))
            {
                c.Append(new jQuery("<h2>").Html(headerText));
            }

            if (!string.IsNullOrEmpty(subtext))
            {
                c.Append(new jQuery("<h4>").Html(subtext));
            }

            accor.PanelGroup = new jQuery("<div>").AddClass("panel-group").Attr("id", id);

            c.Append(accor.PanelGroup);


            accor.MainContainer = c;

            return(accor);
        }
Exemplo n.º 3
0
        public static AccordionPanel Make(string headerText, string subtext, string id, PanelType type)
        {
            AccordionPanel accor = new AccordionPanel();
            accor.id = id;
            accor.PType = type;

            jQuery c = new jQuery("<div>");
            if (!string.IsNullOrEmpty(headerText))
                c.Append(new jQuery("<h2>").Html(headerText));

            if (!string.IsNullOrEmpty(subtext))
                c.Append(new jQuery("<h4>").Html(subtext));

            accor.PanelGroup = new jQuery("<div>").AddClass("panel-group").Attr("id", id);

            c.Append(accor.PanelGroup);

            accor.MainContainer = c;

            return accor;
        }