[jQuery] (treeview) Need help with Treeview pre-1.4.1 and jquery.treeview.edit

2010-01-11 Thread Manfred
Hello,

at first I can say that Treeview is a great jQuery plugin!
I use the plugin a lot and have some questions now.

I found a newer Version "pre-1.4.1" here:
http://view.jquery.com/trunk/plugins/treeview/jquery.treeview.js
Demo: http://view.jquery.com/trunk/plugins/treeview/demo/
Is this version still in development?

Very interesting in this version is the possibility to add and remove
a node. These features was added in the file jquery.treeview.edit.js:
http://view.jquery.com/trunk/plugins/treeview/jquery.treeview.edit.js

There are still some bugs here, e.g.:
- go to the test-page: 
http://view.jquery.com/trunk/plugins/treeview/demo/edit.html
- first, delete "File 4"
- then, delete "File 3.1"
- now, the icon in front of "Folder 3 (closed at start)" is not
correct

The good news: I found the bug, here is the new working code for
"jquery.treeview.edit.js", please replace the old code:
if (parent.is(":not(:has(>))") && parent[0] != this) {
parent.parent()
.removeClass(CLASSES.collapsable)
.removeClass(CLASSES.expandable)
.removeClass(CLASSES.lastCollapsable)
.removeClass(CLASSES.lastExpandable);

parent.parent(":last-child").addClass(CLASSES.last);

parent.siblings(".hitarea").andSelf().remove();
}

But there are still problems with the add-function in this file: At
the moment I can only add new nodes directly in a "ul"-tag, that
means, that the parent node has already childs. But if I want to add a
new node on a node that hasn't already children, the current code
doesn't generate new necessary "ul"-tags first.

Can anybody help me with the correction of the add-function?

Another problem:
In the new http://view.jquery.com/trunk/plugins/treeview/jquery.treeview.js
you can find 'this.data("toggler", toggler);' in line 164. This works
only with jQuery 1.2.6 but with 1.3.2 I got this error message:
"this.data is not a function"

How can I make the version pre-1.4.1 compatible with jQuery 1.3.2?

Thank you very much for your help!
Greetings Manfred


[jQuery] treeview - Question regarding Async extension

2009-09-09 Thread Manfred Stanfield

First, thanks for the Treeview extension. It is great!

I have it running fine, and I have been using the lazy-loading
extension. I need to build my tree using AJAX and add an anchor tag
inside the LI tag so that I can display a dynamic treeview and allow
the user to click on a folder or leaf node and run my javascript and/
or link.

In order words, I need the JSON to be transformed into something like
this:

Item 1.0

Right now, the JSON is transformed into something like this:

Clinicial Research

I don't see anything in the online demos, docs, etc for v0.1 of
jquery.treeview.async.js that would create the A tags, but I could be
wrong.

Thanks so much for your help,
Manfred