public override void Render(ref XmlTree tree) { XmlTreeNode xNode; xNode = XmlTreeNode.Create(this); xNode.Text = "Log"; xNode.Icon = "doc.gif"; xNode.NodeType = "uTool"; xNode.Action = "javascript:openuToolTab('/umbraco/plugins/uTools/log.aspx')"; tree.Add(xNode); xNode = XmlTreeNode.Create(this); xNode.Text = "Data Types"; xNode.Icon = "developerDatatype.gif"; xNode.NodeType = "uTool"; xNode.Action = "javascript:openuTool('datatype.aspx')"; tree.Add(xNode); xNode = XmlTreeNode.Create(this); xNode.Text = "Document Types"; xNode.Icon = "settingDatatype.gif"; xNode.NodeType = "uTool"; xNode.Action = "javascript:openuTool('doctype.aspx')"; tree.Add(xNode); //xNode = XmlTreeNode.Create(this); //xNode.Text = "Content"; //xNode.Icon = "docPic.gif"; //xNode.NodeType = "uTool"; //xNode.Action = "javascript:openuTool('content.aspx')"; //tree.Add(xNode); xNode = XmlTreeNode.Create(this); xNode.Text = "Templates"; xNode.Icon = "settingTemplate.gif"; xNode.NodeType = "uTool"; xNode.Action = "javascript:openuTool('template.aspx')"; tree.Add(xNode); xNode = XmlTreeNode.Create(this); xNode.Text = "Macros"; xNode.Icon = "developerMacro.gif"; xNode.NodeType = "uTool"; xNode.Action = "javascript:openuTool('macro.aspx')"; tree.Add(xNode); xNode = XmlTreeNode.Create(this); xNode.Text = "Content Cache Viewer"; xNode.Icon = "settingXML.gif"; xNode.NodeType = "uTool"; xNode.Action = "javascript:openuTool('cache.aspx')"; tree.Add(xNode); xNode = XmlTreeNode.Create(this); xNode.Text = "Media Cache Viewer"; xNode.Icon = "mediaPhoto.gif"; xNode.NodeType = "uTool"; xNode.Action = "javascript:openuTool('mediacache.aspx')"; tree.Add(xNode); }
public override void Render(ref XmlTree tree) { foreach (string role in Roles.GetAllRoles()) { // MemberGroup[] MemberGroups = MemberGroup.GetAll; // for (int i = 0; i < MemberGroups.Length; i++) // { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = role; xNode.Text = role; xNode.Action = "javascript:openMemberGroup('" + HttpContext.Current.Server.UrlEncode(role.Replace("'", "\\'")) + "');"; xNode.Icon = "membergroup.gif"; xNode.OpenIcon = "membergroup.gif"; if (!Member.IsUsingUmbracoRoles()) { xNode.Menu = null; } OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); } OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } }
public override void Render(ref XmlTree tree) { Hashtable ht = Cache.ReturnCacheItemsOrdred(); foreach (string key in ht.Keys) { //each child will need to load a CacheItem instead of a Cache tree so //we'll create a loadCacheItem object in order to get it's serivce url and alias properties loadCacheItem loadCacheItemTree = new loadCacheItem(this.app); int itemCount = ((ArrayList)ht[key]).Count; XmlTreeNode xNode = XmlTreeNode.Create(loadCacheItemTree); xNode.NodeID = key; xNode.Text = key + " (" + itemCount + ")"; xNode.Action = string.Empty; xNode.Source = loadCacheItemTree.GetTreeServiceUrl(key); xNode.Icon = "developerCacheTypes.gif"; xNode.OpenIcon = "developerCacheTypes.gif"; xNode.HasChildren = itemCount > 0; OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
private void RenderCalendarEntryNodes(ref XmlTree tree, int id) { XmlTreeNode node = XmlTreeNode.Create(this); node.NodeType = "CalendarSettings"; node.Text = "Settings"; node.Icon = "developerMacro.gif"; node.Action = "javascript:openCalendar(" + id.ToString() + ")"; node.Menu.Clear(); tree.Add(node); node = XmlTreeNode.Create(this); node.NodeID = (1 + id).ToString(); node.NodeType = "CalendarEvents"; node.Text = "Events"; node.Icon = "cog.png"; node.Action = "javascript:showEvents(" + id.ToString() + ")"; node.Menu.Clear(); node.Menu.Add(ActionNew.Instance); tree.Add(node); node = XmlTreeNode.Create(this); node.NodeID = (2 + id).ToString(); node.NodeType = "CalendarRecurringEvents"; node.Text = "Recurring Events"; node.Icon = "cog.png"; node.Action = "javascript:showRecurringEvents(" + id.ToString() + ")"; node.Menu.Clear(); node.Menu.Add(ActionNew.Instance); tree.Add(node); }
public override void Render(ref XmlTree tree) { var mediaTypes = Service.GetMediaTypeChildren(base.m_id); foreach (var mediaType in mediaTypes) { var hasChildren = Service.MediaTypeHasChildren(mediaType.Id); XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = mediaType.Id.ToString(CultureInfo.InvariantCulture); xNode.Text = TranslateTreeNames.GetTranslatedName(mediaType.Name); xNode.Action = string.Format("javascript:openMediaType({0});", mediaType.Id); xNode.Icon = "settingDataType.gif"; xNode.OpenIcon = "settingDataType.gif"; xNode.Source = GetTreeServiceUrl(mediaType.Id); xNode.HasChildren = hasChildren; if (hasChildren) { xNode.Icon = "settingMasterDataType.gif"; xNode.OpenIcon = "settingMasterDataType.gif"; } OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
public override void Render(ref XmlTree tree) { Dictionary.DictionaryItem[] tmp; if (this.id == this.StartNodeID) { tmp = Dictionary.getTopMostItems; } else { tmp = new Dictionary.DictionaryItem(this.id).Children; } foreach (Dictionary.DictionaryItem di in tmp) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = di.id.ToString(); //dictionary_ + id.. xNode.Text = di.key; xNode.Action = string.Format("javascript:openDictionaryItem({0});", di.id); xNode.Icon = "settingDataType.gif"; xNode.OpenIcon = "settingDataType.gif"; xNode.NodeType = "DictionaryItem"; //this shouldn't be like this, it should be this.TreeAlias but the ui.config file points to this name. xNode.Source = this.GetTreeServiceUrl(di.id); xNode.HasChildren = di.hasChildren; OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
private void RenderTemplateFolders(ref XmlTree tree) { if (base.m_id == -1) { var dir = new DirectoryInfo(IOHelper.MapPath(SystemDirectories.Masterpages)); if (dir.Exists) { foreach (var s in dir.GetDirectories()) { var _s = Path.GetFileNameWithoutExtension(s.FullName); XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = _s; xNode.Text = _s; xNode.Icon = "icon-folder"; xNode.OpenIcon = "icon-folder"; xNode.Source = GetTreeServiceUrl(_s) + "&folder=" + _s; xNode.HasChildren = true; xNode.Menu.Clear(); xNode.Menu.Add(ActionRefresh.Instance); OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } } } }
public override void Render(ref XmlTree tree) { foreach (var sheet in Services.FileService.GetStylesheets()) { var nodeId = sheet.Path.TrimEnd(".css"); var xNode = XmlTreeNode.Create(this); xNode.NodeID = nodeId; xNode.Text = nodeId; xNode.Action = "javascript:openStylesheet('" + //Needs to be escaped for JS HttpUtility.UrlEncode(sheet.Path) + "');"; var styleSheetPropertyTree = new loadStylesheetProperty(this.app); xNode.Source = styleSheetPropertyTree.GetTreeServiceUrl(nodeId); xNode.HasChildren = sheet.Properties.Any(); xNode.Icon = " icon-brackets"; xNode.OpenIcon = "icon-brackets"; xNode.NodeType = "stylesheet"; //this shouldn't be like this, it should be this.TreeAlias but the ui.config file points to this name. OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
public override void Render(ref XmlTree tree) { var docTypes = Service.GetContentTypeChildren(base.m_id); foreach (var docType in docTypes) { var hasChildren = Service.HasChildren(docType.Id); XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = docType.Id.ToString(CultureInfo.InvariantCulture); xNode.Text = docType.Name; xNode.Action = "javascript:openNodeType(" + docType.Id + ");"; xNode.Icon = "settingDataType.gif"; xNode.OpenIcon = "settingDataType.gif"; xNode.Source = GetTreeServiceUrl(docType.Id); xNode.HasChildren = hasChildren; if (hasChildren) { xNode.Icon = "settingMasterDataType.gif"; xNode.OpenIcon = "settingMasterDataType.gif"; } OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
public override void Render(ref XmlTree tree) { var roles = Roles.GetAllRoles(); Array.Sort(roles); foreach (string role in roles) { if (role.StartsWith(Constants.Conventions.Member.InternalRolePrefix) == false) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = role; xNode.Text = role; xNode.Action = "javascript:openMemberGroup('" + HttpContext.Current.Server.UrlEncode(role.Replace("'", "\\'")) + "');"; xNode.Icon = "icon-users"; if (!Member.IsUsingUmbracoRoles()) { xNode.Menu = null; } OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); } OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
public override void Render(ref XmlTree tree) { var sheet = Services.FileService.GetStylesheetByName(NodeKey.EnsureEndsWith(".css")); foreach (var prop in sheet.Properties) { var sheetId = sheet.Path.TrimEnd(".css"); var xNode = XmlTreeNode.Create(this); xNode.NodeID = sheetId + "_" + HttpUtility.UrlEncode(prop.Name); xNode.Text = prop.Name; xNode.Action = "javascript:openStylesheetProperty('" + //Needs to be escaped for JS HttpUtility.UrlEncode(sheet.Path) + "','" + HttpUtility.UrlEncode(prop.Name) + "');"; xNode.Icon = "icon-brackets"; xNode.OpenIcon = "icon-brackets"; OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
private void RenderCalendar(ref XmlTree tree) { if (null != this._db) { var calendars = this._db.Query <ECalendar>("SELECT * FROM ec_calendars"); foreach (var c in calendars) { XmlTreeNode node = XmlTreeNode.Create(this); node.NodeID = c.Id.ToString(); node.NodeType = "CalendarEntry"; node.Text = c.Calendarname; node.Icon = "calendar.png"; node.Action = "javascript:openCalendar(" + c.Id.ToString() + ")"; var treeService = new TreeService(c.Id, TreeAlias, ShowContextMenu, IsDialog, DialogMode, app, "CalendarEntry-" + c.Id.ToString()); node.Source = treeService.GetServiceUrl(); node.Menu.Clear(); //node.Menu.Add(ActionNew.Instance); node.Menu.Add(ActionDelete.Instance); tree.Add(node); } } }
public override void Render(ref XmlTree tree) { for (var i = 0; i < 10; i++) { var node = XmlTreeNode.Create(this); node.Text = "Node " + i; tree.Add(node); } }
public override void Render(ref XmlTree tree) { var users = new List <User>(User.getAll()); User currUser = UmbracoEnsuredPage.CurrentUser; bool currUserIsAdmin = currUser.IsAdmin(); foreach (User u in users.OrderBy(x => x.Disabled)) { if (!UmbracoConfig.For.UmbracoSettings().Security.HideDisabledUsersInBackoffice || (UmbracoConfig.For.UmbracoSettings().Security.HideDisabledUsersInBackoffice&& !u.Disabled)) { XmlTreeNode xNode = XmlTreeNode.Create(this); // special check for ROOT user if (u.Id == 0) { //if its the administrator, don't create a menu xNode.Menu = null; //if the current user is not the administrator, then don't add this node. if (currUser.Id != 0) { continue; } } // Special check for admins in general (only show admins to admins) else if (!currUserIsAdmin && u.IsAdmin()) { continue; } //xNode.IconClass = "umbraco-tree-icon-grey"; xNode.NodeID = u.Id.ToString(); xNode.Text = u.Name; xNode.Action = "javascript:openUser(" + u.Id + ");"; xNode.Icon = "icon-user"; xNode.OpenIcon = "icon-user"; if (u.Disabled) { xNode.Style.DimNode(); } OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } } }
/// /// Override the render method to create the newsletter tree /// /// public override void Render(ref XmlTree Tree) { Tree.treeCollection.Clear(); var nodeWorkout = XmlTreeNode.Create(this); nodeWorkout.NodeID = "Chat" + Guid.NewGuid(); nodeWorkout.Text = "Chat"; nodeWorkout.Icon = "b_user.png"; nodeWorkout.Action = string.Format("javascript:openChat({0});", 1355); Tree.Add(nodeWorkout); }
private XmlTreeNode CreateNode(string title, int id) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = id.ToString(); xNode.Text = title; xNode.Action = "javascript:gigyaInit('/umbraco/plugins/gigya/edit.aspx?id=" + id + "')"; xNode.Icon = "doc.gif"; xNode.OpenIcon = "folder_o.gif"; xNode.NodeType = "GigyaSettings"; return(xNode); }
private void RenderTemplates(ref XmlTree tree) { List <Template> templates = null; if (m_id == -1) { templates = Template.GetAllAsList().FindAll(t => t.HasMasterTemplate == false); } else { templates = Template.GetAllAsList().FindAll(t => t.MasterTemplate == m_id); } foreach (Template t in templates) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = t.Id.ToString(CultureInfo.InvariantCulture); xNode.Text = t.Text; xNode.Source = GetTreeServiceUrl(t.Id); xNode.HasChildren = t.HasChildren; if (UmbracoConfig.For.UmbracoSettings().Templates.DefaultRenderingEngine == RenderingEngine.Mvc && _viewHelper.ViewExists(t.TemplateEntity)) { xNode.Action = "javascript:openView(" + t.Id + ");"; xNode.Icon = "icon-newspaper-alt"; xNode.OpenIcon = "icon-newspaper-alt"; } else { xNode.Action = "javascript:openTemplate(" + t.Id + ");"; xNode.Icon = "icon-newspaper-alt"; xNode.OpenIcon = "icon-newspaper-alt"; } if (t.HasChildren) { xNode.Icon = "icon-newspaper"; xNode.OpenIcon = "icon-newspaper"; //do not show the delete option if it has children xNode.Menu.Remove(ActionDelete.Instance); } OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
/// /// Override the render method to create the newsletter tree /// /// public override void Render(ref XmlTree Tree) { Tree.treeCollection.Clear(); var node = XmlTreeNode.Create(this); node.NodeID = "Topic" + Guid.NewGuid(); node.Text = "Topic"; node.Icon = "b_user.png"; node.Action = string.Format("javascript:openTopic({0});", 1355); var data = GetTreeServiceUrl(node.NodeID); Tree.Add(node); }
public override void Render(ref XmlTree tree) { User[] users = User.getAll(); User currUser = UmbracoEnsuredPage.CurrentUser; bool currUserIsAdmin = currUser.IsAdmin(); foreach (User u in users) { if (!u.Disabled) { XmlTreeNode xNode = XmlTreeNode.Create(this); // special check for ROOT user if (u.Id == 0) { //if its the administrator, don't create a menu xNode.Menu = null; //if the current user is not the administrator, then don't add this node. if (currUser.Id != 0) { continue; } } // Special check for admins in general (only show admins to admins) else if (!currUserIsAdmin && u.IsAdmin()) { continue; } //xNode.IconClass = "umbraco-tree-icon-grey"; xNode.NodeID = u.Id.ToString(); xNode.Text = u.Name; xNode.Action = "javascript:openUser(" + u.Id + ");"; xNode.Icon = "user.gif"; xNode.OpenIcon = "user.gif"; OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } } }
private void RenderTemplates(ref XmlTree tree) { List <Template> templates = null; if (base.m_id == -1) { templates = Template.GetAllAsList().FindAll(delegate(Template t) { return(!t.HasMasterTemplate); }); } else { templates = Template.GetAllAsList().FindAll(delegate(Template t) { return(t.MasterTemplate == base.m_id); }); } foreach (Template t in templates) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = t.Id.ToString(); xNode.Text = t.Text; xNode.Source = GetTreeServiceUrl(t.Id); xNode.HasChildren = t.HasChildren; if (Umbraco.Core.Configuration.UmbracoSettings.DefaultRenderingEngine == RenderingEngine.Mvc && ViewHelper.ViewExists(t)) { xNode.Action = "javascript:openView(" + t.Id + ");"; xNode.Icon = "settingView.gif"; xNode.OpenIcon = "settingView.gif"; } else { xNode.Action = "javascript:openTemplate(" + t.Id + ");"; xNode.Icon = "settingTemplate.gif"; xNode.OpenIcon = "settingTemplate.gif"; } if (t.HasChildren) { xNode.Icon = "settingMasterTemplate.gif"; xNode.OpenIcon = "settingMasterTemplate.gif"; } OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
/// <summary> /// This is called if the tree has been expanded, and it's used to render and child nodes for this tree /// </summary> /// <param name="tree">current tree</param> public override void Render(ref XmlTree tree) { XmlTreeNode node; foreach (RelationType relationType in RelationType.GetAll().OrderBy(relationType => relationType.Name)) { node = XmlTreeNode.Create(this); node.NodeID = relationType.Id.ToString(); node.Text = relationType.Name; node.Icon = "icon-trafic"; node.Action = string.Concat("javascript:openRelationType('", node.NodeID, "');"); tree.Add(node); } }
/// <summary> /// Render the top Root Nodes. /// - Calendar -> The Root of all Calendars /// - Locations -> The Root of all Locations /// </summary> /// <param name="tree">The current tree</param> private void PopulateRootNodes(ref XmlTree tree) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = "1"; xNode.Text = "Calendar"; //xNode.Action = "javascript:openCustom('" + "1" + "');"; xNode.Icon = "calendar.png"; xNode.OpenIcon = "folder_o.gif"; xNode.NodeType = "EventCalendarBase"; var treeService = new TreeService(-1, TreeAlias, ShowContextMenu, IsDialog, DialogMode, app, "CalendarBase"); xNode.Source = treeService.GetServiceUrl(); xNode.Menu.Clear(); xNode.Menu.Add(ActionNew.Instance); xNode.Menu.Add(ActionRefresh.Instance); tree.Add(xNode); xNode = XmlTreeNode.Create(this); xNode.NodeID = "2"; xNode.Text = "Locations"; //xNode.Action = "javascript:openCustom('" + "1" + "');"; xNode.Icon = "map.png"; xNode.OpenIcon = "folder_o.gif"; xNode.NodeType = "EventLocationBase"; treeService = new TreeService(-1, TreeAlias, ShowContextMenu, IsDialog, DialogMode, app, "LocationBase"); xNode.Source = treeService.GetServiceUrl(); xNode.Menu.Clear(); xNode.Menu.Add(ActionNew.Instance); xNode.Menu.Add(ActionRefresh.Instance); tree.Add(xNode); //xNode = XmlTreeNode.Create(this); //xNode.NodeID = "3"; //xNode.Text = "Settings"; //xNode.Action = "javascript:openSettings();"; //xNode.Icon = "cog.png"; //xNode.NodeType = "GeneralSettings"; //xNode.Menu.Clear(); //tree.Add(xNode); }
public override void Render(ref XmlTree tree) { Repository repository = new Repository(); List <Entity> entities = repository.GetAll(); foreach (Entity entity in entities) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = entity.Id.ToString(); xNode.Text = entity.Name; xNode.Action = "javascript:openUpacSyndication(" + entity.Id + ");"; xNode.Icon = "feed.png"; xNode.OpenIcon = "feed.png"; tree.Add(xNode); } }
// adds nodes to tree public override void Render(ref XmlTree tree) { List <string> nodes = new List <string>() { "hello", "dolly" }; int i = 0; foreach (var s in nodes) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = i.ToString(); xNode.Text = s; xNode.Icon = "fundmedia.png"; xNode.Action = "javascript:openFundMedia(" + i.ToString() + ")"; tree.Add(xNode); } }
public override void Render(ref XmlTree tree) { foreach (MediaType dt in MediaType.GetAll) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = dt.Id.ToString(); xNode.Text = dt.Text; xNode.Action = string.Format("javascript:openMediaType({0});", dt.Id); xNode.Icon = "settingDataType.gif"; xNode.OpenIcon = "settingDataType.gif"; OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
public override void Render(ref XmlTree tree) { foreach (Language l in Language.getAll) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = l.id.ToString(); //"language_" + l.id.ToString(); xNode.Text = l.FriendlyName; xNode.Action = "javascript:openLanguage(" + l.id + ");"; xNode.Icon = "icon-flag-alt"; xNode.OpenIcon = "icon-flag-alt"; OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
private void CreateNode(ref XmlTree tree, string name, string action) { var node = XmlTreeNode.Create(this); node.NodeID = 1.ToString(); node.NodeType = "ContentConveyor"; node.Text = name; node.Action = "javascript:openDashboard('" + action + "');"; node.Icon = "icon-box"; node.OpenIcon = "icon-box"; node.HasChildren = false; node.Menu = new List <IAction>(); OnBeforeNodeRender(ref tree, ref node, EventArgs.Empty); if (node != null) { tree.Add(node); OnAfterNodeRender(ref tree, ref node, EventArgs.Empty); } }
private void CreateNode(ref XmlTree tree, string name, string action) { var node = XmlTreeNode.Create(this); node.NodeID = 1.ToString(); node.NodeType = "ContentConveyor"; node.Text = name; node.Action = "javascript:openDashboard('" + action + "');"; node.Icon = "../../../App_Plugins/BackOffice/ContentConveyor/Images/Icons/importDocumenttype.png"; node.OpenIcon = "../../../App_Plugins/BackOffice/ContentConveyor/Images/Icons/importDocumenttype.png"; node.HasChildren = false; node.Menu = new List <IAction>(); OnBeforeNodeRender(ref tree, ref node, EventArgs.Empty); if (node != null) { tree.Add(node); OnAfterNodeRender(ref tree, ref node, EventArgs.Empty); } }
public override void Render(ref XmlTree tree) { foreach (DataTypeDefinition dt in DataTypeDefinition.GetAll()) { XmlTreeNode xNode = XmlTreeNode.Create(this); xNode.NodeID = dt.Id.ToString(); xNode.Text = dt.Text; xNode.Action = "javascript:openDataType(" + dt.Id + ");"; xNode.Icon = "developerDatatype.gif"; xNode.OpenIcon = "developerDatatype.gif"; OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) { tree.Add(xNode); OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty); } } }
private void RenderLocations(ref XmlTree tree) { if (null != this._db) { var locations = this._db.Query <EventLocation>("SELECT * FROM ec_locations"); foreach (var c in locations) { XmlTreeNode node = XmlTreeNode.Create(this); node.NodeID = c.Id.ToString(); node.NodeType = "LocationEntry"; node.Text = c.LocationName; node.Icon = "map.png"; node.Action = "javascript:openLocation(" + c.Id.ToString() + ")"; tree.Add(node); } } }