BugNET

Open source issue tracking & project management
Welcome to BugNET Register | Login |

BugNET Forums

 
  Forum  Support  General Support  Sub-Categories
Previous Previous
 
Next Next
New Post 7/8/2008 2:28 PM
User is offline wapple
1 posts
No Ranking


Sub-Categories 

Is there anyway to create sub-categories without dragging the category onto another? If I create categoreies A, B, and C and then want category A1 as a sub-category of A I have to create it on the same level as A - C and then drag it to A.

It seems that the code in the AddCategory function of the ProjectComponents control references the Parent Node of the selected node, unless the Root Node (id == 0) is selected.

Is there a specific reason for this? I was able to remove the if block and just run the code under the if section and it seemed to work as I would expect it to. Is there an issue further down in the system that makes the current code necessary?

Thanks,

Will

 
New Post 7/9/2008 6:56 AM
User is offline admin
634 posts
bugnetproject.com
1st Level Poster




Re: Sub-Categories 

I thought there was some quirky reason I was doing this but I will take a second look and see if I can't straighten it out.


Davin Dubeau
BugNET - Core Developer

 
New Post 7/9/2008 7:46 AM
User is offline admin
634 posts
bugnetproject.com
1st Level Poster




Re: Sub-Categories 
Modified By admin  on 7/9/2008 6:51:57 AM)

I modified the code as you suggested to the following and it seems works fine . Thanks for the help. 

function AddCategory()
    {
        if(tree.getSelectionModel().getSelectedNode())
        {
            var text = 'Category '+(++cseed);
            var newNode = new Ext.tree.TreeNode({id: "new"+ cseed, text: text,cls:"category-node",isNew: true, leaf: false});
            tree.getSelectionModel().getSelectedNode().appendChild(newNode);
            newNode.ensureVisible();
            tree.Editor.triggerEdit(newNode);
        }
    }


Davin Dubeau
BugNET - Core Developer

 
Previous Previous
 
Next Next
  Forum  Support  General Support  Sub-Categories

Forum Policy

These Discussion Forums are dedicated to the discussion of the BugNET issue tracker.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:
1. No Advertising.
2. No Flaming or Trolling.
3. No Profanity, Racism, or Prejudice.
4. Site Moderators have the final word on approving/removing a thread or post or comment.
5. English language posting only, please.