public override void ModifyTreeNode(TreeNodeBase treeNode, ContentItem contentItem) { foreach (ActionPluginGroupAttribute actionPluginGroup in Context.AdminManager.GetActionPluginGroups()) foreach (IContextMenuPlugin plugin in GetPlugins(actionPluginGroup.Name)) if (plugin.IsApplicable(contentItem) && (plugin.IsEnabled(contentItem) && plugin.IsDefault(contentItem))) { treeNode.Href = "javascript:(" + plugin.GetJavascriptHandler(contentItem) + ")();"; return; } }
private void FillIcons(List<Icon> icons, TreeNodeBase node) { Icon icon = node.Icon; if (icon != Icon.None && !icons.Contains(icon)) { icons.Add(icon); } if (node is TreeNode) { TreeNode treeNode = (TreeNode)node; foreach (TreeNodeBase nodeBase in treeNode.Nodes) { this.FillIcons(icons, nodeBase); } } }
public void SetRootNode(TreeNodeBase node) { this.Call("setRootNode", new JRawValue(node.ToScript(false))); }
public void ReplaceChildNode(string nodeId, string oldChildNodeId, TreeNodeBase newNode) { this.CallNode("replaceChild", nodeId, new JRawValue(this.ClientID.ConcatWith(".getNodeById(", JSON.Serialize(oldChildNodeId), ")")), new JRawValue(newNode.ToScript(false))); }
public void InsertBeforeChild(string nodeId, TreeNodeBase newNode, string refNodeId) { this.CallNode("insertBefore", nodeId, new JRawValue(newNode.ToScript(false)), new JRawValue(this.ClientID.ConcatWith(".getNodeById(", JSON.Serialize(refNodeId), ")"))); }
public void AppendChild(string nodeId, TreeNodeBase node) { this.CallNode("appendChild", nodeId, new JRawValue(node.ToScript(false))); }
public virtual void ModifyTreeNode(TreeNodeBase treeNode, ContentItem contentItem) { }
void Nodes_AfterItemAdd(TreeNodeBase item) { item.ParentNode = this; }