Advertisement

Adding New Folder

Moderators: Calcifer, slothy

Adding New Folder

Postby hartvan » Wed Oct 24, 2007 10:52 pm

Greetings....I've been playing with the Drag and Drop Folder Tree script and it's great! It's allowing me to create a fully functional Web-based CMS with drag and drop/editing/deleting/adding capabilities for my system administrators, much like a Mac's Finder window.

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!
hartvan
 
Posts: 3
Joined: Wed Oct 24, 2007 10:27 pm
Location: Grand Rapids, MI

Return to Folder tree questions

Who is online

Users browsing this forum: No registered users and 2 guests

cron