/*! * jquery.fancytree.columnview.js * * Render tree like a Mac Finder's column view. * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) * * Copyright (c) 2008-2021, Martin Wendt (https://wwWendt.de) * * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * * @version 2.38.0 * @date 2021-02-09T20:03:49Z */ (function(factory) { if (typeof define === "function" && define.amd) { // AMD. Register as an anonymous module. define(["jquery", "./jquery.fancytree"], factory); } else if (typeof module === "object" && module.exports) { // Node/CommonJS require("./jquery.fancytree"); module.exports = factory(require("jquery")); } else { // Browser globals factory(jQuery); } })(function($) { "use strict"; /******************************************************************************* * Private functions and variables */ var _assert = $.ui.fancytree.assert, FT = $.ui.fancytree; /******************************************************************************* * Private functions and variables */ $.ui.fancytree.registerExtension({ name: "columnview", version: "2.38.0", // Default options for this extension. options: {}, // Overide virtual methods for this extension. // `this` : is this extension object // `this._base` : the Fancytree instance // `this._super`: the virtual function that was overriden (member of prev. extension or Fancytree) treeInit: function(ctx) { var $tdFirst, $ul, tree = ctx.tree, $table = tree.widget.element; tree.tr = $("tbody tr", $table)[0]; tree.$tdList = $(">td", tree.tr); tree.columnCount = tree.$tdList.length; // Perform default behavior this._superApply(arguments); // Standard Fancytree created a root