Пример #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);
        }
        static private void OnClickMainMenu(MouseEvent e)
        {
            e.PreventDefault();
            jQuery target    = new jQuery(e.Target);
            string popupName = target.Attr("data-popup");

            PopupManager.Instance.OpenPopupBelow(popupName, (HTMLElement)target.Get(0));
        }
Пример #3
0
        protected virtual void Render()
        {
            _root.Empty();

            _root.Css("height", "100%");

            (_textArea = DOM.textarea()).AppendTo(_root).Css("height", "100%");

            Window.SetTimeout(() => { Render(_textArea.Get(0)); }, 0);
        }
        internal static bool TargetCanUpdateSource(jQuery element)
        {
            if (element.Get(0).TagName == "INPUT")
            {
                var type = element.Attr("type");
                if (type == null)
                {
                    return(false);
                }

                type = type.ToUpperCase();

                if (type == "HIDDEN" ||
                    type == "TEXT" ||
                    type == "TEXTAREA")
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #5
0
 public void OpenPopupBelow(string name, jQuery element)
 {
     ClosePopups();
     OpenPopupBelow(name, (HTMLElement)element.Get(0));
 }
Пример #6
0
        public HTMLDivElement GetPopup(string name)
        {
            jQuery popup = ElementsManager.PopupsArea.Find($"[data-popup=\"{name}\"]");

            return(popup.Get(0) as HTMLDivElement);
        }