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); }
public static jQuery CreateRadioInput(string id, string label, string[] options) { jQuery divRadio = new jQuery("<div>"); divRadio.AddClass("col-sm-10"); for (int i = 0; i < options.Length; i++) { divRadio .Append(new jQuery("<label>") .AddClass("radio-inline") .Append(new InputElement { Type = InputType.Radio, Id = id + "-" + i, Name = id, Value = options[i] }) .Append(options[i]) ); } return new jQuery("<div>") .AddClass("form-group") .Append(new LabelElement { ClassName = "control-label col-sm-2", HtmlFor = id, InnerHTML = label + ":" }) .Append(divRadio); }
public jQuery AddListItem( string text , Action<jQueryEvent> clickHandler, object tag) { jQuery li = new jQuery("<li>").AddClass("list-group-item").Html(text); li.Click(tag, clickHandler); List.Append(li); return li; }
public Area(string selection) { jquery = jQuery.Select(selection); // create properties mMargin = new Margin(jquery); mHeight = new Height(jquery); mOuterHeight = new OuterHeight(jquery, mHeight); updateCss = true; }
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; }
public static void CreateForm(jQuery container, Form template) { foreach (FormField field in template.Fields) { container.Append(App.CreateFormField(field)); } container.Append(new jQuery("<div>") .AddClass("form-group") .Append(new jQuery("<div>") .AddClass("col-sm-offset-2 col-sm-10") .Append(new jQuery(new InputElement { Type = InputType.Submit, Value = "Submit", ClassName = "btn btn-primary", FormAction = SUBMIT_URL, FormMethod = "POST" })) ) ); }
/// <summary> /// Reduce the set of matched elements to those that match the selector or pass the function's test. /// </summary> /// <param name="selection">An existing jQuery object to match the current set of elements against.</param> /// <returns></returns> public virtual jQuery Filter(jQuery selection) { return(null); }
void MakeComboBox() { jQuery dd = new jQuery("<div>").AddClass("dropdown").Attr("id","dropDown"); dropDownButton = new jQuery("<button>").AddClass("btn btn-primary dropdown-toggle"). Attr("id", "dropDownButton"). Attr("type", "button"). Attr("data-toggle", "dropdown"). Html("Choose geometry ").AppendTo(dd); new jQuery("<span>").AddClass("caret").AppendTo(dropDownButton); jQuery ul = new jQuery("<ul>").AddClass("dropdown-menu"). Attr("role", "menu"). Attr("aria-labelledby", "dropDownButton"). AppendTo(dd); foreach (GeometryFunction kvp in functions) { jQuery il = new jQuery("<li>").Attr("role", "presentation"); jQuery a = new jQuery("<a>"). Attr("tabindex", "-1"). Attr("tabindex", "-1"). Attr("href", "#").Html(kvp.name).AppendTo(il); il.AppendTo(ul); il.Click(kvp, (Action<jQueryEvent>)this.listClick); } dd.AppendTo(Container); }
/// <summary> /// Replace each target element with the set of matched elements. /// </summary> /// <param name="target">A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace.</param> /// <returns></returns> public virtual jQuery ReplaceAll(jQuery target) { return null; }
/// <summary> /// For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. /// </summary> /// <param name="selection">A jQuery object to match elements against.</param> /// <returns></returns> public virtual jQuery Closest(jQuery selection) { return null; }
/// <summary> /// Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. /// </summary> /// <param name="element">A DOM node or jQuery object indicating where to stop matching following sibling elements.</param> /// <returns></returns> public virtual jQuery PrevUntil(jQuery element) { return null; }
/// <summary> /// Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. /// </summary> /// <param name="newContent">The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.</param> /// <returns></returns> public virtual jQuery ReplaceWith(jQuery newContent) { return(null); }
public static jQuery Element(jQuery element) { return null; }
public static jQuery Select(string selector, jQuery context) { return null; }
private jQuery MakeList() { jQuery ul = new jQuery("<ul>").AddClass("list-group"); return ul; }
public ListMaker() { List = MakeList(); }
private jQuery MakePanelTitle(string title, string href, string dataParent, Action<jQueryEvent> clickHandler, object panelTag) { jQuery panelHeading = new jQuery("<div>").AddClass("panel-heading"); jQuery panelTitle = new jQuery("<h4>").AddClass("panel-title"); jQuery panelAcoordion = new jQuery("<a>").Attr("data-toggle", "collapse").Attr("data-parent",dataParent ).Attr("href", href).Html(title); if (clickHandler != null) panelAcoordion.Click(panelTag, clickHandler); panelTitle.Append(panelAcoordion); panelHeading.Append(panelTitle); return panelHeading; }
/// <summary> /// Insert content, specified by the parameter, after each element in the set of matched elements. /// </summary> /// <param name="content">DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.</param> /// <param name="content2">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.</param> /// <returns></returns> public virtual jQuery After(string content, jQuery content2) { return null; }
/// <summary> /// Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. /// </summary> /// <param name="selection">An existing jQuery object to match the current set of elements against.</param> /// <returns></returns> public virtual bool Is(jQuery selection) { return false; }
/// <summary> /// Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. /// </summary> /// <param name="element">A DOM node or jQuery object indicating where to stop matching following sibling elements.</param> /// <returns></returns> public virtual jQuery NextUntil(jQuery element) { return null; }
/// <summary> /// Wrap an HTML structure around each element in the set of matched elements. /// </summary> /// <param name="wrappingElement">A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.</param> /// <returns></returns> public virtual jQuery Wrap(jQuery wrappingElement) { return null; }
/// <summary> /// Replace each target element with the set of matched elements. /// </summary> /// <param name="target">A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace.</param> /// <returns></returns> public virtual jQuery ReplaceAll(jQuery target) { return(null); }
/// <summary> /// Insert content, specified by the parameter, after each element in the set of matched elements. /// </summary> /// <param name="content">DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.</param> /// <param name="content2">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.</param> /// <returns></returns> public virtual jQuery After(jQuery content, Element content2) { return null; }
/// <summary> /// Insert content, specified by the parameter, after each element in the set of matched elements. /// </summary> /// <param name="content">DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.</param> /// <param name="content2">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.</param> /// <returns></returns> public virtual jQuery After(jQuery content, Array content2) { return null; }
/// <summary> /// Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. /// </summary> /// <param name="element">A DOM node or jQuery object indicating where to stop matching following sibling elements.</param> /// <returns></returns> public virtual jQuery ParentsUntil(jQuery element) { return null; }
/// <summary> /// Insert content, specified by the parameter, after each element in the set of matched elements. /// </summary> /// <param name="content">DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.</param> /// <returns></returns> public virtual jQuery After(jQuery content) { return null; }
/// <summary> /// Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. /// </summary> /// <param name="element">A DOM node or jQuery object indicating where to stop matching following sibling elements.</param> /// <param name="filter">A string containing a selector expression to match elements against.</param> /// <returns></returns> public virtual jQuery PrevUntil(jQuery element, string filter) { return null; }
/// <summary> /// Insert content, specified by the parameter, before each element in the set of matched elements. /// </summary> /// <param name="content">DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.</param> /// <param name="content2">One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.</param> /// <returns></returns> public virtual jQuery Before(jQuery content, jQuery content2) { return null; }
/// <summary> /// Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. /// </summary> /// <param name="selection">A jQuery object to match elements against.</param> /// <returns></returns> public virtual jQuery Find(jQuery selection) { return null; }
/// <summary> /// Insert every element in the set of matched elements after the target. /// </summary> /// <param name="target">A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.</param> /// <returns></returns> public virtual jQuery InsertAfter(jQuery target) { return null; }
/// <summary> /// Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. /// </summary> /// <param name="newContent">The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.</param> /// <returns></returns> public virtual jQuery ReplaceWith(jQuery newContent) { return null; }
/// <summary> /// Insert every element in the set of matched elements before the target. /// </summary> /// <param name="target">A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.</param> /// <returns></returns> public virtual jQuery InsertBefore(jQuery target) { return null; }
/// <summary> /// Search for a given element from among the matched elements. /// </summary> /// <param name="element">The DOM element or first element within the jQuery object to look for.</param> /// <returns></returns> public virtual int Index(jQuery element) { return 0; }
/// <summary> /// Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. /// </summary> /// <param name="selection">An existing jQuery object to match the current set of elements against.</param> /// <returns></returns> public virtual bool Is(jQuery selection) { return(false); }