From 55724ff6f6818f2c1b16d4bacd912ae2eb745fdb Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 13 Aug 2008 12:27:12 +0000 Subject: Added a new latest activity title to the front page git-svn-id: https://code.elgg.org/elgg/trunk@1895 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/pages/javascript/jquery.treeview.async.js | 72 ++++++++ mod/pages/javascript/jquery.treeview.js | 251 ++++++++++++++++++++++++++ 2 files changed, 323 insertions(+) create mode 100644 mod/pages/javascript/jquery.treeview.async.js create mode 100644 mod/pages/javascript/jquery.treeview.js (limited to 'mod/pages/javascript') diff --git a/mod/pages/javascript/jquery.treeview.async.js b/mod/pages/javascript/jquery.treeview.async.js new file mode 100644 index 000000000..01059191f --- /dev/null +++ b/mod/pages/javascript/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, currentpage: settings.currentpage}, 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 = $("