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