Inheritance: Node, IIcon
示例#1
0
 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;
             }
 }
示例#2
0
        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);
                }
            }
        }
示例#3
0
 public void SetRootNode(TreeNodeBase node)
 {
     this.Call("setRootNode", new JRawValue(node.ToScript(false)));
 }
示例#4
0
 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)));
 }
示例#5
0
 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), ")")));
 }
示例#6
0
 public void AppendChild(string nodeId, TreeNodeBase node)
 {
     this.CallNode("appendChild", nodeId, new JRawValue(node.ToScript(false)));
 }
示例#7
0
 public virtual void ModifyTreeNode(TreeNodeBase treeNode, ContentItem contentItem)
 {
 }
示例#8
0
 void Nodes_AfterItemAdd(TreeNodeBase item)
 {
     item.ParentNode = this;
 }
示例#9
0
 void Nodes_AfterItemAdd(TreeNodeBase item)
 {
     item.ParentNode = this;
 }