You will need to update the javascript treeview code itself. For Treeview 1.4, comment on the following lines (66-68):
this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event) { toggler.apply($(this).next()); }).add( $("a", this) ).hoverClass();
This will ensure that the expand / collapse happened only on the +/- click. Expanding all and minimizing the entire function will continue to work, if applicable.
Even better, you specify a new argument when defining the tree, and only if the condition is met do you override the default functionality. For instance,
if (settings.expandMode != 'simple'){ this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event) { toggler.apply($(this).next()); }).add( $("a", this) ).hoverClass(); }
And your treeview definition might look like this:
$("#tree").treeview({ animated: "fast", persist: "cookie", collapsed: true, control: "#treecontrol", expandMode: "simple"
I hope you get this idea. Good luck.
source share