idea版本/二手物品交易与租赁系统论文/secondhand/web/admin/js/jquery.treetable.js
(开头部分) 16KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
* jQuery treetable Plugin 3.2.0
* http://ludo.cubicphuse.nl/jquery-treetable
*
* Copyright 2013, Ludo van den Boom
* Dual licensed under the MIT or GPL Version 2 licenses.
*/
(function($) {
"use strict";
var Node, Tree, methods;
Node = (function() {
function Node(row, tree, settings) {
var parentId;
this.row = row;
this.tree = tree;
this.settings = settings;
// TODO Ensure id/parentId is always a string (not int)
this.id = this.row.data(this.settings.nodeIdAttr);
// TODO Move this to a setParentId function?
parentId = this.row.data(this.settings.parentIdAttr);
if (parentId != null && parentId !== "") {
this.parentId = parentId;
}
this.treeCell = $(this.row.children(this.settings.columnElType)[this.settings.column]);
this.expander = $(this.settings.expanderTemplate);
this.indenter = $(this.settings.indenterTemplate);
this.children = [];
this.initialized = false;
this.treeCell.prepend(this.indenter);
}
Node.prototype.addChild = function(child) {
return this.children.push(child);
};
Node.prototype.ancestors = function() {
var ancestors, node;
node = this;
ancestors = [];
while (node = node.parentNode()) {
ancestors.push(node);
}
return ancestors;
};
Node.prototype.collapse = function() {
if (this.collapsed()) {
return this;
}
this.row.removeClass("expanded").addClass("collapsed");
this._hideChildren();
this.expander.attr("title", this.settings.stringExpand);
后面还有 571 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
