Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

optionally allow to configure what is used as tree root

  • Loading branch information...
commit a936a94d3a1f720bc528c0859e385d6c7df109e2 1 parent c76ff50
@dbu dbu authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 jquery.treeview.async.js
View
9 jquery.treeview.async.js
@@ -1,6 +1,6 @@
/*
* Async Treeview 0.1 - Lazy-loading extension for Treeview
- *
+ *
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
*
* Copyright (c) 2007 Jörn Zaefferer
@@ -88,9 +88,12 @@ $.fn.treeview = function(settings) {
if (!settings.url) {
return proxied.apply(this, arguments);
}
+ if (!settings.root) {
+ settings.root = "source";
+ }
var container = this;
if (!container.children().size())
- load(settings, "source", this, container);
+ load(settings, settings.root, this, container);
var userToggle = settings.toggle;
return proxied.call(this, $.extend({}, settings, {
collapsed: true,
@@ -107,4 +110,4 @@ $.fn.treeview = function(settings) {
}));
};
-})(jQuery);
+})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.