/* * 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: jquery.treeview.async.js 8040 2011-08-11 15:21:09Z aFolletete $ * */ ;(function($) { function load(settings, root, child, container) { root = formatCategoryIdTreeView(root); function createNode(parent) { var id_category = this.id_category; var checked = false; $('input[name="'+settings.inputNameValue+'"][type=hidden]').each( function () { if ($(this).attr('value') == id_category) { checked = true; $(this).remove(); } }); var current = $("
  • ").addClass(settings.inputNameSelector).attr("id", (this.id_category + '-' + settings.inputNameSelector) || "").html(" " + this.name +""+(this.has_children>0 && !settings.use_radio?" " + settings.checkAllChildrenLabel + " ":'')+" " + this.level_depth +" ("+this.nbSelectedSubCat+" "+settings.selectedLabel+")").appendTo(parent); if (this.classes) { current.children("span").addClass(this.classes); } if (this.has_children > 0) { var branch = $("