X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/0c9c28efcd43f53ac54aa60b2dfefa69c70dbadf..6b6d9b29e9e9e91f79507a8bf193fb30de311dcc:/doc/help/xslt/webhelp/docs/common/jquery/treeview/jquery.treeview.async.js diff --git a/doc/help/xslt/webhelp/docs/common/jquery/treeview/jquery.treeview.async.js b/doc/help/xslt/webhelp/docs/common/jquery/treeview/jquery.treeview.async.js new file mode 100644 index 00000000..2597dde1 --- /dev/null +++ b/doc/help/xslt/webhelp/docs/common/jquery/treeview/jquery.treeview.async.js @@ -0,0 +1,72 @@ +/* + * Async Treeview 0.1 - Lazy-loading extension for Treeview + * + * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ + * + * Copyright (c) 2007 Jörn Zaefferer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revision: $Id$ + * + */ + +;(function($) { + +function load(settings, root, child, container) { + $.getJSON(settings.url, {root: root}, function(response) { + function createNode(parent) { + var current = $("
  • ").attr("id", this.id || "").html("" + this.text + "").appendTo(parent); + if (this.classes) { + current.children("span").addClass(this.classes); + } + if (this.expanded) { + current.addClass("open"); + } + if (this.hasChildren || this.children && this.children.length) { + var branch = $("