code/Athena0.0.1/Web/Content/js/wdtree/tree.js
(开头部分) 22KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
(function ($) {
$.fn.swapClass = function (c1, c2) {
return this.removeClass(c1).addClass(c2);
};
$.fn.switchClass = function (c1, c2) {
if (this.hasClass(c1)) {
return this.swapClass(c1, c2);
}
else {
return this.swapClass(c2, c1);
}
};
$.fn.treeview = function (settings) {
var dfop =
{
method: "GET",
datatype: "json",
url: false,
param: null,
cbiconpath: "/Content/js/wdtree/images/icons/",
icons: ["checkbox_0.png", "checkbox_1.png", "checkbox_2.png"],
showcheck: false,
oncheckboxclick: false,
onnodeclick: false,
cascadecheck: true,
data: null,
clicktoggle: true,
theme: "bbit-tree-arrows",
isTool: false,
nodeTools: []
};
$.extend(dfop, settings);
var treenodes = dfop.data;
var me = $(this);
var id = me.attr("id");
if (id == null || id == "") {
id = "bbtree" + new Date().getTime();
me.attr("id", id);
}
me.height(dfop.height);
if (dfop.slimscroll == true) {
me.css({ "overflow": "auto", "overflow-y": "hidden" });
} else {
me.css({ "overflow": "auto" });
}
var html = [];
buildtree(dfop.data, html);
me.html('');
me.addClass("bbit-tree").append(html.join(""));
InitEvent(me);
html = null;
if (dfop.showcheck) {
for (var i = 0; i < 3; i++) {
var im = new Image();
im.src = dfop.cbiconpath + dfop.icons[i];
}
}
function buildtree(data, ht) {
ht.push("<div class='bbit-tree-bwrap'>");
后面还有 516 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
