Exemplo n.º 1
0
 public NavMenu AddSubMenu(string _id, string _name, string _url, string _target)
 {
     NavMenu subMenu = new NavMenu();
     subMenu.Id = _id;
     subMenu.Name = _name;
     subMenu.NavUrl = _url;
     subMenu.Target = _target;
     return AddSubMenu(subMenu);
 }
Exemplo n.º 2
0
        public NavMenu AddSubMenu(string _id, string _name, string _url, string _target)
        {
            NavMenu subMenu = new NavMenu();

            subMenu.Id     = _id;
            subMenu.Name   = _name;
            subMenu.NavUrl = _url;
            subMenu.Target = _target;
            return(AddSubMenu(subMenu));
        }
Exemplo n.º 3
0
        public string getPath()
        {
            string path = this.Name;

            NavMenu pMenu = this.ParentMenu;

            while (pMenu != null)
            {
                path  = pMenu.Name + " >> " + path;
                pMenu = pMenu.ParentMenu;
            }

            return(path);
        }
Exemplo n.º 4
0
 public NavMenu AddSubMenu(NavMenu subMenu)
 {
     subMenu.ParentMenu = this;
     subMenus.Add(subMenu);
     return(subMenu);
 }
Exemplo n.º 5
0
 private TreeNode CreateMainItem(NavMenu menu, Accordion accordion)
 {
     var treePanel = new TreePanel();
     treePanel.ID = "tp" + menu.Id;
     treePanel.AutoScroll = true;
     treePanel.Collapsed = false;
     treePanel.CollapseFirst = true;
     treePanel.HideParent = false;
     treePanel.RootVisible = false;
     treePanel.Title = menu.Name;
     treePanel.Icon = Icon.ApplicationHome;
     treePanel.Listeners.Click.Handler = "e.stopEvent();loadPage(#{MainTabs},node)";
     var rootNode = new TreeNode(menu.Id, menu.Name, Icon.FolderHome);
     rootNode.Expanded = true;
     treePanel.Root.Add(rootNode);
     accordion.Items.Add(treePanel);
     return rootNode;
 }
Exemplo n.º 6
0
 private void CreateSubItem(NavMenu menu, TreeNode mainNode)
 {
     foreach (NavMenu submenu in menu.SubMenus)
     {
         var subNode = new TreeNode(submenu.Id);
         subNode.Text = submenu.Name;
         SetIcon(submenu.Icon, submenu.IsCategory, subNode);
         subNode.Href = ResolveUrl(submenu.NavUrl);
         subNode.CustomAttributes.Add(new ConfigItem("isCategory", submenu.IsCategory.ToString(),
                                                     ParameterMode.Value));
         mainNode.Nodes.Add(subNode);
         CreateSubItem(submenu, subNode);
     }
 }
Exemplo n.º 7
0
 public NavMenu AddSubMenu(NavMenu subMenu)
 {
     subMenu.ParentMenu = this;
     subMenus.Add(subMenu);
     return subMenu;
 }