Adding New Folder
Posted: Wed Oct 24, 2007 10:52 pm
Here's my issue: I've got the right-click contextual menu working to Rename, Delete, Hide/Show and Add New Folders. It does everything right EXCEPT when I try to add a new folder.
Now, to get adding a new folder working in the first place, I essentially copied the "rename" code in drag-drop-folder-tree.js so that it would create a new folder. BUT, I want the new folder instance to drop down to the child level of the folder I click on. Instead it shows up in front of the folder I right-click on. The Rename code uses insertBefore(textBox,obj) to achieve this, but how else can I do it? I've tried using appendChild instead of insertBefore, but then I don't have the controls I need and nothing from my New Folder saves to the database. Using insertBefore my new folder DOES get saved to the Database, but it doesn't move to the appropriate level until I do a refresh.
Sorry if this is long...any ideas?
Thanks again for the wonderful script!