This commit is contained in:
2024-09-01 16:54:09 +08:00
commit a7b6b88833
498 changed files with 54225 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
.red {
color: red;
}
.green {
color: green;
}
.gray {
color: gray;
}
.blue {
color: blue;
}
.layui-layout-admin .layui-body {
bottom: 0px;
}
.root {
height: 38px;
width: 50px;
}
.layui-icon-export {
font-size: 30px;
color: gray;
cursor: pointer;
}
.layui-icon-set-fill {
font-size: 30px;
color: gray;
cursor: pointer;
}
textarea {
resize: none !important;
}
::-webkit-input-placeholder {
color: #bbbbbb;
}
:-moz-placeholder {
color: #bbbbbb;
}
.ellipsis {
width: 300px;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
overflow: hidden;
}
.center {
text-align: center;
}
.select_menu{
font-weight: bolder;
}
.layui-input-wrap .layui-input-suffix.layui-input-split {
display: none;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+333
View File
@@ -0,0 +1,333 @@
var layer;
var element;
var form;
var laypage;
var laydate;
var xmSelect;
// 使用layui内部jQuery
var $ = layui.$;
var jQuery = layui.$;
$(function() {
// layer变量
layer = layui.layer;
element = layui.element;
form = layui.form;
laypage = layui.laypage;
// 执行一个laypage实例
laypage.render({
elem: 'pageInfo', // 渲染节点
count: page.total, // 总记录数
curr: page.pageNum, // 起始页
limit: page.pageSize, // 每页记录数
limits: [10, 20, 50, 100, 200], // 显示分页数
layout: ['count', 'prev', 'page', 'next', 'skip', 'limit'],
jump: function(obj, first) {
// 首次不执行
if (!first) {
// do something
$("input[name='pageNum']").val(obj.curr);
$("input[name='pageSize']").val(obj.limit);
$("#searchForm").submit();
}
}
});
// 多选组件
layui.config({
base: ctx + 'lib/layui/exts/xmSelect/'
}).extend({
xmSelect: 'xm-select'
}).use(['xmSelect'], function() {
xmSelect = layui.xmSelect;
if (typeof initXmSelect != "undefined") {
initXmSelect();
}
})
// 日期控件
layui.use('laydate', function() {
laydate = layui.laydate;
// 执行laydate实例
$(".laydate").each(function() {
$(this).attr("id", "date_" + guid());
$(this).attr("readonly", true);
laydate.render({
elem: "#" + $(this).attr("id"), // 指定元素
type: 'date',
trigger: 'click',
format: 'yyyy-MM-dd' // 可任意组合
});
})
$(".laytime").each(function() {
$(this).attr("id", "time_" + guid());
$(this).attr("readonly", true);
laydate.render({
elem: "#" + $(this).attr("id"), // 指定元素
type: 'datetime',
trigger: 'click',
format: 'yyyy-MM-dd HH:mm:ss' // 可任意组合
});
})
});
// 设置input[type='number']为正整数
$("input[type='number']").attr("lay-affix", "number");
$("input[type='number']").attr("lay-precision", 0); // 取整
$("input[type='number']").attr("min", 0);
$("input[type='number']").attr("max", 1000000);
$("input[type='number']").attr("step", 1); // 步进为1
$("input.money").attr("lay-precision", 2); //小数进度为2
$("input.money").attr("step", 0.01); // 步进为0.01
form.render();
// 关闭input自动填充
$("input").attr("autocomplete", "off");
// 菜单选中
var url = location.pathname.replace(/\//g, "/") + "?";
$("a[href*='" + url + "']:first").parent().addClass("layui-this");
// 只显示当前大类菜单
$("a[href*='" + url + "']").parent().parent().parent().addClass("layui-nav-itemed");
// 翻译按钮隐藏
$("#translate").hide();
})
// 关闭AJAX相应的缓存
$.ajaxSetup({
cache: false
});
// 退出登录
function loginOut() {
if (confirm("是否退出登录?")) {
location.href = ctx + "loginOut";
}
}
// 日期格式化
Date.prototype.format = function(format) {
var date = {
"M+": this.getMonth() + 1,
"d+": this.getDate(),
"H+": this.getHours(),
"m+": this.getMinutes(),
"s+": this.getSeconds(),
"q+": Math.floor((this.getMonth() + 3) / 3),
"S+": this.getMilliseconds()
};
if (/(y+)/i.test(format)) {
format = format.replace(RegExp.$1, (this.getFullYear() + '')
.substr(4 - RegExp.$1.length));
}
for (var k in date) {
if (new RegExp("(" + k + ")").test(format)) {
format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? date[k]
: ("00" + date[k]).substr(("" + date[k]).length));
}
}
return format;
}
function formatDate(now) {
if (now == null || now == '') {
return "";
}
return new Date(now).format("yyyy-MM-dd HH:mm:ss");
}
// 查看图片
function seePic(url) {
window.open(url);
}
// 生成uuid
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
function guid() {
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4()
+ S4() + S4());
}
// 时间字符串转时间戳
function strToTime(str) {
var str = str.replace(/-/g, '/');
var timestamp = new Date(str).getTime();
return timestamp
}
// 获取url参数
function getQueryString(name) {
/*
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null)
return unescape(r[2]);
return null;
*/
const paramsStr = window.location.search;
const params = new URLSearchParams(paramsStr);
return params.get(name); // list
}
// 下载文件
function downloadFile(url, name) {
window.open(ctx + "downloadFile?url=" + encodeURIComponent(url) + "&name="
+ encodeURIComponent(name));
}
// form转json
function form2JsonString(formId) {
var paramArray = $('#' + formId).serializeArray();
/* 请求参数转json对象 */
var jsonObj = {};
$(paramArray).each(function() {
jsonObj[this.name] = this.value;
});
return JSON.stringify(jsonObj);
}
function changeLang() {
$.ajax({
type: 'POST',
url: ctx + 'main/changeLang',
data: $("#adminForm").serialize(),
dataType: 'json',
success: function(data) {
if (data.success) {
location.reload();
} else {
layer.msg(data.msg);
}
},
error: function() {
layer.alert("请求失败,请刷新重试");
}
});
}
function setParamOrder(id, seq) {
if (seq == -1) {
// 前移
var prev = $("#" + id).prev();
$("#" + id).after(prev);
} else {
// 后移
var next = $("#" + id).next();
$("#" + id).before(next);
}
}
// 显示载入框
var loadIndex;
function showLoad() {
loadIndex = layer.load();
}
function closeLoad() {
layer.close(loadIndex);
}
function userCenter() {
location.href = ctx + "userPage/userCenter";
}
function adminCenter(group) {
location.href = ctx + "adminPage/adminCenter?group=" + group;
}
function showTgBind() {
layer.alert("在任意聊天窗口发送“@freecdnBot”然后点击这条消息即可打开与freecdnBot的聊天,发送任意消息给freecdnBot它会返回你的信息,其中包含一个ID,这就是我们需要的chat_id");
}
function goUser(id) {
if (location.href.indexOf("adminPage") > -1) {
location.href = ctx + "adminPage/user?pageSize=20&id=" + id;
}
}
function goOrder(id) {
if (location.href.indexOf("adminPage") > -1) {
location.href = ctx + "adminPage/orderAdmin?pageSize=20&id=" + id;
} else {
location.href = ctx + "userPage/order?pageSize=20&id=" + id;
}
}
function goMachineOrder(id) {
if (location.href.indexOf("adminPage") > -1) {
location.href = ctx + "adminPage/machineOrderAdmin?pageSize=20&id=" + id;
} else {
location.href = ctx + "userPage/machineOrder?pageSize=20&id=" + id;
}
}
function goMachine(id) {
if (location.href.indexOf("adminPage") > -1) {
location.href = ctx + "adminPage/machine?pageSize=20&id=" + id;
}
}
function goMachineVps(id) {
if (location.href.indexOf("adminPage") > -1) {
location.href = ctx + "adminPage/machineVps?pageSize=20&id=" + id;
}
}
function goDomain(id) {
if (location.href.indexOf("adminPage") > -1) {
location.href = ctx + "adminPage/domainAdmin?pageSize=20&id=" + id;
} else {
location.href = ctx + "userPage/domain?pageSize=20&id=" + id;
}
}
function goDomainOrder(orderId) {
if (location.href.indexOf("adminPage") > -1) {
location.href = ctx + "adminPage/domainAdmin?pageSize=20&orderId=" + orderId;
} else {
location.href = ctx + "userPage/domain?pageSize=20&orderId=" + orderId;
}
}
function goUpstreamOrder(orderId) {
if (location.href.indexOf("adminPage") > -1) {
location.href = ctx + "adminPage/upstreamAdmin?pageSize=20&orderId=" + orderId;
} else {
location.href = ctx + "userPage/upstream?pageSize=20&orderId=" + orderId;
}
}
function goCertOrder(orderId) {
if (location.href.indexOf("adminPage") > -1) {
location.href = ctx + "adminPage/certAdmin?pageSize=20&orderId=" + orderId;
} else {
location.href = ctx + "userPage/cert?pageSize=20&orderId=" + orderId;
}
}
function goProduct(id) {
if (location.href.indexOf("adminPage") > -1) {
location.href = ctx + "adminPage/product?pageSize=20&id=" + id;
}
}
@@ -0,0 +1,109 @@
var menuUrl;
$(function() {
})
function search() {
$("input[name='pageNum']").val(1);
$("#searchForm").submit();
}
function add() {
$("#id").val("");
$("#name").val("");
$("#descr").val("");
$("#adminId option:first").prop("selected", true);
form.render();
showWindow("添加");
}
function showWindow(title) {
layer.open({
type: 1,
title: title,
area: ['400px', '400px'], // 宽高
content: $('#windowDiv')
});
}
function addOver() {
if ($("#name").val().trim() == '') {
layer.msg("未填写名称");
return;
}
$.ajax({
type: 'POST',
url: ctx + 'adminPage/example/addOver',
data: $('#addForm').serialize(),
dataType: 'json',
success: function(data) {
if (data.success) {
location.reload();
} else {
layer.msg(data.msg);
}
},
error: function() {
layer.alert("请求失败,请刷新重试");
}
});
}
function edit(id) {
$("#id").val(id);
$.ajax({
type: 'GET',
url: ctx + 'adminPage/example/detail',
dataType: 'json',
data: {
id: id
},
success: function(data) {
if (data.success) {
var example = data.obj;
$("#id").val(example.id);
$("#name").val(example.name);
$("#descr").val(example.descr);
$("#adminId").val(example.adminId);
form.render();
showWindow("编辑");
} else {
layer.msg(data.msg);
}
},
error: function() {
layer.alert("请求失败,请刷新重试");
}
});
}
function del(id) {
if (confirm("确认删除?")) {
$.ajax({
type: 'POST',
url: ctx + 'adminPage/example/del',
data: {
id: id
},
dataType: 'json',
success: function(data) {
if (data.success) {
location.reload();
} else {
layer.msg(data.msg)
}
},
error: function() {
layer.alert("请求失败,请刷新重试");
}
});
}
}
@@ -0,0 +1,303 @@
//
// THIS FILE IS AUTOMATICALLY GENERATED! DO NOT EDIT BY HAND!
//
;(function(global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
? module.exports = factory()
: typeof define === 'function' && define.amd
? define(factory) :
// cf. https://github.com/dankogai/js-base64/issues/119
(function() {
// existing version for noConflict()
const _Base64 = global.Base64;
const gBase64 = factory();
gBase64.noConflict = () => {
global.Base64 = _Base64;
return gBase64;
};
if (global.Meteor) { // Meteor.js
Base64 = gBase64;
}
global.Base64 = gBase64;
})();
}((typeof self !== 'undefined' ? self
: typeof window !== 'undefined' ? window
: typeof global !== 'undefined' ? global
: this
), function() {
'use strict';
/**
* base64.ts
*
* Licensed under the BSD 3-Clause License.
* http://opensource.org/licenses/BSD-3-Clause
*
* References:
* http://en.wikipedia.org/wiki/Base64
*
* @author Dan Kogai (https://github.com/dankogai)
*/
const version = '3.5.2';
/**
* @deprecated use lowercase `version`.
*/
const VERSION = version;
const _hasatob = typeof atob === 'function';
const _hasbtoa = typeof btoa === 'function';
const _hasBuffer = typeof Buffer === 'function';
const _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;
const _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
const b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
const b64chs = [...b64ch];
const b64tab = ((a) => {
let tab = {};
a.forEach((c, i) => tab[c] = i);
return tab;
})(b64chs);
const b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
const _fromCC = String.fromCharCode.bind(String);
const _U8Afrom = typeof Uint8Array.from === 'function'
? Uint8Array.from.bind(Uint8Array)
: (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
const _mkUriSafe = (src) => src
.replace(/[+\/]/g, (m0) => m0 == '+' ? '-' : '_')
.replace(/=+$/m, '');
const _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, '');
/**
* polyfill version of `btoa`
*/
const btoaPolyfill = (bin) => {
// console.log('polyfilled');
let u32, c0, c1, c2, asc = '';
const pad = bin.length % 3;
for (let i = 0; i < bin.length;) {
if ((c0 = bin.charCodeAt(i++)) > 255 ||
(c1 = bin.charCodeAt(i++)) > 255 ||
(c2 = bin.charCodeAt(i++)) > 255)
throw new TypeError('invalid character found');
u32 = (c0 << 16) | (c1 << 8) | c2;
asc += b64chs[u32 >> 18 & 63]
+ b64chs[u32 >> 12 & 63]
+ b64chs[u32 >> 6 & 63]
+ b64chs[u32 & 63];
}
return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
};
/**
* does what `window.btoa` of web browsers do.
* @param {String} bin binary string
* @returns {string} Base64-encoded string
*/
const _btoa = _hasbtoa ? (bin) => btoa(bin)
: _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')
: btoaPolyfill;
const _fromUint8Array = _hasBuffer
? (u8a) => Buffer.from(u8a).toString('base64')
: (u8a) => {
// cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326
const maxargs = 0x1000;
let strs = [];
for (let i = 0, l = u8a.length; i < l; i += maxargs) {
strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
}
return _btoa(strs.join(''));
};
/**
* converts a Uint8Array to a Base64 string.
* @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5
* @returns {string} Base64 string
*/
const fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);
// This trick is found broken https://github.com/dankogai/js-base64/issues/130
// const utob = (src: string) => unescape(encodeURIComponent(src));
// reverting good old fationed regexp
const cb_utob = (c) => {
if (c.length < 2) {
var cc = c.charCodeAt(0);
return cc < 0x80 ? c
: cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))
+ _fromCC(0x80 | (cc & 0x3f)))
: (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))
+ _fromCC(0x80 | ((cc >>> 6) & 0x3f))
+ _fromCC(0x80 | (cc & 0x3f)));
}
else {
var cc = 0x10000
+ (c.charCodeAt(0) - 0xD800) * 0x400
+ (c.charCodeAt(1) - 0xDC00);
return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))
+ _fromCC(0x80 | ((cc >>> 12) & 0x3f))
+ _fromCC(0x80 | ((cc >>> 6) & 0x3f))
+ _fromCC(0x80 | (cc & 0x3f)));
}
};
const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
/**
* @deprecated should have been internal use only.
* @param {string} src UTF-8 string
* @returns {string} UTF-16 string
*/
const utob = (u) => u.replace(re_utob, cb_utob);
//
const _encode = _hasBuffer
? (s) => Buffer.from(s, 'utf8').toString('base64')
: _TE
? (s) => _fromUint8Array(_TE.encode(s))
: (s) => _btoa(utob(s));
/**
* converts a UTF-8-encoded string to a Base64 string.
* @param {boolean} [urlsafe] if `true` make the result URL-safe
* @returns {string} Base64 string
*/
const encode = (src, urlsafe = false) => urlsafe
? _mkUriSafe(_encode(src))
: _encode(src);
/**
* converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.
* @returns {string} Base64 string
*/
const encodeURI = (src) => encode(src, true);
// This trick is found broken https://github.com/dankogai/js-base64/issues/130
// const btou = (src: string) => decodeURIComponent(escape(src));
// reverting good old fationed regexp
const re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
const cb_btou = (cccc) => {
switch (cccc.length) {
case 4:
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
| ((0x3f & cccc.charCodeAt(1)) << 12)
| ((0x3f & cccc.charCodeAt(2)) << 6)
| (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;
return (_fromCC((offset >>> 10) + 0xD800)
+ _fromCC((offset & 0x3FF) + 0xDC00));
case 3:
return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)
| ((0x3f & cccc.charCodeAt(1)) << 6)
| (0x3f & cccc.charCodeAt(2)));
default:
return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)
| (0x3f & cccc.charCodeAt(1)));
}
};
/**
* @deprecated should have been internal use only.
* @param {string} src UTF-16 string
* @returns {string} UTF-8 string
*/
const btou = (b) => b.replace(re_btou, cb_btou);
/**
* polyfill version of `atob`
*/
const atobPolyfill = (asc) => {
// console.log('polyfilled');
asc = asc.replace(/\s+/g, '');
if (!b64re.test(asc))
throw new TypeError('malformed base64.');
asc += '=='.slice(2 - (asc.length & 3));
let u24, bin = '', r1, r2;
for (let i = 0; i < asc.length;) {
u24 = b64tab[asc.charAt(i++)] << 18
| b64tab[asc.charAt(i++)] << 12
| (r1 = b64tab[asc.charAt(i++)]) << 6
| (r2 = b64tab[asc.charAt(i++)]);
bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)
: r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)
: _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);
}
return bin;
};
/**
* does what `window.atob` of web browsers do.
* @param {String} asc Base64-encoded string
* @returns {string} binary string
*/
const _atob = _hasatob ? (asc) => atob(_tidyB64(asc))
: _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')
: atobPolyfill;
//
const _toUint8Array = _hasBuffer
? (a) => _U8Afrom(Buffer.from(a, 'base64'))
: (a) => _U8Afrom(_atob(a), c => c.charCodeAt(0));
/**
* converts a Base64 string to a Uint8Array.
*/
const toUint8Array = (a) => _toUint8Array(_unURI(a));
//
const _decode = _hasBuffer
? (a) => Buffer.from(a, 'base64').toString('utf8')
: _TD
? (a) => _TD.decode(_toUint8Array(a))
: (a) => btou(_atob(a));
const _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));
/**
* converts a Base64 string to a UTF-8 string.
* @param {String} src Base64 string. Both normal and URL-safe are supported
* @returns {string} UTF-8 string
*/
const decode = (src) => _decode(_unURI(src));
//
const _noEnum = (v) => {
return {
value: v, enumerable: false, writable: true, configurable: true
};
};
/**
* extend String.prototype with relevant methods
*/
const extendString = function () {
const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));
_add('fromBase64', function () { return decode(this); });
_add('toBase64', function (urlsafe) { return encode(this, urlsafe); });
_add('toBase64URI', function () { return encode(this, true); });
_add('toBase64URL', function () { return encode(this, true); });
_add('toUint8Array', function () { return toUint8Array(this); });
};
/**
* extend Uint8Array.prototype with relevant methods
*/
const extendUint8Array = function () {
const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
_add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });
_add('toBase64URI', function () { return fromUint8Array(this, true); });
_add('toBase64URL', function () { return fromUint8Array(this, true); });
};
/**
* extend Builtin prototypes with relevant methods
*/
const extendBuiltins = () => {
extendString();
extendUint8Array();
};
const gBase64 = {
version: version,
VERSION: VERSION,
atob: _atob,
atobPolyfill: atobPolyfill,
btoa: _btoa,
btoaPolyfill: btoaPolyfill,
fromBase64: decode,
toBase64: encode,
encode: encode,
encodeURI: encodeURI,
encodeURL: encodeURI,
utob: utob,
btou: btou,
decode: decode,
fromUint8Array: fromUint8Array,
toUint8Array: toUint8Array,
extendString: extendString,
extendUint8Array: extendUint8Array,
extendBuiltins: extendBuiltins,
};
//
// export Base64 to the namespace
//
// ES5 is yet to have Object.assign() that may make transpilers unhappy.
// gBase64.Base64 = Object.assign({}, gBase64);
gBase64.Base64 = {};
Object.keys(gBase64).forEach(k => gBase64.Base64[k] = gBase64[k]);
return gBase64;
}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
<!DOCTYPE html><html><head><script>var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?758a90d7d534804ddd66137da7c9ee69";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();</script><link rel="preload" href="./xm-select.js" as="script"><link rel="preload" href="./static/docs.js" as="script"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><title>xm-select</title><link rel="stylesheet" href="https://www.layuicdn.com/layui-v2.5.5/css/layui.css"><script src="https://www.layuicdn.com/layui-v2.5.5/layui.all.js"></script><script src="https://unpkg.com/axios/dist/axios.min.js"></script></head><body><div id="app"></div><script type="text/javascript" src="./xm-select.js"></script><script type="text/javascript" src="./static/docs.js"></script></body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 322 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1,132 @@
@charset "utf-8";
/* 以下实际使用若已初始化可删除 .lsm-sidebar height父级需逐级设置为100%*/
body,html{height: 100%;background: #E2E2E2}
body,ul{margin:0;padding:0}
body{font:14px "微软雅黑","宋体","Arial Narrow",HELVETICA;-webkit-text-size-adjust:100%;}
li{list-style:none}
a{text-decoration:none;}
/* 以上实际使用若已初始化可删除 */
/* lsm-sidebar */
.left-side-menu,.lsm-popup.lsm-sidebar ul li, .lsm-container.lsm-mini .lsm-sidebar>ul>li.lsm-sidebar-item>ul>li.lsm-sidebar-item>ul{
background: #3b3e47;
}
.left-side-menu {-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none; user-select: none; }
.left-side-menu{height: calc(100% - 80px);width: 220px;}
.lsm-expand-btn{height: 65px;}
.lsm-container {height: calc(100% - 65px); transition: all .3s;z-index: 100}
.lsm-container li>a.active{ background: #c55b03; color: #fff; }
.lsm-sidebar a{display: block;overflow: hidden;padding-left: 20px;line-height: 40px;max-height: 40px;color: #b2b8be;transition: all .3s;}
.lsm-container ul:first-child > li> a, .lsm-container ul:first-child > li> a span{ line-height: 55px;max-height: 55px; }
.lsm-sidebar a span{margin-left: 30px;}
.lsm-sidebar .lsm-sidebar-item .lsm-sidebar-item >ul>li a span{margin-left: 60px;}
.lsm-sidebar-item{position: relative;}
.lsm-sidebar-item.lsm-sidebar-show{border-bottom: none;}
.lsm-sidebar-item ul{display: none;background: rgba(0,0,0,.1);}
.lsm-sidebar-item.lsm-sidebar-show ul{display: block;}
.lsm-sidebar-item>a:before{content: "";position: absolute;left: 0px;width: 2px;height: 40px;background: #34A0CE;opacity:0;transition: all .3s;}
.lsm-container ul:first-child>li.lsm-sidebar-item>a:before{height: 55px;}
.lsm-sidebar .lsm-sidebar-icon{font-size: 20px;position: absolute;margin-left:-1px;}
/* 此处修改导航图标 可自定义iconfont 替换*/
.icon_1::after{content: "\e62b";}
.icon_2::after{content: "\e669";}
.icon_3::after{content: "\e61d";}
.icon_3::after{content: "\e698";}
.lsm-sidebar-more{float:right;margin-right: 20px;font-size: 12px;transition: transform .3s;}
/* 导航右侧箭头 换用其他字体需要替换*/
.lsm-sidebar-more::after{content: "\e621";}
.lsm-sidebar-show > a > i.my-icon.lsm-sidebar-more{transform:rotate(90deg);}
.lsm-sidebar-show,.lsm-sidebar-item>a:hover{color: #FFF;background: rgba(0, 0, 0, 0.2);}
.lsm-sidebar-show>a:before,.lsm-sidebar-item>a:hover:before{opacity:1;}
.lsm-sidebar-item li>a:hover,.lsm-popup>div>ul>li>a:hover{color: #FFF; background: #6e809c;}
.lsm-mini-btn{height: 70px;width: 70px;}
.lsm-mini-btn svg{margin: -10px 0 0 -10px;}
.lsm-mini-btn input[type="checkbox"]{display: none;}
.lsm-mini-btn path {
fill: none;
stroke: #ffffff;
stroke-width: 3;
stroke-linecap: round;
stroke-linejoin: round;
--length: 24;
--offset: -38;
stroke-dasharray: var(--length) var(--total-length);
stroke-dashoffset: var(--offset);
transition: all .8s cubic-bezier(.645, .045, .355, 1);
}
.lsm-mini-btn circle {fill: #fff3;opacity: 0;}
.lsm-mini-btn label {top: 0; right: 0;}
.lsm-mini-btn label:hover circle {opacity: 1;}
.lsm-mini-btn input:checked+svg .line--1, .lsm-mini-btn input:checked+svg .line--3 {--length: 8.602325267;}
.lsm-mini-btn .line--1, .lsm-mini-btn .line--3 {--total-length: 126.38166809082031;}
.lsm-mini-btn .line--2 {--total-length: 80;}
.lsm-mini-btn input:checked+svg .line--1, .lsm-mini-btn input:checked+svg .line--3 {--offset: -109.1770175568;}
.lsm-mini .lsm-container, .lsm-mini .lsm-container{width: 60px;}
.lsm-container.lsm-mini .lsm-sidebar .lsm-sidebar-icon{/* margin-left:-2px; */}
.left-side-menu.lsm-mini ul:first-child>li.lsm-sidebar-item>a span{display: none;}
.left-side-menu.lsm-mini ul:first-child>li.lsm-sidebar-item>a> i.lsm-sidebar-more{margin-right: -20px;}
.lsm-container.lsm-mini .lsm-sidebar>ul>li.lsm-sidebar-item>ul>li.lsm-sidebar-item>ul{
display:none;
position: absolute;top:0px;left:180px;width: 180px;z-index: 99;
bottom: 0px;
top: 0px;
overflow: hidden;
}
.left-side-menu.lsm-mini ul:first-child > li > ul{
display: none;
}
.transform { -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1); }
.lsm-popup div{background: #05161f;}
.lsm-popup{
display: block;
position: absolute;
border: 3px solid rgba(60, 71, 76, 0);
}
.lsm-popup > div > a > i.my-icon.lsm-sidebar-more{
transform:rotate(90deg);
}
.lsm-popup.second{
left: 60px;
}
.lsm-popup.third{
left: 243px;
}
.lsm-popup.third.lsm-sidebar > div > ul {
display: block;
}
.lsm-popup div {
border-radius: 5px;
}
.lsm-popup .lsm-sidebar-icon{
display: none;
}
.lsm-popup.lsm-sidebar a span{
margin-left: 0px;
}
.lsm-popup.lsm-sidebar > div > ul > li.lsm-sidebar-item>ul{position: absolute;top:0px;left:180px;width: 180px;z-index: 99;}
.lsm-popup.lsm-sidebar ul {
width: 180px;
}
.lsm-popup.lsm-sidebar ul li{
width: 180px;
}
.lsm-popup.lsm-sidebar ul li:last-child, .lsm-popup>div>ul>li:last-child>a{
border-radius: 0 0 5px 5px ;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

File diff suppressed because one or more lines are too long
@@ -0,0 +1,16 @@
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.3.8
*
*/
(function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},f);this.each(function(){function v(d){if(r){d=d||window.event;
var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,g,e){k=!1;var f=b.outerHeight()-c.outerHeight();g&&(g=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),f),g=0<d?Math.ceil(g):Math.floor(g),c.css({top:g+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());g=
l*(b[0].scrollHeight-b.outerHeight());e&&(g=d,d=g/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),f),c.css({top:d+"px"}));b.scrollTop(g);b.trigger("slimscrolling",~~g);w();p()}function x(){u=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),30);c.css({height:u+"px"});var a=u==b.outerHeight()?"none":"block";c.css({display:a})}function w(){x();clearTimeout(B);l==~~l?(k=a.allowPageScroll,C!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;C=l;u>=b.outerHeight()?k=!0:(c.stop(!0,
!0).fadeIn("fast"),a.railVisible&&m.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),m.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var q=b.scrollTop(),c=b.siblings("."+a.barClass),m=b.siblings("."+a.railClass);x();if(e.isPlainObject(f)){if("height"in f&&"auto"==f.height){b.parent().css("height","auto");b.css("height","auto");var h=b.parent().parent().height();b.parent().css("height",
h);b.css("height",h)}else"height"in f&&(h=f.height,b.parent().css("height",h),b.css("height",h));if("scrollTo"in f)q=parseInt(a.scrollTo);else if("scrollBy"in f)q+=parseInt(a.scrollBy);else if("destroy"in f){c.remove();m.remove();b.unwrap();return}n(q,!1,!0)}}else if(!(e.isPlainObject(f)&&"destroy"in f)){a.height="auto"==a.height?b.parent().height():a.height;q=e("<div></div>").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",
width:a.width,height:a.height});var m=e("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,
WebkitBorderRadius:a.borderRadius,zIndex:99}),h="right"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(q);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);n(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",
function(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});
x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),n(0,!0)):"top"!==a.start&&(n(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
@@ -0,0 +1,97 @@
$(function(){
$('.lsm-scroll').slimscroll({
height: 'auto',
position: 'right',
railOpacity: 1,
size: "5px",
opacity: .4,
color: '#fffafa',
wheelStep: 5,
touchScrollStep: 50
});
$('.lsm-container ul ul').css("display", "none");
// lsm-sidebar收缩展开
$('.lsm-sidebar a').on('click',function(){
$('.lsm-scroll').slimscroll({
height: 'auto',
position: 'right',
size: "8px",
color: '#9ea5ab',
wheelStep: 5,
touchScrollStep: 50
});
if (!$('.left-side-menu').hasClass('lsm-mini')) {
$(this).parent("li").siblings("li.lsm-sidebar-item").children('ul').slideUp(200);
if ($(this).next().css('display') == "none") {
//展开未展开
// $('.lsm-sidebar-item').children('ul').slideUp(300);
$(this).next('ul').slideDown(200);
$(this).parent('li').addClass('lsm-sidebar-show').siblings('li').removeClass('lsm-sidebar-show');
}else{
//收缩已展开
$(this).next('ul').slideUp(200);
//$('.lsm-sidebar-item.lsm-sidebar-show').removeClass('lsm-sidebar-show');
$(this).parent('li').removeClass('lsm-sidebar-show');
}
}
});
//lsm-mini
$('.lsm-mini-btn svg').on('click',function(){
if ($('.lsm-mini-btn input[type="checkbox"]').prop("checked")) {
$('.lsm-sidebar-item.lsm-sidebar-show').removeClass('lsm-sidebar-show');
$('.lsm-container ul').removeAttr('style');
$('.left-side-menu').addClass('lsm-mini');
$('.left-side-menu').stop().animate({width : 60},200);
}else{
$('.left-side-menu').removeClass('lsm-mini');
$('.lsm-container ul ul').css("display", "none");
$('.left-side-menu').stop().animate({width: 240},200);
}
});
$(document).on('mouseover','.lsm-mini .lsm-container ul:first>li',function(){
$(".lsm-popup.third").hide();
$(".lsm-popup.second").length == 0 && ($(".lsm-container").append("<div class='second lsm-popup lsm-sidebar'><div></div></div>"));
$(".lsm-popup.second>div").html($(this).html());
$(".lsm-popup.second").show();
$(".lsm-popup.third").hide();
var top = $(this).offset().top;
var d = $(window).height() - $(".lsm-popup.second>div").height();
if(d - top <= 0 ){
top = d >= 0 ? d - 8 : 0;
}
$(".lsm-popup.second").stop().animate({"top":top}, 100);
});
$(document).on('mouseover','.second.lsm-popup.lsm-sidebar > div > ul > li',function(){
if(!$(this).hasClass("lsm-sidebar-item")){
$(".lsm-popup.third").hide();
return;
}
$(".lsm-popup.third").length == 0 && ($(".lsm-container").append("<div class='third lsm-popup lsm-sidebar'><div></div></div>"));
$(".lsm-popup.third>div").html($(this).html());
$(".lsm-popup.third").show();
var top = $(this).offset().top;
var d = $(window).height() - $(".lsm-popup.third").height();
if(d - top <= 0 ){
top = d >= 0 ? d - 8 : 0;
}
$(".lsm-popup.third").stop().animate({"top":top}, 100);
});
$(document).on('mouseleave','.lsm-mini .lsm-container ul:first, .lsm-mini .slimScrollBar,.second.lsm-popup ,.third.lsm-popup',function(){
$(".lsm-popup.second").hide();
$(".lsm-popup.third").hide();
});
$(document).on('mouseover','.lsm-mini .slimScrollBar,.second.lsm-popup',function(){
$(".lsm-popup.second").show();
});
$(document).on('mouseover','.third.lsm-popup',function(){
$(".lsm-popup.second").show();
$(".lsm-popup.third").show();
});
showMenu();
});
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
/*!
* SweetDropdown: Sweet and versatile dropdowns
* v1.0.0, 2017-04-09
* http://github.com/adeptoas/sweet-dropdown
*
* Copyright (c) 2016 Adepto.as AS · Oslo, Norway
* Dual licensed under the MIT and GPL licenses.
*
* See LICENSE-MIT.txt and LICENSE-GPL.txt
*/
!function($){var showDropdown;return $.fn.sweetDropdown=function(method,data){switch(method){case"attach":return $(this).attr("data-dropdown",data);case"detach":return $(this).removeAttr("data-dropdown");case"show":return $(this).click();case"hide":return $.sweetDropdown.hideAll(),$(this);case"enable":return $(this).removeClass("dropdown-disabled");case"disable":return $(this).addClass("dropdown-disabled")}},$.sweetDropdown=function(){},$.sweetDropdown.attachAll=function(){return $("body").off("click.dropdown").on("click.dropdown","[data-dropdown]",showDropdown),$("[data-dropdown]").off("click.dropdown").on("click.dropdown",showDropdown),$("html, .sweet-modal-content").off("click.dropdown").on("click.dropdown",$.sweetDropdown.hideAll),$(window).off("resize.dropdown").on("resize.dropdown",$.sweetDropdown.hideAll),!0},$.sweetDropdown.hideAll=function(e,hideException){var animTimeout,el,hideExceptionID,targetGroup,trigger;return null==e&&(e=null),null==hideException&&(hideException=null),targetGroup=e?$(e.target).parents().addBack():null,targetGroup&&targetGroup.hasClass("dropdown-menu")&&!targetGroup.is("A")?void 0:(el=".dropdown-menu",trigger="[data-dropdown]",hideExceptionID="",hideException&&(hideExceptionID=$(hideException).attr("id"),$('[data-dropdown="#'+hideExceptionID+'"]').hasClass("dropdown-open")||(el=".dropdown-menu:not(#"+hideExceptionID+")",trigger='[data-dropdown!="#'+hideExceptionID+'"]')),$("body").find(el).removeClass("dropdown-opened").end().find(trigger).removeClass("dropdown-open"),animTimeout=window.setTimeout(function(){return $("body").find(el).hide().end()},200),!0)},$.sweetDropdown.ANCHOR_POSITIONS=["top-left","top-center","top-right","right-top","right-center","right-bottom","bottom-left","bottom-center","bottom-right","left-top","left-center","left-bottom"],$.sweetDropdown.defaults={anchorPosition:"center"},showDropdown=function(e){var $anchor,$dropdown,$trigger,addAnchorX,addAnchorY,addX,addY,anchorPosition,anchorSide,bottomTrigger,hasAnchor,heightDropdown,heightTrigger,i,isDisabled,isOpen,left,leftTrigger,len,position,positionParts,ref,rightTrigger,top,topTrigger,widthDropdown,widthTrigger;if(null==e&&(e=null),$trigger=$(this),$dropdown=$($trigger.data("dropdown")),$anchor=$dropdown.find(".dropdown-anchor"),hasAnchor=$dropdown.hasClass("dropdown-has-anchor"),isOpen=$trigger.hasClass("dropdown-open"),isDisabled=$trigger.hasClass("dropdown-disabled"),widthDropdown=$dropdown.outerWidth(),widthTrigger=$trigger.outerWidth(),heightDropdown=$dropdown.outerHeight(),heightTrigger=$trigger.outerHeight(),topTrigger=$trigger.position().top,leftTrigger=$trigger.position().left,$trigger.hasClass("dropdown-use-offset")&&(topTrigger=$trigger.offset().top,leftTrigger=$trigger.offset().left),bottomTrigger=topTrigger+heightTrigger,rightTrigger=leftTrigger+widthTrigger,$dropdown.length<1)return console.error("[SweetDropdown] Could not find dropdown: "+$(this).data("dropdown"));if($anchor.length<1&&hasAnchor&&($anchor=$('<div class="dropdown-anchor"></div>'),$dropdown.prepend($anchor)),void 0!==e&&(e.preventDefault(),e.stopPropagation()),isOpen||isDisabled)return!1;for($.sweetDropdown.hideAll(null,$trigger.data("dropdown")),anchorPosition=$.sweetDropdown.defaults.anchorPosition,ref=$.sweetDropdown.ANCHOR_POSITIONS,i=0,len=ref.length;len>i;i++)position=ref[i],$dropdown.hasClass("dropdown-anchor-"+position)&&(anchorPosition=position);if(top=0,left=0,positionParts=anchorPosition.split("-"),anchorSide=positionParts[0],anchorPosition=positionParts[1],"top"===anchorSide||"bottom"===anchorSide)switch(anchorPosition){case"left":left=leftTrigger;break;case"center":left=leftTrigger-widthDropdown/2+widthTrigger/2;break;case"right":left=rightTrigger-widthDropdown}if("left"===anchorSide||"right"===anchorSide)switch(anchorPosition){case"top":top=topTrigger;break;case"center":top=topTrigger-heightDropdown/2+heightTrigger/2;break;case"bottom":top=topTrigger+heightTrigger-heightDropdown}switch(anchorSide){case"top":top=topTrigger+heightTrigger;break;case"right":left=leftTrigger-widthDropdown;break;case"bottom":top=topTrigger-heightDropdown;break;case"left":left=leftTrigger+widthTrigger}return addX=parseInt($dropdown.data("add-x")),addY=parseInt($dropdown.data("add-y")),isNaN(addX)||(left+=addX),isNaN(addY)||(top+=addY),addAnchorX=parseInt($trigger.data("add-anchor-x")),addAnchorY=parseInt($trigger.data("add-anchor-y")),isNaN(addAnchorX)||$anchor.css({marginLeft:addAnchorX}),isNaN(addAnchorY)||$anchor.css({marginTop:addAnchorY}),$dropdown.css({top:top,left:left,display:"block"}),window.setTimeout(function(){return $dropdown.addClass("dropdown-opened")},0),$trigger.addClass("dropdown-open"),$trigger},$(function(){return $.sweetDropdown.attachAll()})}(jQuery);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>API 文档 [zTree -- jQuery 树插件]</title>
<link rel="stylesheet" href="apiCss/common.css" type="text/css">
<link rel='stylesheet' href='apiCss/zTreeStyleForApi.css' type='text/css'>
<script type="text/javascript">
var ie = (function(){
var undef,
v = 3,
div = document.createElement('div'),
all = div.getElementsByTagName('i');
while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);
return v > 4 ? v : undef;
}()), ie6 = (ie === 6),
path = window.location.pathname.replace(/.*\/([^\/\.]*)\..*/g,"$1"),
langLib = [];
ie = ie<9;
if(ie) {
document.write('<link rel="stylesheet" href="apiCss/common_ie6.css" type="text/css">');
}
var lang = "cn",
ajaxMsg = "如果你使用的是 Chrome 浏览器,那么请把 API 文档发布到 web 服务目录下访问。\n\n(Chrome 浏览器不支持本地 ajax 访问, 即:file://";
</script>
</head>
<body>
<div id="header_wrap" class="header_wrap" style="padding-top: 30px;">
<div id="header" class="header round">
<div class="light-bulb" alt=""></div>
<div class="ieSuggest">浏览本网站建议您使用 Chrome、FireFox、Opera、IE9 等浏览器(只要不是 IE6 7 8 就行), 速度会更快,画面会更炫!</div>
<div class="google_plus"><g:plusone></g:plusone></div>
<div class="header-text">
<h1><em>zTree v3.5.37 API 文档</em></h1><p></p>
<p>all.js = core + excheck + exedit ( 不包括 exhide ); 发现错误请及时通知,谢谢。</p>
</div>
<ul class="shortcuts language" style="top:0;">
<li><a href="API_en.html" onclick="window.location.href='API_en.html'"><button class="ico en" title="英文版" type="button"></button><span class=""></span></a></li>
</ul>
</div>
</div>
<div id="content_wrap" class="content_wrap">
<div id="content" class="content">
<div class="nav_section">
<ul>
<li class="first">注释:</li>
<li><button class="ico16 z_core" onfocus="this.blur();"></button><span>core 核心包</span></li>
<li><button class="ico16 z_check" onfocus="this.blur();"></button><span>excheck 扩展</span></li>
<li><button class="ico16 z_edit" onfocus="this.blur();"></button><span>exedit 扩展</span></li>
<li><button class="ico16 z_hide" onfocus="this.blur();"></button><span>exhide 扩展</span></li>
<li class="noline">
<button class="ico16 z_search" onfocus="this.blur();" title="Enter 以及 左、右键可以快速定位查找结果"></button>
<input type="text" class="searchKey search empty" value=""><input type="text" class="searchResult search" value="">
<button class="ico16 searchPrev disabled" onfocus="this.blur();" title="Enter 以及 左、右键可以快速定位查找结果"></button><button class="ico16 searchNext disabled" onfocus="this.blur();" title="Enter 以及 左、右键可以快速定位查找结果"></button>
</li>
</ul>
</div>
<div id="contentBox" class="contentBox round clearfix">
<div id="apiContent" class="apiContent">
<div id="api_setting" class="api_setting left">
<ul class="api_content_title"><li>setting 配置详解</li></ul>
<ul id="settingTree" class="ztree"></ul>
</div>
<div id="api_function" class="api_function right">
<ul class="api_content_title"><li>zTree 方法详解</li></ul>
<ul id="functionTree" class="ztree"></ul>
<ul class="api_content_title"><li>treeNode 节点数据详解</li></ul>
<ul id="treenodeTree" class="ztree"></ul>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<!-- overlayed -->
<div id="overlayDiv" class="baby_overlay">
<div id="overlayContent" class="content round clearfix">
<div class="overlaySearch">
<button class="ico16 z_search" onfocus="this.blur();" title="Enter 以及 左、右键可以快速定位查找结果"></button>
<input type="text" class="searchKey search empty" value=""><input type="text" class="searchResult search" value="">
<button class="ico16 searchPrev disabled" onfocus="this.blur();" title="Enter 以及 左、右键可以快速定位查找结果"></button><button class="ico16 searchNext disabled" onfocus="this.blur();" title="Enter 以及 左、右键可以快速定位查找结果"></button>
</div>
<a id="overlayDivCloseBtn" class="close"></a>
<div id="overlayDetailDiv" class="details"></div>
</div>
<div id="overlayDivArrow" class="baby_overlay_arrow"></div>
</div>
<script type="text/javascript" src="apiCss/jquery-1.6.2.min.js"></script>
<script type='text/javascript' src='apiCss/jquery.ztree.core.js'></script>
<script type='text/javascript' src='apiCss/api.js'></script>
<script type="text/javascript">
$(document).ready(function(){
apiContent._init();
});
</script>
</body>
</html>
@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>API Document [zTree -- jQuery tree plug-ins.]</title>
<link rel="stylesheet" href="apiCss/common.css" type="text/css">
<link rel='stylesheet' href='apiCss/zTreeStyleForApi.css' type='text/css'>
<script type="text/javascript">
var ie = (function(){
var undef,
v = 3,
div = document.createElement('div'),
all = div.getElementsByTagName('i');
while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);
return v > 4 ? v : undef;
}()), ie6 = (ie === 6),
path = window.location.pathname.replace(/.*\/([^\/\.]*)\..*/g,"$1"),
langLib = [];
ie = ie<9;
if(ie) {
document.write('<link rel="stylesheet" href="apiCss/common_ie6.css" type="text/css">');
}
var lang = "en",
ajaxMsg = "If you use chrome browser, please copy the API files to local webserver. \n\n( because chrome browser can't allow AJAX access to 'file://' )";
</script>
</head>
<body>
<div id="header_wrap" class="header_wrap" style="padding-top: 30px;">
<div id="header" class="header round">
<div class="light-bulb" alt=""></div>
<div class="ieSuggest">If you use the Chrome / FireFox / Opera / IE9 browser will be even more dazzling effect!</div>
<div class="google_plus"><g:plusone></g:plusone></div>
<div class="header-text">
<h1><em>zTree v3.5.37 API Document</em></h1><p></p>
<p>all.js = core + excheck + exedit ( without exhide ); if you found some mistakes please contact me.</p>
</div>
<ul class="shortcuts language" style="top:0;">
<li><a href="API_cn.html" onclick="window.location.href='API_cn.html'"><button class="ico cn" title="Chinese" type="button"></button><span class=""></span></a></li>
</ul>
</div>
</div>
<div id="content_wrap" class="content_wrap">
<div id="content" class="content">
<div class="nav_section">
<ul>
<li class="first">Notes: </li>
<li><button class="ico16 z_core" onfocus="this.blur();"></button><span>core package</span></li>
<li><button class="ico16 z_check" onfocus="this.blur();"></button><span>excheck pack</span></li>
<li><button class="ico16 z_edit" onfocus="this.blur();"></button><span>exedit pack</span></li>
<li><button class="ico16 z_hide" onfocus="this.blur();"></button><span>exhide pack</span></li>
<li class="noline">
<button class="ico16 z_search" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
<input type="text" class="searchKey search empty" value=""><input type="text" class="searchResult search" value="">
<button class="ico16 searchPrev disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button><button class="ico16 searchNext disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
</li>
</ul>
</div>
<div id="contentBox" class="contentBox round clearfix">
<div id="apiContent" class="apiContent">
<div id="api_setting" class="api_setting left">
<ul class="api_content_title"><li>setting details</li></ul>
<ul id="settingTree" class="ztree"></ul>
</div>
<div id="api_function" class="api_function right">
<ul class="api_content_title"><li>zTree method details</li></ul>
<ul id="functionTree" class="ztree"></ul>
<ul class="api_content_title"><li>treeNode data details</li></ul>
<ul id="treenodeTree" class="ztree"></ul>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<!-- overlayed -->
<div id="overlayDiv" class="baby_overlay">
<div id="overlayContent" class="content round clearfix">
<div class="overlaySearch">
<button class="ico16 z_search" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
<input type="text" class="searchKey search empty" value=""><input type="text" class="searchResult search" value="">
<button class="ico16 searchPrev disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button><button class="ico16 searchNext disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
</div>
<a id="overlayDivCloseBtn" class="close"></a>
<div id="overlayDetailDiv" class="details"></div>
</div>
<div id="overlayDivArrow" class="baby_overlay_arrow"></div>
</div>
<script type="text/javascript" src="apiCss/jquery-1.6.2.min.js"></script>
<script type='text/javascript' src='apiCss/jquery.ztree.core.js'></script>
<script type='text/javascript' src='apiCss/api.js'></script>
<script type="text/javascript">
$(document).ready(function(){
apiContent._init();
});
</script>
</body>
</html>
@@ -0,0 +1,599 @@
var apiContent = {
zTree_Setting: null,
zTree_Node: null,
zTree_Function: null,
overlayDiv : null,
overlayContent : null,
overlayDetailDiv : null,
overlayCloseBtn: null,
overlayArrow: null,
contentBoxDiv : null,
settingDiv : null,
functionDiv : null,
overlaySearch: null,
searchKey: null,
searchResultInput: null,
searchPrevBtn: null,
searchNextBtn: null,
apiCache: {},
lastValue: "",
searchNodes: [],
searchNodesCur: 0,
_init: function() {
this.overlayDiv = $("#overlayDiv");
this.overlayContent = $("#overlayContent");
this.overlayDetailDiv = $("#overlayDetailDiv");
this.overlayCloseBtn = $("#overlayDivCloseBtn");
this.overlayArrow = $("#overlayDivArrow");
this.contentBoxDiv = $("#contentBox");
this.settingDiv = $("#api_setting");
this.functionDiv = $("#api_function");
this.searchKey = $(".searchKey");
this.overlaySearch = $(".overlaySearch");
this.searchResultInput = $(".searchResult");
this.searchPrevBtn = $(".searchPrev");
this.searchNextBtn = $(".searchNext");
var setting = {
view: {
fontCss: this.getFontCss,
showLine: false,
showIcon: this.showIcon,
showTitle: this.getTitle,
selectedMulti: false,
dblClickExpand: false
},
data: {
key: {
title: "tt"
},
simpleData: {
enable:true,
idKey: "id",
pIdKey: "pId",
rootPId: ""
}
},
callback: {
onNodeCreated: this.onNodeCreated,
beforeClick: this.beforeClick
}
};
var setting_nodes =[
{id:1, pId:0, t:"setting", name:"var setting = {", open:true},
{id:11, pId:1, t:"treeId", name:"treeId : \"\",", iconSkin:"core", showAPI:true},
{id:12, pId:1, t:"treeObj", name:"treeObj : null,", iconSkin:"core", showAPI:true},
{id:121, pId:1, name:""},
{id:20, pId:1, t:"async", name:"async : {", open:true},
{id:201, pId:20, t:"autoParam", name:"autoParam : [],", iconSkin:"core", showAPI:true},
{id:208, pId:20, t:"contentType", name:"contentType : \"application...\",", iconSkin:"core", showAPI:true},
{id:202, pId:20, t:"dataFilter", name:"dataFilter : null,", iconSkin:"core", showAPI:true},
{id:203, pId:20, t:"dataType", name:"dataType : \"text\",", iconSkin:"core", showAPI:true},
{id:204, pId:20, t:"enable", name:"enable : false,", iconSkin:"core", showAPI:true},
{id:205, pId:20, t:"otherParam", name:"otherParam : [],", iconSkin:"core", showAPI:true},
{id:206, pId:20, t:"type", name:"type : \"post\",", iconSkin:"core", showAPI:true},
{id:209, pId:20, t:"headers", name:"headers : {},", iconSkin:"core", showAPI:true},
{id:210, pId:20, t:"xhrFields", name:"xhrFields : {},", iconSkin:"core", showAPI:true},
{id:207, pId:20, t:"url", name:"url : \"\"", iconSkin:"core", showAPI:true},
{id:21, pId:1, name:"},"},
{id:22, pId:1, name:""},
{id:30, pId:1, t:"callback", name:"callback : {", open:true},
{id:3001, pId:30, t:"beforeAsync", name:"beforeAsync : null,", iconSkin:"core", showAPI:true},
{id:3002, pId:30, t:"beforeCheck", name:"beforeCheck : null,", iconSkin:"check", showAPI:true},
{id:3003, pId:30, t:"beforeClick", name:"beforeClick : null,", iconSkin:"core", showAPI:true},
{id:3004, pId:30, t:"beforeCollapse", name:"beforeCollapse : null,", iconSkin:"core", showAPI:true},
{id:3004, pId:30, t:"beforeDblClick", name:"beforeDblClick : null,", iconSkin:"core", showAPI:true},
{id:3005, pId:30, t:"beforeDrag", name:"beforeDrag : null,", iconSkin:"edit", showAPI:true},
{id:3006, pId:30, t:"beforeDragOpen", name:"beforeDragOpen : null,", iconSkin:"edit", showAPI:true},
{id:3007, pId:30, t:"beforeDrop", name:"beforeDrop : null,", iconSkin:"edit", showAPI:true},
{id:3029, pId:30, t:"beforeEditName", name:"beforeEditName : null,", iconSkin:"edit", showAPI:true},
{id:3008, pId:30, t:"beforeExpand", name:"beforeExpand : null,", iconSkin:"core", showAPI:true},
{id:3009, pId:30, t:"beforeMouseDown", name:"beforeMouseDown : null,", iconSkin:"core", showAPI:true},
{id:3010, pId:30, t:"beforeMouseUp", name:"beforeMouseUp : null,", iconSkin:"core", showAPI:true},
{id:3011, pId:30, t:"beforeRemove", name:"beforeRemove : null,", iconSkin:"edit", showAPI:true},
{id:3012, pId:30, t:"beforeRename", name:"beforeRename : null,", iconSkin:"edit", showAPI:true},
{id:3013, pId:30, t:"beforeRightClick", name:"beforeRightClick : null,", iconSkin:"core", showAPI:true},
{id:3014, pId:30, name:""},
{id:3015, pId:30, t:"onAsyncError", name:"onAsyncError : null,", iconSkin:"core", showAPI:true},
{id:3016, pId:30, t:"onAsyncSuccess", name:"onAsyncSuccess : null,", iconSkin:"core", showAPI:true},
{id:3017, pId:30, t:"onCheck", name:"onCheck : null,", iconSkin:"check", showAPI:true},
{id:3018, pId:30, t:"onClick", name:"onClick : null,", iconSkin:"core", showAPI:true},
{id:3019, pId:30, t:"onCollapse", name:"onCollapse : null,", iconSkin:"core", showAPI:true},
{id:3029, pId:30, t:"onDblClick", name:"onDblClick : null,", iconSkin:"core", showAPI:true},
{id:3020, pId:30, t:"onDrag", name:"onDrag : null,", iconSkin:"edit", showAPI:true},
{id:3030, pId:30, t:"onDragMove", name:"onDragMove : null,", iconSkin:"edit", showAPI:true},
{id:3021, pId:30, t:"onDrop", name:"onDrop : null,", iconSkin:"edit", showAPI:true},
{id:3022, pId:30, t:"onExpand", name:"onExpand : null,", iconSkin:"core", showAPI:true},
{id:3023, pId:30, t:"onMouseDown", name:"onMouseDown : null,", iconSkin:"core", showAPI:true},
{id:3024, pId:30, t:"onMouseUp", name:"onMouseUp : null,", iconSkin:"core", showAPI:true},
{id:3025, pId:30, t:"onNodeCreated", name:"onNodeCreated : null,", iconSkin:"core", showAPI:true},
{id:3026, pId:30, t:"onRemove", name:"onRemove : null,", iconSkin:"edit", showAPI:true},
{id:3027, pId:30, t:"onRename", name:"onRename : null,", iconSkin:"edit", showAPI:true},
{id:3028, pId:30, t:"onRightClick", name:"onRightClick : null", iconSkin:"core", showAPI:true},
{id:31, pId:1, name:"},"},
{id:32, pId:1, name:""},
{id:40, pId:1, t:"check", name:"check : {", open:true},
{id:405, pId:40, t:"autoCheckTrigger", name:"autoCheckTrigger : false,", iconSkin:"check", showAPI:true},
{id:401, pId:40, t:"chkboxType", name:"chkboxType : {\"Y\": \"ps\", \"N\": \"ps\"},", iconSkin:"check", showAPI:true},
{id:402, pId:40, t:"chkStyle", name:"chkStyle : \"checkbox\",", iconSkin:"check", showAPI:true},
{id:403, pId:40, t:"enable", name:"enable : false,", iconSkin:"check", showAPI:true},
{id:406, pId:40, t:"nocheckInherit", name:"nocheckInherit : false", iconSkin:"check", showAPI:true},
{id:407, pId:40, t:"chkDisabledInherit", name:"chkDisabledInherit : false", iconSkin:"check", showAPI:true},
{id:404, pId:40, t:"radioType", name:"radioType : \"level\"", iconSkin:"check", showAPI:true},
{id:41, pId:1, name:"},"},
{id:42, pId:1, name:""},
{id:50, pId:1, t:"data", name:"data : {", open:true},
{id:500, pId:50, t:"keep", name:"keep : {", open:true},
{id:5001, pId:500, t:"leaf", name:"leaf : false,", iconSkin:"core", showAPI:true},
{id:5002, pId:500, t:"parent", name:"parent : false", iconSkin:"core", showAPI:true},
{id:501, pId:50, name:"},"},
{id:510, pId:50, t:"key", name:"key : {", open:true},
{id:5101, pId:510, t:"checked", name:"checked : \"checked\",", iconSkin:"check", showAPI:true},
{id:5102, pId:510, t:"children", name:"children : \"children\",", iconSkin:"core", showAPI:true},
{id:5106, pId:510, t:"isParent", name:"isParent : \"isParent\",", iconSkin:"core", showAPI:true},
{id:5107, pId:510, t:"isHidden", name:"isHidden : \"isHidden\",", iconSkin:"hide", showAPI:true},
{id:5103, pId:510, t:"name", name:"name : \"name\",", iconSkin:"core", showAPI:true},
{id:5104, pId:510, t:"title", name:"title : \"\"", iconSkin:"core", showAPI:true},
{id:5105, pId:510, t:"url", name:"url : \"url\"", iconSkin:"core", showAPI:true},
{id:511, pId:50, name:"},"},
{id:520, pId:50, t:"simpleData", name:"simpleData : {", open:true},
{id:5201, pId:520, t:"enable", name:"enable : false,", iconSkin:"core", showAPI:true},
{id:5202, pId:520, t:"idKey", name:"idKey : \"id\",", iconSkin:"core", showAPI:true},
{id:5203, pId:520, t:"pIdKey", name:"pIdKey : \"pId\",", iconSkin:"core", showAPI:true},
{id:5204, pId:520, t:"rootPId", name:"rootPId : null", iconSkin:"core", showAPI:true},
{id:521, pId:50, name:"}"},
{id:51, pId:1, name:"},"},
{id:52, pId:1, name:""},
{id:60, pId:1, t:"edit", name:"edit : {", open:true},
{id:601, pId:60, t:"drag", name:"drag : {", open:true},
{id:60111, pId:601, t:"autoExpandTrigger", name:"autoExpandTrigger : true,", iconSkin:"edit", showAPI:true},
{id:60101, pId:601, t:"isCopy", name:"isCopy : true,", iconSkin:"edit", showAPI:true},
{id:60102, pId:601, t:"isMove", name:"isMove : true,", iconSkin:"edit", showAPI:true},
{id:60103, pId:601, t:"prev", name:"prev : true,", iconSkin:"edit", showAPI:true},
{id:60104, pId:601, t:"next", name:"next : true,", iconSkin:"edit", showAPI:true},
{id:60105, pId:601, t:"inner", name:"inner : true,", iconSkin:"edit", showAPI:true},
{id:60107, pId:601, t:"borderMax", name:"borderMax : 10,", iconSkin:"edit", showAPI:true},
{id:60108, pId:601, t:"borderMin", name:"borderMin : -5,", iconSkin:"edit", showAPI:true},
{id:60106, pId:601, t:"minMoveSize", name:"minMoveSize : 5,", iconSkin:"edit", showAPI:true},
{id:60109, pId:601, t:"maxShowNodeNum", name:"maxShowNodeNum : 5,", iconSkin:"edit", showAPI:true},
{id:60110, pId:601, t:"autoOpenTime", name:"autoOpenTime : 500", iconSkin:"edit", showAPI:true},
{id:602, pId:60, name:"},"},
{id:608, pId:60, t:"editNameSelectAll", name:"editNameSelectAll : false,", iconSkin:"edit", showAPI:true},
{id:603, pId:60, t:"enable", name:"enable : false,", iconSkin:"edit", showAPI:true},
{id:604, pId:60, t:"removeTitle", name:"removeTitle : \"remove\",", iconSkin:"edit", showAPI:true},
{id:605, pId:60, t:"renameTitle", name:"renameTitle : \"rename\",", iconSkin:"edit", showAPI:true},
{id:606, pId:60, t:"showRemoveBtn", name:"showRemoveBtn : true,", iconSkin:"edit", showAPI:true},
{id:607, pId:60, t:"showRenameBtn", name:"showRenameBtn : true", iconSkin:"edit", showAPI:true},
{id:61, pId:1, name:"},"},
{id:62, pId:1, name:""},
{id:70, pId:1, t:"view", name:"view : {", open:true},
{id:7001, pId:70, t:"addDiyDom", name:"addDiyDom : null,", iconSkin:"core", showAPI:true},
{id:7002, pId:70, t:"addHoverDom", name:"addHoverDom : null,", iconSkin:"edit", showAPI:true},
{id:7003, pId:70, t:"autoCancelSelected", name:"autoCancelSelected : true,", iconSkin:"core", showAPI:true},
{id:7004, pId:70, t:"dblClickExpand", name:"dblClickExpand : true,", iconSkin:"core", showAPI:true},
{id:7005, pId:70, t:"expandSpeed", name:"expandSpeed : \"fast\",", iconSkin:"core", showAPI:true},
{id:7006, pId:70, t:"fontCss", name:"fontCss : {},", iconSkin:"core", showAPI:true},
{id:7012, pId:70, t:"nameIsHTML", name:"nameIsHTML : false,", iconSkin:"core", showAPI:true},
{id:7007, pId:70, t:"removeHoverDom", name:"removeHoverDom : null,", iconSkin:"edit", showAPI:true},
{id:7008, pId:70, t:"selectedMulti", name:"selectedMulti : true,", iconSkin:"core", showAPI:true},
{id:7009, pId:70, t:"showIcon", name:"showIcon : true,", iconSkin:"core", showAPI:true},
{id:7010, pId:70, t:"showLine", name:"showLine : true,", iconSkin:"core", showAPI:true},
{id:7011, pId:70, t:"showTitle", name:"showTitle : true,", iconSkin:"core", showAPI:true},
{id:7012, pId:70, t:"txtSelectedEnable", name:"txtSelectedEnable : false", iconSkin:"core", showAPI:true},
{id:71, pId:1, name:"}"},
{id:2, pId:0, name:"}"}
];
var treenode_nodes =[
{id:1, pId:0, t:"treeNode", name:"treeNode : {", open:true},
{id:101, pId:1, t:"checked", name:"checked", iconSkin:"check", showAPI:true},
{id:102, pId:1, t:"children", name:"children", iconSkin:"core", showAPI:true},
{id:128, pId:1, t:"chkDisabled", name:"chkDisabled", iconSkin:"check", showAPI:true},
{id:127, pId:1, t:"click", name:"click", iconSkin:"core", showAPI:true},
{id:103, pId:1, t:"getCheckStatus", name:"getCheckStatus ()", iconSkin:"check", showAPI:true},
{id:135, pId:1, t:"getIndex", name:"getIndex ()", iconSkin:"core", showAPI:true},
{id:104, pId:1, t:"getNextNode", name:"getNextNode ()", iconSkin:"core", showAPI:true},
{id:105, pId:1, t:"getParentNode", name:"getParentNode ()", iconSkin:"core", showAPI:true},
{id:136, pId:1, t:"getPath", name:"getPath ()", iconSkin:"core", showAPI:true},
{id:106, pId:1, t:"getPreNode", name:"getPreNode ()", iconSkin:"core", showAPI:true},
{id:129, pId:1, t:"halfCheck", name:"halfCheck", iconSkin:"check", showAPI:true},
{id:107, pId:1, t:"icon", name:"icon", iconSkin:"core", showAPI:true},
{id:108, pId:1, t:"iconClose", name:"iconClose", iconSkin:"core", showAPI:true},
{id:109, pId:1, t:"iconOpen", name:"iconOpen", iconSkin:"core", showAPI:true},
{id:110, pId:1, t:"iconSkin", name:"iconSkin", iconSkin:"core", showAPI:true},
{id:131, pId:1, t:"isHidden", name:"isHidden", iconSkin:"hide", showAPI:true},
{id:111, pId:1, t:"isParent", name:"isParent", iconSkin:"core", showAPI:true},
{id:132, pId:1, t:"name", name:"name", iconSkin:"core", showAPI:true},
{id:112, pId:1, t:"nocheck", name:"nocheck", iconSkin:"check", showAPI:true},
{id:113, pId:1, t:"open", name:"open", iconSkin:"core", showAPI:true},
{id:133, pId:1, t:"target", name:"target", iconSkin:"core", showAPI:true},
{id:134, pId:1, t:"url", name:"url", iconSkin:"core", showAPI:true},
{id:114, pId:1, t:"diy", name:"*DIY*", iconSkin:"core", showAPI:true},
{id:115, pId:1, name:""},
{id:116, pId:1, t:"check_Child_State", name:"[check_Child_State]", iconSkin:"check", showAPI:true},
{id:117, pId:1, t:"check_Focus", name:"[check_Focus]", iconSkin:"check", showAPI:true},
{id:118, pId:1, t:"checkedOld", name:"[checkedOld]", iconSkin:"check", showAPI:true},
{id:119, pId:1, t:"editNameFlag", name:"[editNameFlag]", iconSkin:"edit", showAPI:true},
{id:120, pId:1, t:"isAjaxing", name:"[isAjaxing]", iconSkin:"core", showAPI:true},
{id:121, pId:1, t:"isFirstNode", name:"[isFirstNode]", iconSkin:"core", showAPI:true},
{id:122, pId:1, t:"isHover", name:"[isHover]", iconSkin:"edit", showAPI:true},
{id:123, pId:1, t:"isLastNode", name:"[isLastNode]", iconSkin:"core", showAPI:true},
{id:124, pId:1, t:"level", name:"[level]", iconSkin:"core", showAPI:true},
{id:125, pId:1, t:"parentTId", name:"[parentTId]", iconSkin:"core", showAPI:true},
{id:126, pId:1, t:"tId", name:"[tId]", iconSkin:"core", showAPI:true},
{id:130, pId:1, t:"zAsync", name:"[zAsync]", iconSkin:"core", showAPI:true},
{id:2, pId:0, name:"}"}
];
var function_nodes =[
{id:1, pId:0, t:"$.fn.zTree", name:"$.fn.zTree : {", open:true},
{id:11, pId:1, t:"init", name:"init (obj, zSetting, zNodes)", iconSkin:"core", showAPI:true},
{id:12, pId:1, t:"getZTreeObj", name:"getZTreeObj (treeId)", iconSkin:"core", showAPI:true},
{id:14, pId:1, t:"destroy", name:"destroy (treeId)", iconSkin:"core", showAPI:true},
{id:13, pId:1, t:"_z", name:"_z : {tools, view, event, data}", iconSkin:"core", showAPI:true},
{id:2, pId:0, name:"}"},
{id:3, pId:0, name:""},
{id:4, pId:0, t:"zTreeObj", name:"zTreeObj : {", open:true},
{id:401, pId:4, t:"setting", name:"setting", iconSkin:"core", showAPI:true},
{id:402, pId:4, t:"addNodes", name:"addNodes (parentNode, index, newNodes, isSilent)", iconSkin:"core", showAPI:true},
{id:403, pId:4, t:"cancelEditName", name:"cancelEditName (newName)", iconSkin:"edit", showAPI:true},
{id:404, pId:4, t:"cancelSelectedNode", name:"cancelSelectedNode (node)", iconSkin:"core", showAPI:true},
{id:405, pId:4, t:"checkAllNodes", name:"checkAllNodes (checked)", iconSkin:"check", showAPI:true},
{id:406, pId:4, t:"checkNode", name:"checkNode (node, checked, checkTypeFlag, callbackFlag)", iconSkin:"check", showAPI:true},
{id:407, pId:4, t:"copyNode", name:"copyNode (targetNode, node, moveType, isSilent)", iconSkin:"edit", showAPI:true},
{id:436, pId:4, t:"destroy", name:"destroy ()", iconSkin:"core", showAPI:true},
{id:408, pId:4, t:"editName", name:"editName (node)", iconSkin:"edit", showAPI:true},
{id:409, pId:4, t:"expandAll", name:"expandAll (expandFlag)", iconSkin:"core", showAPI:true},
{id:410, pId:4, t:"expandNode", name:"expandNode (node, expandFlag, sonSign, focus, callbackFlag)", iconSkin:"core", showAPI:true},
{id:411, pId:4, t:"getChangeCheckedNodes", name:"getChangeCheckedNodes ()", iconSkin:"check", showAPI:true},
{id:412, pId:4, t:"getCheckedNodes", name:"getCheckedNodes (checked)", iconSkin:"check", showAPI:true},
{id:413, pId:4, t:"getNodeByParam", name:"getNodeByParam (key, value, parentNode)", iconSkin:"core", showAPI:true},
{id:414, pId:4, t:"getNodeByTId", name:"getNodeByTId (tId)", iconSkin:"core", showAPI:true},
{id:415, pId:4, t:"getNodeIndex", name:"getNodeIndex (node)", iconSkin:"core", showAPI:true},
{id:416, pId:4, t:"getNodes", name:"getNodes ()", iconSkin:"core", showAPI:true},
{id:431, pId:4, t:"getNodesByFilter", name:"getNodesByFilter (filter, isSingle, parentNode, invokeParam)", iconSkin:"core", showAPI:true},
{id:417, pId:4, t:"getNodesByParam", name:"getNodesByParam (key, value, parentNode)", iconSkin:"core", showAPI:true},
{id:418, pId:4, t:"getNodesByParamFuzzy", name:"getNodesByParamFuzzy (key, value, parentNode)", iconSkin:"core", showAPI:true},
{id:419, pId:4, t:"getSelectedNodes", name:"getSelectedNodes ()", iconSkin:"core", showAPI:true},
{id:432, pId:4, t:"hideNode", name:"hideNode (node)", iconSkin:"hide", showAPI:true},
{id:433, pId:4, t:"hideNodes", name:"hideNodes (nodes)", iconSkin:"hide", showAPI:true},
{id:420, pId:4, t:"moveNode", name:"moveNode (targetNode, node, moveType, isSilent)", iconSkin:"edit", showAPI:true},
{id:421, pId:4, t:"reAsyncChildNodes", name:"reAsyncChildNodes (parentNode, reloadType, isSilent, callback)", iconSkin:"core", showAPI:true},
{id:437, pId:4, t:"reAsyncChildNodesPromise", name:"reAsyncChildNodesPromise(parentNode, reloadType, isSilent)", iconSkin:"core", showAPI:true},
{id:422, pId:4, t:"refresh", name:"refresh ()", iconSkin:"core", showAPI:true},
{id:423, pId:4, t:"removeChildNodes", name:"removeChildNodes (parentNode)", iconSkin:"core", showAPI:true},
{id:424, pId:4, t:"removeNode", name:"removeNode (node, callbackFlag)", iconSkin:"core", showAPI:true},
{id:425, pId:4, t:"selectNode", name:"selectNode (node, addFlag, isSilent)", iconSkin:"core", showAPI:true},
{id:430, pId:4, t:"setChkDisabled", name:"setChkDisabled (node, disabled, inheritParent, inheritChildren)", iconSkin:"check", showAPI:true},
{id:426, pId:4, t:"setEditable", name:"setEditable (editable)", iconSkin:"edit", showAPI:true},
{id:434, pId:4, t:"showNode", name:"showNode (node)", iconSkin:"hide", showAPI:true},
{id:435, pId:4, t:"showNodes", name:"showNodes (nodes)", iconSkin:"hide", showAPI:true},
{id:427, pId:4, t:"transformToArray", name:"transformToArray (nodes)", iconSkin:"core", showAPI:true},
{id:428, pId:4, t:"transformTozTreeNodes", name:"transformTozTreeNodes (simpleNodes)", iconSkin:"core", showAPI:true},
{id:429, pId:4, t:"updateNode", name:"updateNode (node, checkTypeFlag)", iconSkin:"core", showAPI:true},
{id:5, pId:0, name:"}"}
];
apiContent.zTree_Setting = $.fn.zTree.init($("#settingTree"), $.fn.zTree._z.tools.clone(setting), setting_nodes);
apiContent.zTree_Node = $.fn.zTree.init($("#treenodeTree"), $.fn.zTree._z.tools.clone(setting), treenode_nodes);
apiContent.zTree_Function = $.fn.zTree.init($("#functionTree"), $.fn.zTree._z.tools.clone(setting), function_nodes);
this.bindEvent();
},
bindEvent: function() {
$(document).bind("keydown", this.listenKeyDown)
this.overlayCloseBtn.bind("click", apiContent.overlayClose);
this.searchResultInput.bind("click", function(e) {
$(this).prev().get(0).focus();
this.blur();
}).bind("focus", function(e) {
this.blur();
});
this.searchKey.bind("focus", this.focusKey)
.bind("blur", this.blurKey)
.bind("propertychange", this.searchNode)
.bind("input", this.searchNode);
this.searchPrevBtn.bind("click", this.searchPrev);
this.searchNextBtn.bind("click", this.searchNext);
},
setSameKey: function(value) {
apiContent.searchKey.attr("value", value);
},
focusKey: function(e) {
if (apiContent.searchKey.hasClass("empty")) {
apiContent.searchKey.removeClass("empty");
}
},
blurKey: function(e) {
apiContent.setSameKey(e.target.value);
if (e.target.value === "") {
apiContent.searchKey.addClass("empty");
}
},
listenKeyDown: function(e) {
if (e.keyCode=="13" && apiContent.overlayDiv.is(":hidden")) {
apiContent.openAPI();
} else if (e.keyCode=="37") {
apiContent.searchPrev();
} else if (e.keyCode=="13" || e.keyCode=="39") {
apiContent.searchNext();
}
},
openAPI: function() {
if (apiContent.searchNodes.length > 0) {
var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"),
treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"),
function_zTree = $.fn.zTree.getZTreeObj("functionTree");
if (apiContent.searchNodesCur < 0 || apiContent.searchNodesCur > apiContent.searchNodes.length -1) {
apiContent.searchNodesCur = 0;
}
var node = apiContent.searchNodes[apiContent.searchNodesCur];
if (node.tId.indexOf("setting") > -1) {
setting_zTree.selectNode(node);
} else if (node.tId.indexOf("treenode") > -1) {
treenode_zTree.selectNode(node);
} else {
function_zTree.selectNode(node);
}
apiContent.beforeClick(node.tId.substring(0, node.tId.indexOf("_")), node, true);
apiContent.searchCur();
}
},
searchNode: function(e) {
var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"),
treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"),
function_zTree = $.fn.zTree.getZTreeObj("functionTree");
if (apiContent.curKey == e.target.value) return;
apiContent.curKey = e.target.value;
var value = $.trim(apiContent.curKey);
apiContent.setSameKey(apiContent.curKey);
if (apiContent.searchKey.hasClass("empty")) {
value = "";
apiContent.searchResultInput.removeClass("noResult").attr("value","");
}
if (apiContent.lastValue === value) return;
apiContent.updateNodes(false);
apiContent.lastValue = value;
if (value === "" || value.length < 2) {
apiContent.searchNodes = [];
apiContent.searchNodesCur = -1;
apiContent.searchCur(true);
return;
}
var settingNodeList = setting_zTree.getNodesByFilter(apiContent.searchFilter);
var functionNodeList = function_zTree.getNodesByFilter(apiContent.searchFilter);
var treenodeNodeList = treenode_zTree.getNodesByFilter(apiContent.searchFilter);
apiContent.searchNodes = settingNodeList.concat(functionNodeList).concat(treenodeNodeList);
apiContent.searchNodesCur = -1;
apiContent.searchCur();
apiContent.updateNodes(true);
},
searchFilter: function(node) {
var value = $.trim(apiContent.searchKey.get(0).value).toLowerCase();
return (node.showAPI && node.name.toLowerCase().indexOf(value) > -1);
},
searchPrev: function(e) {
if (apiContent.searchPrevBtn.hasClass("disabled")) return;
apiContent.searchNodesCur--;
if (apiContent.searchNodesCur < 0 || apiContent.searchNodesCur > apiContent.searchNodes.length -1) {
apiContent.searchNodesCur = apiContent.searchNodes.length -1;
}
apiContent.openAPI();
},
searchNext: function(e) {
if (apiContent.searchNextBtn.hasClass("disabled")) return;
apiContent.searchNodesCur++;
apiContent.openAPI();
},
searchCur: function(init) {
var result = apiContent.searchNodes;
if (init) {
apiContent.searchResultInput.removeClass("noResult").attr("value","");
} else if (result.length == 0) {
apiContent.searchResultInput.addClass("noResult").attr("value"," [ 0 / 0 ] ");
} else {
apiContent.searchResultInput.removeClass("noResult").attr("value"," [ " + (apiContent.searchNodesCur > -1 ? apiContent.searchNodesCur+1 : "?")+ " / " + result.length + " ] ");
}
if (result.length > 0) {
apiContent.searchPrevBtn.removeClass("disabled");
apiContent.searchNextBtn.removeClass("disabled");
} else {
apiContent.searchPrevBtn.addClass("disabled");
apiContent.searchNextBtn.addClass("disabled");
}
},
updateNodes: function(highlight) {
var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"),
treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"),
function_zTree = $.fn.zTree.getZTreeObj("functionTree"),
node = null;
for( var i=0, l=apiContent.searchNodes.length; i<l; i++) {
node = apiContent.searchNodes[i];
if (node.level > 0) {
node.highlight = highlight;
if (node.tId.indexOf("setting") > -1) {
setting_zTree.updateNode(node);
} else if (node.tId.indexOf("treenode") > -1) {
treenode_zTree.updateNode(node);
} else {
function_zTree.updateNode(node);
}
}
}
},
getFontCss: function(treeId, treeNode) {
return (!!treeNode.highlight) ? {color:"#A60000", "font-weight":"bold"} : {color:"#333", "font-weight":"normal"};
},
getTitle: function(treeId, node) {
var t = [], n = node;
while (n && !!n.t) {
t.push(n.t);
n = n.getParentNode();
}
t = t.reverse();
node.tt = t.join('.');
return true;
},
showIcon: function(treeId, node) {
return (!!node.iconSkin);
},
onNodeCreated: function (e, treeId, node) {
var a = $("#" + node.tId + "_a");
if (node.showAPI) {
a.attr("rel", "#overlayDiv");
} else {
a.css({cursor: "default"});
}
},
beforeClick: function (treeId, node, noClear) {
if (!node.showAPI) return false;
var o = $("#" + node.tId + "_a");
if (!!apiContent.apiCache[node.tId]) {
apiContent.tmpDiv.html(apiContent.apiCache[node.tId]);
apiContent.overlayShow(o, (apiContent.lastNode === node));
} else {
apiContent.overlayAjax(treeId, node);
}
apiContent.lastNode = node;
if (node.tId.indexOf("settingTree")>-1) {
apiContent.settingDiv.removeClass("right").addClass("left");
apiContent.functionDiv.removeClass("left").addClass("right");
} else {
apiContent.settingDiv.removeClass("left").addClass("right");
apiContent.functionDiv.removeClass("right").addClass("left");
}
if (!noClear) {
apiContent.clearSelectedNode();
}
return true;
},
clearSelectedNode: function() {
apiContent.zTree_Setting.cancelSelectedNode();
apiContent.zTree_Node.cancelSelectedNode();
apiContent.zTree_Function.cancelSelectedNode();
},
overlayAutoClose: function(e) {
var eId = e.target.id, eRel = e.target.getAttribute("rel"), eClass = e.target.className;
if (eId === "overlayDiv" || eId === "overlayDivArrow" || eClass.indexOf("searchPrev") > -1 || eClass.indexOf("searchNext") > -1 || !!eRel) return;
if (!$(e.target).parents("[rel]").length && !$(e.target).parents("#overlayDiv").length) {
apiContent.overlayClose();
}
},
overlayClose: function() {
var o = apiContent.overlayDiv;
o.stop();
apiContent.clearSelectedNode();
if (ie) {
o.hide();
} else {
setTimeout(function() {o.fadeTo("fast", 0, function(){o.hide();})}, 200);
}
$(document).unbind("click", apiContent.overlayAutoClose);
},
overlayShow: function(target, isSameNode) {
var w = $(window), o = apiContent.overlayDiv, a = apiContent.overlayArrow,
oc = apiContent.overlayContent, c = apiContent.contentBoxDiv,
t = target.offset().top - 30,
cMaxLeft = c.offset().left + c.outerWidth({margin:true}) - o.outerWidth({margin:true}) - 10,
l = Math.min(cMaxLeft, target.offset().left + target.width() + 40),
arrowT = target.offset().top + 16,
wMinTop = 100, footerHeight = 50, onlyFade = false,
wHeight = w.height(), wScrollTop=w.scrollTop(), wMaxTop = wHeight + wScrollTop - footerHeight;
if (!apiContent.overlayMaxTop) {
apiContent.overlayMaxTop = apiContent.contentBoxDiv.offset().top + apiContent.contentBoxDiv.height();
}
o.stop();
if (o.css("display") !== "block") {
o.css({top: t, left: l});
a.css({top:arrowT - t});
$(document).bind("click", apiContent.overlayAutoClose);
}
if (ie) {
onlyFade = true;
o.show();
} else {
o.fadeTo("fast", 1);
}
var h = apiContent.tmpDiv.outerHeight({margin:true}) + apiContent.overlaySearch.outerHeight();
if ((t + h) > wMaxTop) {
t = wMaxTop - h;
}
if ((t + h) > apiContent.overlayMaxTop) {
t = apiContent.overlayMaxTop - h;
}
t = Math.max(t, wScrollTop, wMinTop);
if ((t + h) > ($("body").height()-footerHeight-20)) {
o.css("padding-bottom", footerHeight + "px");
} else {
o.css("padding-bottom", "0");
}
apiContent.overlayDetailDiv.empty();
apiContent.overlayDetailDiv.append(apiContent.tmpDiv.children());
if (!onlyFade) {
onlyFade = (isSameNode && t === parseInt(o.css("top").replace("px", "")));
}
a.removeClass("reverse");
if ( (arrowT - t) > (h-55) ) {
a.addClass("reverse");
arrowT -= 55;
}
if (onlyFade) {
o.css({top: t, left: l});
oc.css({height: h});
a.css({top:arrowT - t});
} else {
o.animate({top: t, left: l}, {duration: "normal",easing: "swing", complete:null});
oc.animate({height: h}, {duration: "fast",easing: "swing", complete:null});
a.animate({top:arrowT - t}, {duration: "normal",easing: "linear", complete:null});
}
},
overlayAjax: function(treeId, node) {
var o = $("#" + node.tId + "_a");
if (node.isAjax) return;
node.isAjax = true;
$.ajax({
type: "get",
url: "" + lang + "/" + node.tt.replace("$.", "") + ".html",
data: null,
dataType: "text",
success: function(msg) {
if (!apiContent.tmpDiv) {
var tmpDiv = $(document.createElement("div"));
tmpDiv.addClass("baby_overlay_tmp");
$("body").append(tmpDiv)
apiContent.tmpDiv = $(document.createElement("div"));
apiContent.tmpDiv.addClass("details");
tmpDiv.append(apiContent.tmpDiv);
} else {
apiContent.tmpDiv.empty();
}
apiContent.tmpDiv.html(msg);
apiContent.overlayShow(o, false);
apiContent.apiCache[node.tId] = msg;
node.isAjax = false;
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(ajaxMsg)
if (apiContent.tmpDiv) apiContent.tmpDiv.empty();
node.isAjax = false;
}
});
}
}
@@ -0,0 +1,218 @@
/* Resets */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;}
:focus {outline: 0;}
body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #528036 url(img/background.jpg) no-repeat fixed 0 0;}
p {padding-bottom: 20px;}
ol, ul {list-style: none;}
table {border-collapse: separate;border-spacing: 0;}
caption, th, td {text-align: left;font-weight: normal;}
strong {font-weight: bold;}
em {font-style: italic;}
hr {display: none;}
.font1 {color: white;background-color: #528036;}
.right {float: right;}
.left {float: left;}
.hide {display: none;}
.round {-moz-border-radius: 15px;-webkit-border-radius: 15px;-khtml-border-radius: 15px;border-radius: 15px;}
.clear {clear: both;}
.clearfix {display: block;}
.clearfix:after {content: ".";display: block;clear: both;visibility: hidden;line-height: 0;height: 0;}
html[xmlns] .clearfix {display: block;}
* html .clearfix {height: 1%;}
/* Link Styles */
a {color: #528036;}
a:link, a:visited {text-decoration: none;}
a:hover {color: #000;text-decoration: none;}
a:active {text-decoration: none;}
/* Headings */
h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, simsun, sans-serif;padding-bottom: 5px;}
h1 {font-size: 36px;line-height: 44px;}
h2 {font-size: 20px;line-height: 20px;}
h3 {font-size: 14px;line-height: 14px;}
h4 {font-size: 14px;font-weight: normal;line-height: 25px;}
/* Wraps */
.header_wrap {position: relative;min-width: 940px;padding: 100px 30px 0 30px;}
.content_wrap {position: relative;min-width: 940px;padding: 0 30px 50px 30px;}
.footer_wrap {bottom: 0;height: 47px;width: 100%;background-color: #1b1b1b;border-top: 1px solid #749e58;}
/* Header */
.header {position: relative;width: 940px;margin: 0 auto;height: 160px;border: 1px solid white;background: transparent url(img/header-bg.png) repeat-x 0 -50px;}
.header-text {padding: 40px 25px 15px 120px;font-size: 18px;line-height: 24px;color: #747d67;font-family: Helvetica, sans-serif;}
.header-text img {padding-bottom: 5px;}
.shortcuts {white-space: nowrap;text-align: right;position: absolute;top: -45px;right: 5px;}
.shortcuts.language {top: -85px;right:0px;}
.shortcuts li {display: inline;font-size: 18px;line-height: 28px;font-family: Helvetica, Arial, simsun, sans-serif;padding-bottom: 5px;margin-left: 30px;cursor: pointer;}
.shortcuts li button {cursor: pointer;}
.shortcuts li span {border-bottom: 1px dotted white;}
.shortcuts li span.selected {padding: 2px;background-color: #528036;}
.shortcuts li a {color: #fff;}
.ieSuggest {display:none;font-size: 12px;color: silver;position: absolute;left: 10px;top: 2px;}
.light-bulb {position: absolute;left: -20px;bottom: -35px;width:116px;height:180px;background-image:url(img/lightbulb.png);background-repeat: no-repeat;}
/* Content */
.content {position: relative;width: 940px;margin: 0 auto;}
.nav_section {position: relative;height: 20px;font-family: "Myriad Pro", "Trebuchet MS", sans-serif;font-size: 15px;color: #253;padding: 20px 0;}
.nav_section ul {position: absolute;right: 10px;}
.nav_section ul li {display: inline;line-height: 20px;margin: 0 5px 0 20px;border-bottom: 1px dotted white;}
.nav_section ul li.noline {border-bottom: 0;}
.nav_section ul li a {color: #fff;}
.nav_section ul li a.selected {padding: 2px;background-color: #528036;}
.nav_section ul li.first {border: none;}
.content .title {margin: 50px 30px 20px 70px;}
.content li {margin-bottom: 5px;}
.contentBox {position: relative;overflow: hidden;border: 1px solid white;min-height: 200px;line-height: 25px;background: transparent url(img/contact-bg.png) repeat-x 0 0;}
.zTreeInfo {display:none;width: 940px;position: absolute;}
.zTreeInfo p {padding-bottom: 50px;}
.zTreeInfo-left {float: left;width: 280px;height:300px;padding: 0 50px 60px 75px;background:url(img/zTreeIntroduction.jpg) no-repeat 30px 30px;}
.zTreeInfo-right {position: relative;float: right;width: 475px;padding: 0 50px 60px 0;}
.zTreeInfo-right li {font-size: 12px;list-style-type: disc;}
.license {display:none;width: 940px;position: absolute;}
.donateInfo {display:block;width: 940px;position: absolute;}
.links {display:none;width: 940px;position: absolute;}
.links .content {float: left;width: 160px;height:200px;padding: 0 10px 10px 2px;text-align: center;}
.links .content.first {margin-left: 30px;}
.contact {display:none;width: 940px;position: absolute;}
.contact .myhome { position: absolute; top:10px; left:620px; width:300px; height:266px; background: transparent url(img/myhome.gif) scroll no-repeat 0 0;}
.siteTag {position: absolute;left: -16px;top: 109px;z-index: 10;width: 65px;height: 46px;padding:0;margin:0 10px 0 0;
vertical-align:middle;border:0 none;background: transparent url(img/siteTag.png) scroll no-repeat 0 0;}
.siteTag.tag_zTreeInfo {background-position: 0 0}
.siteTag.tag_license {background-position: 0 -46px}
.siteTag.tag_donate {background-position: 0 -92px}
.siteTag.tag_contact {background-position: 0 -138px}
.apiContent {width: 940px;}
.apiContent .right {float: right;padding-right: 100px;}
.apiContent .left {float: left;padding-right: 20px;border-right: 1px dotted silver;}
.api_setting {position: relative;margin:20px 0 20px 20px;}
.api_function {position: relative;margin:20px 0 20px 30px;padding-right: 10px;}
.api_content_title {text-align: center;font-weight: bold;}
.demoContent {width: 940px;}
.demoContent .right {float: right;padding: 20px;width: 600px;}
.demoContent .left {float: left;padding: 20px;}
.demoContent iframe {width:600px;min-height: 530px;}
.faqContent {width: 940px;}
.faqContent .right {float: right;padding: 20px;width: 600px;}
.faqContent .left {float: left;padding: 20px;}
.faqContent iframe {width:600px;min-height: 300px;}
.baby_overlay_tmp {position: absolute;top:0; left:-5000px;display:block;visibility: hidden;width:640px;font-size:11px;}
.baby_overlay_tmp .details {padding: 20px;}
.baby_overlay {display:none;position:absolute;z-index:99;left:0; top:0;width:640px;color:#fff;font-size:11px;}
.baby_overlay .content {width:100%; height:100px;overflow: hidden;background: transparent url(img/overlay_bg.png) scroll repeat 0 0;}
.baby_overlay .details {padding:0 20px 20px 20px;}
.baby_overlay .close {background-image:url(img/close.png);position:absolute; right:5px; top:5px;cursor:pointer;height:36px;width:36px;}
.baby_overlay_arrow {background-image:url(img/overlay_arrow.png);background-position:0 0;position:absolute;height:40px;width:40px;left: -40px;}
.baby_overlay_arrow.reverse {background-position:0 -40px;}
/* Footer */
.footer {position: relative;min-width: 1000px;font: 14px/24px arial, helvetica, sans-serif;}
.footer ul {position:absolute;left: 0px;border:1px solid #393939;background:#262626;padding:12px 0px;line-height: 18px;display: none;list-style: none;}
.footer ul li a {display:block;padding: 2px 15px;color: #9c9c9c;text-indent: 0;}
.footer ul li a:hover {text-decoration:none;color: #fff;}
.footer-logo {position:absolute;margin: 10px 0 0 30px;width:122px; height:24px;top:0; left:0;background: transparent url(img/footer-logo.png) no-repeat 0 0;}
.footer_mii {position: absolute;right: 558px;top: 8px;z-index: 10;padding: 4px 0;}
.footer_mii a {font-size:10px;color:#649140}
.footer_mii a:hover {color:#B6D76F}
.footer_siteMap {position: absolute;right: 358px;top: 8px;width: 155px;z-index: 10;padding: 4px 0;}
.footer_siteMap .footer_siteMap_header {width:155px;text-indent: -9999px;background: transparent url(img/footer_siteMap.gif) no-repeat 0 0;}
.footer_siteMap ul {top:-202px;width:180px;}
.footer_siteMap:hover ul {left: 0}
.footer_contact {position: absolute;right: 193px;top: 8px;width: 155px;z-index: 10;padding: 4px 0;}
.footer_contact .footer_contact_header {width:155px;text-indent: -9999px;background: transparent url(img/footer_contact.gif) no-repeat 0px 0px;}
.footer_contact ul {top:-113px;width:153px;}
.footer_contact:hover ul {left: 0}
.footer_download {position: absolute;right: 60px;top: 8px;width: 123px;z-index: 10;padding: 4px 0;}
.footer_download .footer_download_header {width:123px;text-indent: -9999px;background: transparent url(img/footer_download.png) no-repeat 0px 0px;}
.footer_download ul {top:-113px;width:140px;}
.footer_download:hover ul {left: 0}
/* button icon */
button {vertical-align:middle;border:0 none;background: transparent no-repeat 0 0 scroll;}
.shortcuts button.ico {width:24px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/menuIcon.png)}
.shortcuts button.home {background-position: 0 0}
.shortcuts button.demo {background-position: 0 -24px}
.shortcuts button.api {background-position: 0 -48px}
.shortcuts button.faq {background-position: 0 -72px}
.shortcuts button.donate {background-position: 0 -144px}
.shortcuts button.download {background-position: 0 -96px}
.shortcuts button.face {background-position: 0 -120px}
.shortcuts button.cn {width:48px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/chinese.png)}
.shortcuts button.en {width:48px; height:24px;padding:0; margin:0 10px 0 0;background-image:url(img/english.png)}
.content button.ico {width:24px; height:24px;padding:0; margin:0 10px 0 0;}
.content button.ico16 {width:16px; height:16px;padding:0; margin:0 5px 0 0;background-image:url("img/apiMenu.png");}
button.z_core {margin-top: -4px;background-position:0 0;}
button.z_check {margin-top: -4px;background-position:0 -16px;}
button.z_edit {margin-top: -4px;background-position:0 -32px;}
button.z_hide {margin-top: -4px;background-position:0 -64px;}
button.z_search {margin-top: -4px;background-position:0 -48px;}
button.searchPrev {margin-top: -4px;background-position:-16px 0;cursor:pointer}
button.searchNext {margin-top: -4px;background-position:-16px -16px;cursor:pointer}
button.searchPrev.disabled {margin-top: -4px;background-position:-16px -32px;cursor:auto}
button.searchNext.disabled {margin-top: -4px;background-position:-16px -48px;cursor:auto}
input.search {margin:0;padding:2px 0; border:0;}
input.searchKey {width:150px;}
input.searchResult {margin-left:-3px;width:65px;text-align:right;background-color:white;color:#707070}
input.searchResult.noResult {background-color:#ff6666;color:black}
.baby_overlay div.overlaySearch {text-align:right;padding-right:50px;padding-top:12px;}
/* api overlay*/
.apiDetail .topLine {border-top: 1px dashed #376B29;margin-top: 5px;padding-top: 5px;}
.apiDetail .highlight_red {color:#A60000;}
.apiDetail .highlight_green {color:#A7F43D;}
.apiDetail h1, .apiDetail h2, .apiDetail h3, .apiDetail h4, .apiDetail h5, .apiDetail h6 {color: white;padding: 0;}
.apiDetail h2 {color: #A7F43D;margin: 5px auto;padding: 5px;font-size: 20px;}
.apiDetail h2 span {font-size: 14px;float: right;font-weight: normal;margin: 2px 20px 0 0;vertical-align: bottom;}
.apiDetail h2 span.path {float: left;margin: 2px 0 0 0;vertical-align: bottom;}
.apiDetail h3 {margin: 5px auto;padding: 5px;font-size: 14px;font-weight: normal;}
.apiDetail h3 span.h3_info {margin-left: 20px;font-size: 12px;}
.apiDetail h4 {margin: 0 auto;padding: 0 5px;font-size: 12px;font-weight: normal;line-height: 16px;}
.apiDetail .desc h4 {color: black;}
.apiDetail h4 b{width: 150px;display:inline-block;}
.apiDetail h4 span{width: 230px;display:inline-block;}
.apiDetail pre, .apiDetail .desc {background: #E8FCD6;color: black;margin: 10px;padding: 10px;display: block;}
.apiDetail pre {word-wrap: break-word;}
.apiDetail p{margin-left: 5px;padding: 0;}
.apiDetail .longdesc {margin-top: 5px;}
.apiDetail .longdesc p{font-size: 12px;line-height:1.5;margin:3px 0;}
.apiDetail .longdesc b{font-size: 14px;}
.apiDetail table {border-collapse:collapse;}
.apiDetail table td {border:1px solid silver;text-align: center;vertical-align: middle;}
.apiDetail table thead td {font-weight: bold}
.apiDetail button {width:16px; height:16px; vertical-align:middle; border:0 none; cursor: pointer;
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
background-image:url("zTreeStyle/img/zTreeStandard.png");}
.apiDetail button.chk {width:13px; height:13px; margin:0 3px 2px 0; cursor: auto}
.apiDetail button.chk.checkbox_false_full {background-position:0 0}
.apiDetail button.chk.checkbox_false_full_focus {background-position:0 -14px}
.apiDetail button.chk.checkbox_false_part {background-position:0 -28px}
.apiDetail button.chk.checkbox_false_part_focus {background-position:0 -42px}
.apiDetail button.chk.checkbox_true_full {background-position:-14px 0}
.apiDetail button.chk.checkbox_true_full_focus {background-position:-14px -14px}
.apiDetail button.chk.checkbox_true_part {background-position:-14px -28px}
.apiDetail button.chk.checkbox_true_part_focus {background-position:-14px -42px}
.apiDetail button.chk.radio_false_full {background-position:-28px 0}
.apiDetail button.chk.radio_false_full_focus {background-position:-28px -14px}
.apiDetail button.chk.radio_false_part {background-position:-28px -28px}
.apiDetail button.chk.radio_false_part_focus {background-position:-28px -42px}
.apiDetail button.chk.radio_true_full {background-position:-42px 0}
.apiDetail button.chk.radio_true_full_focus {background-position:-42px -14px}
.apiDetail button.chk.radio_true_part {background-position:-42px -28px}
.apiDetail button.chk.radio_true_part_focus {background-position:-42px -42px}
@@ -0,0 +1,23 @@
* html{
/* background-image:url(about:blank);*/
background-attachment:fixed;
}
html pre {word-wrap: break-word}
.header {background-image: none;background-color: #F0F6E4;}
.ieSuggest {display:block;}
.shortcuts button.cn {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/chinese.png');background-image: none;}
.shortcuts button.en {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/english.png');background-image: none;}
.light-bulb {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/lightbulb.png');background-image: none;}
.contentBox {background-image: none;background-color: #F0F6E4;}
.zTreeInfo {background-image: none;background-color: #F0F6E4;}
.content button.ico16 {*background-image:url("img/apiMenu.gif")}
.siteTag {background-image: none;}
.apiContent .right {float: right;padding-right: 50px;}
div.baby_overlay {background-color: #3C6E31;background-image:none;color:#fff;}
div.baby_overlay .close {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='apiCss/img/overlay_close_IE6.gif');background-image: none;}
.baby_overlay_arrow {background-image:url(img/overlay_arrow.gif);}
.apiDetail button {background-image:url("img/zTreeStandard.gif")}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1,75 @@
/*
* JQuery zTree core v3.5.37
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2018-08-21
*/
(function(r){var J,K,L,M,N,O,v,t={},w={},x={},P={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",
dataType:"text",headers:{},xhrFields:{},url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},y=[function(a){var b=a.treeObj,c=g.event;b.bind(c.NODECREATED,
function(b,c,i){h.apply(a.callback.onNodeCreated,[b,c,i])});b.bind(c.CLICK,function(b,c,i,e,k){h.apply(a.callback.onClick,[c,i,e,k])});b.bind(c.EXPAND,function(b,c,i){h.apply(a.callback.onExpand,[b,c,i])});b.bind(c.COLLAPSE,function(b,c,i){h.apply(a.callback.onCollapse,[b,c,i])});b.bind(c.ASYNC_SUCCESS,function(b,c,i,e){h.apply(a.callback.onAsyncSuccess,[b,c,i,e])});b.bind(c.ASYNC_ERROR,function(b,c,i,e,k,g){h.apply(a.callback.onAsyncError,[b,c,i,e,k,g])});b.bind(c.REMOVE,function(b,c,i){h.apply(a.callback.onRemove,
[b,c,i])});b.bind(c.SELECTED,function(b,c,i){h.apply(a.callback.onSelected,[c,i])});b.bind(c.UNSELECTED,function(b,c,i){h.apply(a.callback.onUnSelected,[c,i])})}],z=[function(a){var b=g.event;a.treeObj.unbind(b.NODECREATED).unbind(b.CLICK).unbind(b.EXPAND).unbind(b.COLLAPSE).unbind(b.ASYNC_SUCCESS).unbind(b.ASYNC_ERROR).unbind(b.REMOVE).unbind(b.SELECTED).unbind(b.UNSELECTED)}],A=[function(a){var b=e.getCache(a);b||(b={},e.setCache(a,b));b.nodes=[];b.doms=[]}],B=[function(a,b,c,d,f,i){if(c){var m=
e.getRoot(a),k=e.nodeChildren(a,c);c.level=b;c.tId=a.treeId+"_"+ ++m.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?h.eqs(c.open,"true"):!!c.open;b=e.nodeIsParent(a,c);h.isArray(k)&&!(b===!1||typeof b=="string"&&h.eqs(b,"false"))?(e.nodeIsParent(a,c,!0),c.zAsync=!0):(b=e.nodeIsParent(a,c,b),c.open=b&&!a.async.enable?c.open:!1,c.zAsync=!b);c.isFirstNode=f;c.isLastNode=i;c.getParentNode=function(){return e.getNodeCache(a,c.parentTId)};c.getPreNode=function(){return e.getPreNode(a,c)};c.getNextNode=
function(){return e.getNextNode(a,c)};c.getIndex=function(){return e.getNodeIndex(a,c)};c.getPath=function(){return e.getNodePath(a,c)};c.isAjaxing=!1;e.fixPIdKeyValue(a,c)}}],u=[function(a){var b=a.target,c=e.getSetting(a.data.treeId),d="",f=null,i="",m="",k=null,j=null,o=null;if(h.eqs(a.type,"mousedown"))m="mousedown";else if(h.eqs(a.type,"mouseup"))m="mouseup";else if(h.eqs(a.type,"contextmenu"))m="contextmenu";else if(h.eqs(a.type,"click"))if(h.eqs(b.tagName,"span")&&b.getAttribute("treeNode"+
g.id.SWITCH)!==null)d=h.getNodeMainDom(b).id,i="switchNode";else{if(o=h.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+g.id.A}]))d=h.getNodeMainDom(o).id,i="clickNode"}else if(h.eqs(a.type,"dblclick")&&(m="dblclick",o=h.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+g.id.A}])))d=h.getNodeMainDom(o).id,i="switchNode";if(m.length>0&&d.length==0&&(o=h.getMDom(c,b,[{tagName:"a",attrName:"treeNode"+g.id.A}])))d=h.getNodeMainDom(o).id;if(d.length>0)switch(f=e.getNodeCache(c,d),i){case "switchNode":e.nodeIsParent(c,
f)?h.eqs(a.type,"click")||h.eqs(a.type,"dblclick")&&h.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?k=J:i="":i="";break;case "clickNode":k=K}switch(m){case "mousedown":j=L;break;case "mouseup":j=M;break;case "dblclick":j=N;break;case "contextmenu":j=O}return{stop:!1,node:f,nodeEventType:i,nodeEventCallback:k,treeEventType:m,treeEventCallback:j}}],C=[function(a){var b=e.getRoot(a);b||(b={},e.setRoot(a,b));e.nodeChildren(a,b,[]);b.expandTriggerFlag=!1;b.curSelectedList=[];b.noSelection=
!0;b.createdNodes=[];b.zId=0;b._ver=(new Date).getTime()}],D=[],E=[],F=[],G=[],H=[],e={addNodeCache:function(a,b){e.getCache(a).nodes[e.getNodeCacheId(b.tId)]=b},getNodeCacheId:function(a){return a.substring(a.lastIndexOf("_")+1)},addAfterA:function(a){E.push(a)},addBeforeA:function(a){D.push(a)},addInnerAfterA:function(a){G.push(a)},addInnerBeforeA:function(a){F.push(a)},addInitBind:function(a){y.push(a)},addInitUnBind:function(a){z.push(a)},addInitCache:function(a){A.push(a)},addInitNode:function(a){B.push(a)},
addInitProxy:function(a,b){b?u.splice(0,0,a):u.push(a)},addInitRoot:function(a){C.push(a)},addNodesData:function(a,b,c,d){var f=e.nodeChildren(a,b);f?c>=f.length&&(c=-1):(f=e.nodeChildren(a,b,[]),c=-1);if(f.length>0&&c===0)f[0].isFirstNode=!1,j.setNodeLineIcos(a,f[0]);else if(f.length>0&&c<0)f[f.length-1].isLastNode=!1,j.setNodeLineIcos(a,f[f.length-1]);e.nodeIsParent(a,b,!0);c<0?e.nodeChildren(a,b,f.concat(d)):(a=[c,0].concat(d),f.splice.apply(f,a))},addSelectedNode:function(a,b){var c=e.getRoot(a);
e.isSelectedNode(a,b)||c.curSelectedList.push(b)},addCreatedNode:function(a,b){(a.callback.onNodeCreated||a.view.addDiyDom)&&e.getRoot(a).createdNodes.push(b)},addZTreeTools:function(a){H.push(a)},exSetting:function(a){r.extend(!0,P,a)},fixPIdKeyValue:function(a,b){a.data.simpleData.enable&&(b[a.data.simpleData.pIdKey]=b.parentTId?b.getParentNode()[a.data.simpleData.idKey]:a.data.simpleData.rootPId)},getAfterA:function(a,b,c){for(var d=0,e=E.length;d<e;d++)E[d].apply(this,arguments)},getBeforeA:function(a,
b,c){for(var d=0,e=D.length;d<e;d++)D[d].apply(this,arguments)},getInnerAfterA:function(a,b,c){for(var d=0,e=G.length;d<e;d++)G[d].apply(this,arguments)},getInnerBeforeA:function(a,b,c){for(var d=0,e=F.length;d<e;d++)F[d].apply(this,arguments)},getCache:function(a){return x[a.treeId]},getNodeIndex:function(a,b){if(!b)return null;for(var c=b.parentTId?b.getParentNode():e.getRoot(a),c=e.nodeChildren(a,c),d=0,f=c.length-1;d<=f;d++)if(c[d]===b)return d;return-1},getNextNode:function(a,b){if(!b)return null;
for(var c=b.parentTId?b.getParentNode():e.getRoot(a),c=e.nodeChildren(a,c),d=0,f=c.length-1;d<=f;d++)if(c[d]===b)return d==f?null:c[d+1];return null},getNodeByParam:function(a,b,c,d){if(!b||!c)return null;for(var f=0,i=b.length;f<i;f++){var m=b[f];if(m[c]==d)return b[f];m=e.nodeChildren(a,m);if(m=e.getNodeByParam(a,m,c,d))return m}return null},getNodeCache:function(a,b){if(!b)return null;var c=x[a.treeId].nodes[e.getNodeCacheId(b)];return c?c:null},getNodePath:function(a,b){if(!b)return null;var c;
(c=b.parentTId?b.getParentNode().getPath():[])&&c.push(b);return c},getNodes:function(a){return e.nodeChildren(a,e.getRoot(a))},getNodesByParam:function(a,b,c,d){if(!b||!c)return[];for(var f=[],i=0,m=b.length;i<m;i++){var k=b[i];k[c]==d&&f.push(k);k=e.nodeChildren(a,k);f=f.concat(e.getNodesByParam(a,k,c,d))}return f},getNodesByParamFuzzy:function(a,b,c,d){if(!b||!c)return[];for(var f=[],d=d.toLowerCase(),i=0,m=b.length;i<m;i++){var k=b[i];typeof k[c]=="string"&&b[i][c].toLowerCase().indexOf(d)>-1&&
f.push(k);k=e.nodeChildren(a,k);f=f.concat(e.getNodesByParamFuzzy(a,k,c,d))}return f},getNodesByFilter:function(a,b,c,d,f){if(!b)return d?null:[];for(var i=d?null:[],m=0,k=b.length;m<k;m++){var g=b[m];if(h.apply(c,[g,f],!1)){if(d)return g;i.push(g)}g=e.nodeChildren(a,g);g=e.getNodesByFilter(a,g,c,d,f);if(d&&g)return g;i=d?g:i.concat(g)}return i},getPreNode:function(a,b){if(!b)return null;for(var c=b.parentTId?b.getParentNode():e.getRoot(a),c=e.nodeChildren(a,c),d=0,f=c.length;d<f;d++)if(c[d]===b)return d==
0?null:c[d-1];return null},getRoot:function(a){return a?w[a.treeId]:null},getRoots:function(){return w},getSetting:function(a){return t[a]},getSettings:function(){return t},getZTreeTools:function(a){return(a=this.getRoot(this.getSetting(a)))?a.treeTools:null},initCache:function(a){for(var b=0,c=A.length;b<c;b++)A[b].apply(this,arguments)},initNode:function(a,b,c,d,e,i){for(var m=0,g=B.length;m<g;m++)B[m].apply(this,arguments)},initRoot:function(a){for(var b=0,c=C.length;b<c;b++)C[b].apply(this,arguments)},
isSelectedNode:function(a,b){for(var c=e.getRoot(a),d=0,f=c.curSelectedList.length;d<f;d++)if(b===c.curSelectedList[d])return!0;return!1},nodeChildren:function(a,b,c){if(!b)return null;a=a.data.key.children;typeof c!=="undefined"&&(b[a]=c);return b[a]},nodeIsParent:function(a,b,c){if(!b)return!1;a=a.data.key.isParent;typeof c!=="undefined"&&(typeof c==="string"&&(c=h.eqs(c,"true")),b[a]=!!c);return b[a]},nodeName:function(a,b,c){a=a.data.key.name;typeof c!=="undefined"&&(b[a]=c);return""+b[a]},nodeTitle:function(a,
b){return""+b[a.data.key.title===""?a.data.key.name:a.data.key.title]},removeNodeCache:function(a,b){var c=e.nodeChildren(a,b);if(c)for(var d=0,f=c.length;d<f;d++)e.removeNodeCache(a,c[d]);e.getCache(a).nodes[e.getNodeCacheId(b.tId)]=null},removeSelectedNode:function(a,b){for(var c=e.getRoot(a),d=0,f=c.curSelectedList.length;d<f;d++)if(b===c.curSelectedList[d]||!e.getNodeCache(a,c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),a.treeObj.trigger(g.event.UNSELECTED,[a.treeId,b]),d--,f--},setCache:function(a,
b){x[a.treeId]=b},setRoot:function(a,b){w[a.treeId]=b},setZTreeTools:function(a,b){for(var c=0,d=H.length;c<d;c++)H[c].apply(this,arguments)},transformToArrayFormat:function(a,b){function c(b){d.push(b);(b=e.nodeChildren(a,b))&&(d=d.concat(e.transformToArrayFormat(a,b)))}if(!b)return[];var d=[];if(h.isArray(b))for(var f=0,i=b.length;f<i;f++)c(b[f]);else c(b);return d},transformTozTreeFormat:function(a,b){var c,d,f=a.data.simpleData.idKey,i=a.data.simpleData.pIdKey;if(!f||f==""||!b)return[];if(h.isArray(b)){var g=
[],k={};for(c=0,d=b.length;c<d;c++)k[b[c][f]]=b[c];for(c=0,d=b.length;c<d;c++){var j=k[b[c][i]];if(j&&b[c][f]!=b[c][i]){var o=e.nodeChildren(a,j);o||(o=e.nodeChildren(a,j,[]));o.push(b[c])}else g.push(b[c])}return g}else return[b]}},n={bindEvent:function(a){for(var b=0,c=y.length;b<c;b++)y[b].apply(this,arguments)},unbindEvent:function(a){for(var b=0,c=z.length;b<c;b++)z[b].apply(this,arguments)},bindTree:function(a){var b={treeId:a.treeId},c=a.treeObj;a.view.txtSelectedEnable||c.bind("selectstart",
v).css({"-moz-user-select":"-moz-none"});c.bind("click",b,n.proxy);c.bind("dblclick",b,n.proxy);c.bind("mouseover",b,n.proxy);c.bind("mouseout",b,n.proxy);c.bind("mousedown",b,n.proxy);c.bind("mouseup",b,n.proxy);c.bind("contextmenu",b,n.proxy)},unbindTree:function(a){a.treeObj.unbind("selectstart",v).unbind("click",n.proxy).unbind("dblclick",n.proxy).unbind("mouseover",n.proxy).unbind("mouseout",n.proxy).unbind("mousedown",n.proxy).unbind("mouseup",n.proxy).unbind("contextmenu",n.proxy)},doProxy:function(a){for(var b=
[],c=0,d=u.length;c<d;c++){var e=u[c].apply(this,arguments);b.push(e);if(e.stop)break}return b},proxy:function(a){var b=e.getSetting(a.data.treeId);if(!h.uCanDo(b,a))return!0;for(var b=n.doProxy(a),c=!0,d=0,f=b.length;d<f;d++){var i=b[d];i.nodeEventCallback&&(c=i.nodeEventCallback.apply(i,[a,i.node])&&c);i.treeEventCallback&&(c=i.treeEventCallback.apply(i,[a,i.node])&&c)}return c}};J=function(a,b){var c=e.getSetting(a.data.treeId);if(b.open){if(h.apply(c.callback.beforeCollapse,[c.treeId,b],!0)==
!1)return!0}else if(h.apply(c.callback.beforeExpand,[c.treeId,b],!0)==!1)return!0;e.getRoot(c).expandTriggerFlag=!0;j.switchNode(c,b);return!0};K=function(a,b){var c=e.getSetting(a.data.treeId),d=c.view.autoCancelSelected&&(a.ctrlKey||a.metaKey)&&e.isSelectedNode(c,b)?0:c.view.autoCancelSelected&&(a.ctrlKey||a.metaKey)&&c.view.selectedMulti?2:1;if(h.apply(c.callback.beforeClick,[c.treeId,b,d],!0)==!1)return!0;d===0?j.cancelPreSelectedNode(c,b):j.selectNode(c,b,d===2);c.treeObj.trigger(g.event.CLICK,
[a,c.treeId,b,d]);return!0};L=function(a,b){var c=e.getSetting(a.data.treeId);h.apply(c.callback.beforeMouseDown,[c.treeId,b],!0)&&h.apply(c.callback.onMouseDown,[a,c.treeId,b]);return!0};M=function(a,b){var c=e.getSetting(a.data.treeId);h.apply(c.callback.beforeMouseUp,[c.treeId,b],!0)&&h.apply(c.callback.onMouseUp,[a,c.treeId,b]);return!0};N=function(a,b){var c=e.getSetting(a.data.treeId);h.apply(c.callback.beforeDblClick,[c.treeId,b],!0)&&h.apply(c.callback.onDblClick,[a,c.treeId,b]);return!0};
O=function(a,b){var c=e.getSetting(a.data.treeId);h.apply(c.callback.beforeRightClick,[c.treeId,b],!0)&&h.apply(c.callback.onRightClick,[a,c.treeId,b]);return typeof c.callback.onRightClick!="function"};v=function(a){a=a.originalEvent.srcElement.nodeName.toLowerCase();return a==="input"||a==="textarea"};var h={apply:function(a,b,c){return typeof a=="function"?a.apply(Q,b?b:[]):c},canAsync:function(a,b){var c=e.nodeChildren(a,b),d=e.nodeIsParent(a,b);return a.async.enable&&b&&d&&!(b.zAsync||c&&c.length>
0)},clone:function(a){if(a===null)return null;var b=h.isArray(a)?[]:{},c;for(c in a)b[c]=a[c]instanceof Date?new Date(a[c].getTime()):typeof a[c]==="object"?h.clone(a[c]):a[c];return b},eqs:function(a,b){return a.toLowerCase()===b.toLowerCase()},isArray:function(a){return Object.prototype.toString.apply(a)==="[object Array]"},isElement:function(a){return typeof HTMLElement==="object"?a instanceof HTMLElement:a&&typeof a==="object"&&a!==null&&a.nodeType===1&&typeof a.nodeName==="string"},$:function(a,
b,c){b&&typeof b!="string"&&(c=b,b="");return typeof a=="string"?r(a,c?c.treeObj.get(0).ownerDocument:null):r("#"+a.tId+b,c?c.treeObj:null)},getMDom:function(a,b,c){if(!b)return null;for(;b&&b.id!==a.treeId;){for(var d=0,e=c.length;b.tagName&&d<e;d++)if(h.eqs(b.tagName,c[d].tagName)&&b.getAttribute(c[d].attrName)!==null)return b;b=b.parentNode}return null},getNodeMainDom:function(a){return r(a).parent("li").get(0)||r(a).parentsUntil("li").parent().get(0)},isChildOrSelf:function(a,b){return r(a).closest("#"+
b).length>0},uCanDo:function(){return!0}},j={addNodes:function(a,b,c,d,f){var i=e.nodeIsParent(a,b);if(!a.data.keep.leaf||!b||i)if(h.isArray(d)||(d=[d]),a.data.simpleData.enable&&(d=e.transformTozTreeFormat(a,d)),b){var i=l(b,g.id.SWITCH,a),m=l(b,g.id.ICON,a),k=l(b,g.id.UL,a);if(!b.open)j.replaceSwitchClass(b,i,g.folder.CLOSE),j.replaceIcoClass(b,m,g.folder.CLOSE),b.open=!1,k.css({display:"none"});e.addNodesData(a,b,c,d);j.createNodes(a,b.level+1,d,b,c);f||j.expandCollapseParentNode(a,b,!0)}else e.addNodesData(a,
e.getRoot(a),c,d),j.createNodes(a,0,d,null,c)},appendNodes:function(a,b,c,d,f,i,g){if(!c)return[];var k=[],h=d?d:e.getRoot(a),h=e.nodeChildren(a,h),o,l;if(!h||f>=h.length-c.length)f=-1;for(var s=0,n=c.length;s<n;s++){var p=c[s];i&&(o=(f===0||h.length==c.length)&&s==0,l=f<0&&s==c.length-1,e.initNode(a,b,p,d,o,l,g),e.addNodeCache(a,p));o=e.nodeIsParent(a,p);l=[];var I=e.nodeChildren(a,p);I&&I.length>0&&(l=j.appendNodes(a,b+1,I,p,-1,i,g&&p.open));g&&(j.makeDOMNodeMainBefore(k,a,p),j.makeDOMNodeLine(k,
a,p),e.getBeforeA(a,p,k),j.makeDOMNodeNameBefore(k,a,p),e.getInnerBeforeA(a,p,k),j.makeDOMNodeIcon(k,a,p),e.getInnerAfterA(a,p,k),j.makeDOMNodeNameAfter(k,a,p),e.getAfterA(a,p,k),o&&p.open&&j.makeUlHtml(a,p,k,l.join("")),j.makeDOMNodeMainAfter(k,a,p),e.addCreatedNode(a,p))}return k},appendParentULDom:function(a,b){var c=[],d=l(b,a);!d.get(0)&&b.parentTId&&(j.appendParentULDom(a,b.getParentNode()),d=l(b,a));var f=l(b,g.id.UL,a);f.get(0)&&f.remove();f=e.nodeChildren(a,b);f=j.appendNodes(a,b.level+1,
f,b,-1,!1,!0);j.makeUlHtml(a,b,c,f.join(""));d.append(c.join(""))},asyncNode:function(a,b,c,d){var f,i;f=e.nodeIsParent(a,b);if(b&&!f)return h.apply(d),!1;else if(b&&b.isAjaxing)return!1;else if(h.apply(a.callback.beforeAsync,[a.treeId,b],!0)==!1)return h.apply(d),!1;if(b)b.isAjaxing=!0,l(b,g.id.ICON,a).attr({style:"","class":g.className.BUTTON+" "+g.className.ICO_LOADING});var m={},k=h.apply(a.async.autoParam,[a.treeId,b],a.async.autoParam);for(f=0,i=k.length;b&&f<i;f++){var q=k[f].split("="),o=
q;q.length>1&&(o=q[1],q=q[0]);m[o]=b[q]}k=h.apply(a.async.otherParam,[a.treeId,b],a.async.otherParam);if(h.isArray(k))for(f=0,i=k.length;f<i;f+=2)m[k[f]]=k[f+1];else for(var n in k)m[n]=k[n];var s=e.getRoot(a)._ver;r.ajax({contentType:a.async.contentType,cache:!1,type:a.async.type,url:h.apply(a.async.url,[a.treeId,b],a.async.url),data:a.async.contentType.indexOf("application/json")>-1?JSON.stringify(m):m,dataType:a.async.dataType,headers:a.async.headers,xhrFields:a.async.xhrFields,success:function(i){if(s==
e.getRoot(a)._ver){var f=[];try{f=!i||i.length==0?[]:typeof i=="string"?eval("("+i+")"):i}catch(k){f=i}if(b)b.isAjaxing=null,b.zAsync=!0;j.setNodeLineIcos(a,b);f&&f!==""?(f=h.apply(a.async.dataFilter,[a.treeId,b,f],f),j.addNodes(a,b,-1,f?h.clone(f):[],!!c)):j.addNodes(a,b,-1,[],!!c);a.treeObj.trigger(g.event.ASYNC_SUCCESS,[a.treeId,b,i]);h.apply(d)}},error:function(c,d,i){if(s==e.getRoot(a)._ver){if(b)b.isAjaxing=null;j.setNodeLineIcos(a,b);a.treeObj.trigger(g.event.ASYNC_ERROR,[a.treeId,b,c,d,i])}}});
return!0},cancelPreSelectedNode:function(a,b,c){var d=e.getRoot(a).curSelectedList,f,i;for(f=d.length-1;f>=0;f--)if(i=d[f],b===i||!b&&(!c||c!==i))if(l(i,g.id.A,a).removeClass(g.node.CURSELECTED),b){e.removeSelectedNode(a,b);break}else d.splice(f,1),a.treeObj.trigger(g.event.UNSELECTED,[a.treeId,i])},createNodeCallback:function(a){if(a.callback.onNodeCreated||a.view.addDiyDom)for(var b=e.getRoot(a);b.createdNodes.length>0;){var c=b.createdNodes.shift();h.apply(a.view.addDiyDom,[a.treeId,c]);a.callback.onNodeCreated&&
a.treeObj.trigger(g.event.NODECREATED,[a.treeId,c])}},createNodes:function(a,b,c,d,f){if(c&&c.length!=0){var i=e.getRoot(a),m=!d||d.open||!!l(e.nodeChildren(a,d)[0],a).get(0);i.createdNodes=[];var b=j.appendNodes(a,b,c,d,f,!0,m),k,h;d?(d=l(d,g.id.UL,a),d.get(0)&&(k=d)):k=a.treeObj;k&&(f>=0&&(h=k.children()[f]),f>=0&&h?r(h).before(b.join("")):k.append(b.join("")));j.createNodeCallback(a)}},destroy:function(a){a&&(e.initCache(a),e.initRoot(a),n.unbindTree(a),n.unbindEvent(a),a.treeObj.empty(),delete t[a.treeId])},
expandCollapseNode:function(a,b,c,d,f){var i=e.getRoot(a),m;if(b){var k=e.nodeChildren(a,b),q=e.nodeIsParent(a,b);if(i.expandTriggerFlag)m=f,f=function(){m&&m();b.open?a.treeObj.trigger(g.event.EXPAND,[a.treeId,b]):a.treeObj.trigger(g.event.COLLAPSE,[a.treeId,b])},i.expandTriggerFlag=!1;if(!b.open&&q&&(!l(b,g.id.UL,a).get(0)||k&&k.length>0&&!l(k[0],a).get(0)))j.appendParentULDom(a,b),j.createNodeCallback(a);if(b.open==c)h.apply(f,[]);else{var c=l(b,g.id.UL,a),i=l(b,g.id.SWITCH,a),o=l(b,g.id.ICON,
a);q?(b.open=!b.open,b.iconOpen&&b.iconClose&&o.attr("style",j.makeNodeIcoStyle(a,b)),b.open?(j.replaceSwitchClass(b,i,g.folder.OPEN),j.replaceIcoClass(b,o,g.folder.OPEN),d==!1||a.view.expandSpeed==""?(c.show(),h.apply(f,[])):k&&k.length>0?c.slideDown(a.view.expandSpeed,f):(c.show(),h.apply(f,[]))):(j.replaceSwitchClass(b,i,g.folder.CLOSE),j.replaceIcoClass(b,o,g.folder.CLOSE),d==!1||a.view.expandSpeed==""||!(k&&k.length>0)?(c.hide(),h.apply(f,[])):c.slideUp(a.view.expandSpeed,f))):h.apply(f,[])}}else h.apply(f,
[])},expandCollapseParentNode:function(a,b,c,d,e){b&&(b.parentTId?(j.expandCollapseNode(a,b,c,d),b.parentTId&&j.expandCollapseParentNode(a,b.getParentNode(),c,d,e)):j.expandCollapseNode(a,b,c,d,e))},expandCollapseSonNode:function(a,b,c,d,f){var i=e.getRoot(a),i=b?e.nodeChildren(a,b):e.nodeChildren(a,i),g=b?!1:d,k=e.getRoot(a).expandTriggerFlag;e.getRoot(a).expandTriggerFlag=!1;if(i)for(var h=0,l=i.length;h<l;h++)i[h]&&j.expandCollapseSonNode(a,i[h],c,g);e.getRoot(a).expandTriggerFlag=k;j.expandCollapseNode(a,
b,c,d,f)},isSelectedNode:function(a,b){if(!b)return!1;var c=e.getRoot(a).curSelectedList,d;for(d=c.length-1;d>=0;d--)if(b===c[d])return!0;return!1},makeDOMNodeIcon:function(a,b,c){var d=e.nodeName(b,c),d=b.view.nameIsHTML?d:d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");a.push("<span id='",c.tId,g.id.ICON,"' title='' treeNode",g.id.ICON," class='",j.makeNodeIcoClass(b,c),"' style='",j.makeNodeIcoStyle(b,c),"'></span><span id='",c.tId,g.id.SPAN,"' class='",g.className.NAME,"'>",
d,"</span>")},makeDOMNodeLine:function(a,b,c){a.push("<span id='",c.tId,g.id.SWITCH,"' title='' class='",j.makeNodeLineClass(b,c),"' treeNode",g.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(a){a.push("</li>")},makeDOMNodeMainBefore:function(a,b,c){a.push("<li id='",c.tId,"' class='",g.className.LEVEL,c.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(a){a.push("</a>")},makeDOMNodeNameBefore:function(a,b,c){var d=e.nodeTitle(b,c),f=j.makeNodeUrl(b,c),i=j.makeNodeFontCss(b,
c),m=[],k;for(k in i)m.push(k,":",i[k],";");a.push("<a id='",c.tId,g.id.A,"' class='",g.className.LEVEL,c.level,"' treeNode",g.id.A,' onclick="',c.click||"",'" ',f!=null&&f.length>0?"href='"+f+"'":""," target='",j.makeNodeTarget(c),"' style='",m.join(""),"'");h.apply(b.view.showTitle,[b.treeId,c],b.view.showTitle)&&d&&a.push("title='",d.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'");a.push(">")},makeNodeFontCss:function(a,b){var c=h.apply(a.view.fontCss,[a.treeId,b],a.view.fontCss);
return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(a,b){var c=["ico"];if(!b.isAjaxing){var d=e.nodeIsParent(a,b);c[0]=(b.iconSkin?b.iconSkin+"_":"")+c[0];d?c.push(b.open?g.folder.OPEN:g.folder.CLOSE):c.push(g.folder.DOCU)}return g.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(a,b){var c=[];if(!b.isAjaxing){var d=e.nodeIsParent(a,b)&&b.iconOpen&&b.iconClose?b.open?b.iconOpen:b.iconClose:b[a.data.key.icon];d&&c.push("background:url(",d,") 0 0 no-repeat;");(a.view.showIcon==
!1||!h.apply(a.view.showIcon,[a.treeId,b],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(a,b){var c=[];a.view.showLine?b.level==0&&b.isFirstNode&&b.isLastNode?c.push(g.line.ROOT):b.level==0&&b.isFirstNode?c.push(g.line.ROOTS):b.isLastNode?c.push(g.line.BOTTOM):c.push(g.line.CENTER):c.push(g.line.NOLINE);e.nodeIsParent(a,b)?c.push(b.open?g.folder.OPEN:g.folder.CLOSE):c.push(g.folder.DOCU);return j.makeNodeLineClassEx(b)+c.join("_")},makeNodeLineClassEx:function(a){return g.className.BUTTON+
" "+g.className.LEVEL+a.level+" "+g.className.SWITCH+" "},makeNodeTarget:function(a){return a.target||"_blank"},makeNodeUrl:function(a,b){var c=a.data.key.url;return b[c]?b[c]:null},makeUlHtml:function(a,b,c,d){c.push("<ul id='",b.tId,g.id.UL,"' class='",g.className.LEVEL,b.level," ",j.makeUlLineClass(a,b),"' style='display:",b.open?"block":"none","'>");c.push(d);c.push("</ul>")},makeUlLineClass:function(a,b){return a.view.showLine&&!b.isLastNode?g.line.LINE:""},removeChildNodes:function(a,b){if(b){var c=
e.nodeChildren(a,b);if(c){for(var d=0,f=c.length;d<f;d++)e.removeNodeCache(a,c[d]);e.removeSelectedNode(a);delete b[a.data.key.children];a.data.keep.parent?l(b,g.id.UL,a).empty():(e.nodeIsParent(a,b,!1),b.open=!1,c=l(b,g.id.SWITCH,a),d=l(b,g.id.ICON,a),j.replaceSwitchClass(b,c,g.folder.DOCU),j.replaceIcoClass(b,d,g.folder.DOCU),l(b,g.id.UL,a).remove())}}},scrollIntoView:function(a,b){if(b)if(typeof Element==="undefined"){var c=a.treeObj.get(0).getBoundingClientRect(),d=b.getBoundingClientRect();(d.top<
c.top||d.bottom>c.bottom||d.right>c.right||d.left<c.left)&&b.scrollIntoView()}else{if(!Element.prototype.scrollIntoViewIfNeeded)Element.prototype.scrollIntoViewIfNeeded=function(a){function b(a,c){return{start:a,length:c,end:a+c}}function c(b,d){return!1===a||d.start<b.end&&b.start<d.end?Math.max(b.end-d.length,Math.min(d.start,b.start)):(b.start+b.end-d.length)/2}function d(a,b){return{x:a,y:b,translate:function(c,i){return d(a+c,b+i)}}}function e(a,b){for(;a;)b=b.translate(a.offsetLeft,a.offsetTop),
a=a.offsetParent;return b}for(var g=e(this,d(0,0)),j=d(this.offsetWidth,this.offsetHeight),h=this.parentNode,l;h instanceof HTMLElement;)l=e(h,d(h.clientLeft,h.clientTop)),h.scrollLeft=c(b(g.x-l.x,j.x),b(h.scrollLeft,h.clientWidth)),h.scrollTop=c(b(g.y-l.y,j.y),b(h.scrollTop,h.clientHeight)),g=g.translate(-h.scrollLeft,-h.scrollTop),h=h.parentNode};b.scrollIntoViewIfNeeded()}},setFirstNode:function(a,b){var c=e.nodeChildren(a,b);if(c.length>0)c[0].isFirstNode=!0},setLastNode:function(a,b){var c=e.nodeChildren(a,
b);if(c.length>0)c[c.length-1].isLastNode=!0},removeNode:function(a,b){var c=e.getRoot(a),d=b.parentTId?b.getParentNode():c;b.isFirstNode=!1;b.isLastNode=!1;b.getPreNode=function(){return null};b.getNextNode=function(){return null};if(e.getNodeCache(a,b.tId)){l(b,a).remove();e.removeNodeCache(a,b);e.removeSelectedNode(a,b);for(var f=e.nodeChildren(a,d),i=0,h=f.length;i<h;i++)if(f[i].tId==b.tId){f.splice(i,1);break}j.setFirstNode(a,d);j.setLastNode(a,d);var k,i=f.length;if(!a.data.keep.parent&&i==
0)e.nodeIsParent(a,d,!1),d.open=!1,delete d[a.data.key.children],i=l(d,g.id.UL,a),h=l(d,g.id.SWITCH,a),k=l(d,g.id.ICON,a),j.replaceSwitchClass(d,h,g.folder.DOCU),j.replaceIcoClass(d,k,g.folder.DOCU),i.css("display","none");else if(a.view.showLine&&i>0){var q=f[i-1],i=l(q,g.id.UL,a),h=l(q,g.id.SWITCH,a);k=l(q,g.id.ICON,a);d==c?f.length==1?j.replaceSwitchClass(q,h,g.line.ROOT):(c=l(f[0],g.id.SWITCH,a),j.replaceSwitchClass(f[0],c,g.line.ROOTS),j.replaceSwitchClass(q,h,g.line.BOTTOM)):j.replaceSwitchClass(q,
h,g.line.BOTTOM);i.removeClass(g.line.LINE)}}},replaceIcoClass:function(a,b,c){if(b&&!a.isAjaxing&&(a=b.attr("class"),a!=void 0)){a=a.split("_");switch(c){case g.folder.OPEN:case g.folder.CLOSE:case g.folder.DOCU:a[a.length-1]=c}b.attr("class",a.join("_"))}},replaceSwitchClass:function(a,b,c){if(b){var d=b.attr("class");if(d!=void 0){d=d.split("_");switch(c){case g.line.ROOT:case g.line.ROOTS:case g.line.CENTER:case g.line.BOTTOM:case g.line.NOLINE:d[0]=j.makeNodeLineClassEx(a)+c;break;case g.folder.OPEN:case g.folder.CLOSE:case g.folder.DOCU:d[1]=
c}b.attr("class",d.join("_"));c!==g.folder.DOCU?b.removeAttr("disabled"):b.attr("disabled","disabled")}}},selectNode:function(a,b,c){c||j.cancelPreSelectedNode(a,null,b);l(b,g.id.A,a).addClass(g.node.CURSELECTED);e.addSelectedNode(a,b);a.treeObj.trigger(g.event.SELECTED,[a.treeId,b])},setNodeFontCss:function(a,b){var c=l(b,g.id.A,a),d=j.makeNodeFontCss(a,b);d&&c.css(d)},setNodeLineIcos:function(a,b){if(b){var c=l(b,g.id.SWITCH,a),d=l(b,g.id.UL,a),f=l(b,g.id.ICON,a),i=j.makeUlLineClass(a,b);i.length==
0?d.removeClass(g.line.LINE):d.addClass(i);c.attr("class",j.makeNodeLineClass(a,b));e.nodeIsParent(a,b)?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",j.makeNodeIcoStyle(a,b));f.attr("class",j.makeNodeIcoClass(a,b))}},setNodeName:function(a,b){var c=e.nodeTitle(a,b),d=l(b,g.id.SPAN,a);d.empty();a.view.nameIsHTML?d.html(e.nodeName(a,b)):d.text(e.nodeName(a,b));h.apply(a.view.showTitle,[a.treeId,b],a.view.showTitle)&&l(b,g.id.A,a).attr("title",!c?"":c)},
setNodeTarget:function(a,b){l(b,g.id.A,a).attr("target",j.makeNodeTarget(b))},setNodeUrl:function(a,b){var c=l(b,g.id.A,a),d=j.makeNodeUrl(a,b);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(a,b){b.open||!h.canAsync(a,b)?j.expandCollapseNode(a,b,!b.open):a.async.enable?j.asyncNode(a,b)||j.expandCollapseNode(a,b,!b.open):b&&j.expandCollapseNode(a,b,!b.open)}};r.fn.zTree={consts:{className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch",NAME:"node_name"},
event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_z:{tools:h,
view:j,event:n,data:e},getZTreeObj:function(a){return(a=e.getZTreeTools(a))?a:null},destroy:function(a){if(a&&a.length>0)j.destroy(e.getSetting(a));else for(var b in t)j.destroy(t[b])},init:function(a,b,c){var d=h.clone(P);r.extend(!0,d,b);d.treeId=a.attr("id");d.treeObj=a;d.treeObj.empty();t[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed="";e.initRoot(d);a=e.getRoot(d);c=c?h.clone(h.isArray(c)?c:[c]):[];d.data.simpleData.enable?e.nodeChildren(d,a,e.transformTozTreeFormat(d,
c)):e.nodeChildren(d,a,c);e.initCache(d);n.unbindTree(d);n.bindTree(d);n.unbindEvent(d);n.bindEvent(d);var f={setting:d,addNodes:function(a,b,c,f){function g(){j.addNodes(d,a,b,n,f==!0)}a||(a=null);var l=e.nodeIsParent(d,a);if(a&&!l&&d.data.keep.leaf)return null;l=parseInt(b,10);isNaN(l)?(f=!!c,c=b,b=-1):b=l;if(!c)return null;var n=h.clone(h.isArray(c)?c:[c]);h.canAsync(d,a)?j.asyncNode(d,a,f,g):g();return n},cancelSelectedNode:function(a){j.cancelPreSelectedNode(d,a)},destroy:function(){j.destroy(d)},
expandAll:function(a){a=!!a;j.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,f,g){function n(){var b=l(a,d).get(0);b&&f!==!1&&j.scrollIntoView(d,b)}if(!a||!e.nodeIsParent(d,a))return null;b!==!0&&b!==!1&&(b=!a.open);if((g=!!g)&&b&&h.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(g&&!b&&h.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&j.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;
e.getRoot(d).expandTriggerFlag=g;!h.canAsync(d,a)&&c?j.expandCollapseSonNode(d,a,b,!0,n):(a.open=!b,j.switchNode(this.setting,a),n());return b},getNodes:function(){return e.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:e.getNodeByParam(d,c?e.nodeChildren(d,c):e.getNodes(d),a,b)},getNodeByTId:function(a){return e.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:e.getNodesByParam(d,c?e.nodeChildren(d,c):e.getNodes(d),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?null:
e.getNodesByParamFuzzy(d,c?e.nodeChildren(d,c):e.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,f){b=!!b;return!a||typeof a!="function"?b?null:[]:e.getNodesByFilter(d,c?e.nodeChildren(d,c):e.getNodes(d),a,b,f)},getNodeIndex:function(a){if(!a)return null;for(var b=a.parentTId?a.getParentNode():e.getRoot(d),b=e.nodeChildren(d,b),c=0,f=b.length;c<f;c++)if(b[c]==a)return c;return-1},getSelectedNodes:function(){for(var a=[],b=e.getRoot(d).curSelectedList,c=0,f=b.length;c<f;c++)a.push(b[c]);return a},
isSelectedNode:function(a){return e.isSelectedNode(d,a)},reAsyncChildNodesPromise:function(a,b,c){return new Promise(function(d,e){try{f.reAsyncChildNodes(a,b,c,function(){d(a)})}catch(g){e(g)}})},reAsyncChildNodes:function(a,b,c,f){if(this.setting.async.enable){var h=!a;h&&(a=e.getRoot(d));if(b=="refresh"){for(var b=e.nodeChildren(d,a),n=0,r=b?b.length:0;n<r;n++)e.removeNodeCache(d,b[n]);e.removeSelectedNode(d);e.nodeChildren(d,a,[]);h?this.setting.treeObj.empty():l(a,g.id.UL,d).empty()}j.asyncNode(this.setting,
h?null:a,!!c,f)}},refresh:function(){this.setting.treeObj.empty();var a=e.getRoot(d),b=e.nodeChildren(d,a);e.initRoot(d);e.nodeChildren(d,a,b);e.initCache(d);j.createNodes(d,0,e.nodeChildren(d,a),null,-1)},removeChildNodes:function(a){if(!a)return null;var b=e.nodeChildren(d,a);j.removeChildNodes(d,a);return b?b:null},removeNode:function(a,b){a&&(b=!!b,b&&h.apply(d.callback.beforeRemove,[d.treeId,a],!0)==!1||(j.removeNode(d,a),b&&this.setting.treeObj.trigger(g.event.REMOVE,[d.treeId,a])))},selectNode:function(a,
b,c){function e(){if(!c){var b=l(a,d).get(0);j.scrollIntoView(d,b)}}if(a&&h.uCanDo(d)){b=d.view.selectedMulti&&b;if(a.parentTId)j.expandCollapseParentNode(d,a.getParentNode(),!0,!1,e);else if(!c)try{l(a,d).focus().blur()}catch(f){}j.selectNode(d,a,b)}},transformTozTreeNodes:function(a){return e.transformTozTreeFormat(d,a)},transformToArray:function(a){return e.transformToArrayFormat(d,a)},updateNode:function(a){a&&l(a,d).get(0)&&h.uCanDo(d)&&(j.setNodeName(d,a),j.setNodeTarget(d,a),j.setNodeUrl(d,
a),j.setNodeLineIcos(d,a),j.setNodeFontCss(d,a))}};a.treeTools=f;e.setZTreeTools(d,f);(c=e.nodeChildren(d,a))&&c.length>0?j.createNodes(d,0,c,null,-1):d.async.enable&&d.async.url&&d.async.url!==""&&j.asyncNode(d);return f}};var Q=r.fn.zTree,l=h.$,g=Q.consts})(jQuery);
@@ -0,0 +1,49 @@
/*-------------------------------------
zTree Style
version: 3.0
author: Hunter.z
email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
.ztree {margin:0; padding:5px; color:#333}
.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap}
.ztree li ul{ margin:0; padding:0 0 0 18px}
.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; color:#333; height:17px; text-decoration:none; vertical-align:top; display: inline-block}
.ztree li a:hover {text-decoration:none}
.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid;}
.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8; filter:alpha(opacity=80)}
.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid; opacity:0.8; filter:alpha(opacity=80)}
.ztree li a.tmpTargetNode_prev {}
.ztree li a.tmpTargetNode_next {}
.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
font-size:12px; border:1px #7EC4CC solid; *border:0px}
.ztree li span {line-height:16px; margin-right: 2px}
.ztree li span.button {line-height:0; margin:0;width:16px; height:16px; display: inline-block; vertical-align:middle;
border:0 none; cursor: pointer;
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
.ztree li span.button.switch {width:1px; height:18px; visibility: hidden}
.zTreeDragUL {margin:0; padding:0; position:absolute; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
/* level 等级样式*/
/*.ztree li button.level0 {
display:none;
}
.ztree li ul.level0 {
padding:0;
background:none;
}*/
.ztree li span.button.core_ico_docu{margin-right:2px; background-position:-126px 0; vertical-align:top; *vertical-align:middle}
.ztree li span.button.check_ico_docu{margin-right:2px; background-position:-126px -16px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.edit_ico_docu{margin-right:2px; background-position:-126px -32px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.hide_ico_docu{margin-right:2px; background-position:-160px 0; vertical-align:top; *vertical-align:middle}
@@ -0,0 +1,13 @@
<div class="apiDetail">
<div>
<h2><span>JSON</span><span class="path">$.fn.zTree.</span>_z</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>zTree v3.x 内部的全部方法都可以通过 $.fn.zTree._z 进行调用,开放出来是为了更便于大家开发制作自己的 zTree 插件。 </p>
<p class="highlight_red">如无特殊需求请勿使用此对象,以及修改此对象内部的各个函数。</p>
</div>
</div>
</div>
</div>
@@ -0,0 +1,28 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId)</span><span class="path">$.fn.zTree.</span>destroy</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>从 zTree v3.4 开始提供销毁 zTree 的方法。 </p>
<p>1、用此方法可以销毁指定 treeId 的 zTree,也可以销毁当前页面全部的 zTree。</p>
<p class="highlight_red">2、销毁指定 treeId 的 zTree 也可以使用 zTreeObj.destroy() 方法。</p>
<p class="highlight_red">3、重新使用已经被销毁的树,必须要使用 init 方法进行初始化。</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>zTree 的 DOM 容器的 id</p>
<p class="highlight_red">省略 treeId,表示销毁当前页面全部的 zTree</p>
<h4 class="topLine"><b>返回值</b><span></span></h4>
<p>目前无任何返回值</p>
</div>
<h3>function 举例</h3>
<h4>1. 销毁 id 为 "treeDemo" 的 zTree</h4>
<pre xmlns=""><code>$.fn.zTree.destroy("treeDemo");</code></pre>
<h4>2. 销毁全部 的 zTree</h4>
<pre xmlns=""><code>$.fn.zTree.destroy();</code></pre>
</div>
</div>
@@ -0,0 +1,24 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId)</span><span class="path">$.fn.zTree.</span>getZTreeObj</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>zTree v3.x 专门提供的根据 treeId 获取 zTree 对象的方法。 </p>
<p class="highlight_red">必须在初始化 zTree 以后才可以使用此方法。</p>
<p>有了这个方法,用户不再需要自己设定全局变量来保存 zTree 初始化后得到的对象了,而且在所有回调函数中全都会返回 treeId 属性,用户可以随时使用此方法获取需要进行操作的 zTree 对象</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>zTree 的 DOM 容器的 id</p>
<h4 class="topLine"><b>返回值</b><span>JSON</span></h4>
<p>zTree 对象,提供操作 zTree 的各种方法,对于通过 js 操作 zTree 来说必须通过此对象</p>
</div>
<h3>function 举例</h3>
<h4>1. 获取 id 为 tree 的 zTree 对象</h4>
<pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");</code></pre>
</div>
</div>
@@ -0,0 +1,74 @@
<div class="apiDetail">
<div>
<h2><span>Function(obj, zSetting, zNodes)</span><span class="path">$.fn.zTree.</span>init</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>zTree 初始化方法,创建 zTree 必须使用此方法</p>
<p>1、页面需要进行 W3C 申明,例如:&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"&nbsp;&nbsp; &nbsp;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;</p>
<p>2、需要首先加载 jquery-1.4.2.js 或其他更高版本的 jQuery 。</p>
<p>3、需要加载 jquery-ztree.core-3.0.js,如果需要用到 编辑功能 或 checkbox / radio 还需要分别加载 jquery-ztree.exedit-3.0.js 和 jquery-ztree.excheck-3.0.js 。</p>
<p>4、需要加载 zTreeStyle.css 以及 zTreeStyle 目录下的 img 文件。</p>
<p>5、如果需要使用自定义图标请参考相应的Demo。</p>
<p>6、请注意设置 zTree 的容器样式 class="ztree",其中 "ztree" 这个 className,可以根据需要随意修改,别忘了修改 css 中对应名字就是了,对于容器如果需要增加其他特殊样式,可根据自己的需要进行修改。</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>obj</b><span>jQuery Object</span></h4>
<p>用于展现 zTree 的 DOM 容器</p>
<h4 class="topLine"><b>zSetting</b><span>JSON</span></h4>
<p>zTree 的配置数据,具体请参考 “setting 配置详解”中的各个属性详细说明</p>
<h4 class="topLine"><b>zNodes</b><span>Array(JSON) / JSON</span></h4>
<p>zTree 的节点数据,具体请参考 “treeNode 节点数据详解”中的各个属性详细说明</p>
<p class="highlight_red">1、v3.x 支持单独添加一个节点,即如果只新增一个节点,不用必须包在数组中</p>
<p class="highlight_red">2、如果需要异步加载根节点,可以设置为 null 或 [ ]</p>
<p class="highlight_red">3、使用简单数据模式,请参考 setting.data.simpleData 内的属性说明</p>
<h4 class="topLine"><b>返回值</b><span>JSON</span></h4>
<p>zTree 对象,提供操作 zTree 的各种方法,对于通过 js 操作 zTree 来说必须通过此对象</p>
<p class="highlight_red">如果不需要自行设定全局变量保存,可以利用 $.fn.zTree.getZTreeObj 方法随时获取</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 简单创建 zTree 演示</h4>
<pre xmlns=""><code>&lt;!DOCTYPE html&gt;
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt; ZTREE DEMO &lt;/TITLE&gt;
&lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;
&lt;link rel="stylesheet" href="zTreeStyle/zTreeStyle.css" type="text/css"&gt;
&lt;script type="text/javascript" src="jquery-1.4.2.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.ztree.core.js"&gt;&lt;/script&gt;
&lt;!--
&lt;script type="text/javascript" src="jquery.ztree.excheck.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.ztree.exedit.js"&gt;&lt;/script&gt;
--&gt;
&lt;SCRIPT type="text/javascript" &gt;
var zTreeObj,
setting = {
view: {
selectedMulti: false
}
},
zTreeNodes = [
{"name":"网站导航", open:true, children: [
{ "name":"google", "url":"http://g.cn", "target":"_blank"},
{ "name":"baidu", "url":"http://baidu.com", "target":"_blank"},
{ "name":"sina", "url":"http://www.sina.com.cn", "target":"_blank"}
]
}
];
$(document).ready(function(){
zTreeObj = $.fn.zTree.init($("#tree"), setting, zTreeNodes);
});
&lt;/SCRIPT&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;ul id="tree" class="ztree" style="width:230px; overflow:auto;"&gt;&lt;/ul&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;</code></pre>
</div>
</div>
@@ -0,0 +1,49 @@
<div class="apiDetail">
<div>
<h2><span>Array(String) / Function(treeId, treeNode)</span><span class="path">setting.async.</span>autoParam</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>异步加载时需要自动提交父节点属性的参数。<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
<p>默认值:[ ]</p>
</div>
</div>
<h3>Array(String) 格式说明</h3>
<div class="desc">
<p>1、将需要作为参数提交的属性名称,制作成 Array 即可,例如:["id", "name"]</p>
<p>2、可以设置提交时的参数名称,例如 server 只接受 zId : ["id=zId"]</p>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>需要异步加载子节点的的父节点 JSON 数据对象</p>
<p class="highlight_red">针对根进行异步加载时,treeNode = null</p>
<h4 class="topLine"><b>返回值</b><span>Array(String)</span></h4>
<p>返回值同 Array(String) 格式的数据</p>
</div>
<h3>setting 举例</h3>
<h4>1. 设置 id 属性为自动提交的参数</h4>
<pre xmlns=""><code>var setting = {
async: {
enable: true,
url: "http://host/getNode.php",
autoParam: ["id"]
}
};
假设 异步加载 父节点(node = {id:1, name:"test"}) 的子节点时,将提交参数 id=1
......</code></pre>
<h4>2. 设置 id 属性作为 zId 成为自动提交的参数</h4>
<pre xmlns=""><code>var setting = {
async: {
enable: true,
url: "http://host/getNode.php",
autoParam: ["id=zId"]
}
};
假设 对父节点 node = {id:1, name:"test"},进行异步加载时,将提交参数 zId=1
......</code></pre>
</div>
</div>
@@ -0,0 +1,29 @@
<div class="apiDetail">
<div>
<h2><span>String</span><span class="path">setting.async.</span>contentType</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>Ajax 提交参数的数据类型。<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
<p>默认值:"application/x-www-form-urlencoded"</p>
</div>
</div>
<h3>String 格式说明</h3>
<div class="desc">
<p> contentType = "application/x-www-form-urlencoded" 可以满足绝大部分请求,按照标准的 Form 格式提交参数</p>
<p> contentType = "application/json" 可以满足 .Net 的编程需要,按照 JSON 格式提交参数</p>
</div>
<h3>setting 举例</h3>
<h4>1. 设置 Ajax 提交参数的数据类型为 JSON 格式</h4>
<pre xmlns=""><code>var setting = {
async: {
enable: true,
contentType: "application/json",
url: "http://host/getNode.php",
autoParam: ["id", "name"]
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,45 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, parentNode, responseData)</span><span class="path">setting.async.</span>dataFilter</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于对 Ajax 返回数据进行预处理的函数。<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
<p>进行异步加载的父节点 JSON 数据对象</p>
<p class="highlight_red">对根进行异步加载时,parentNode = null</p>
<h4 class="topLine"><b>responseData</b><span>Array(JSON) / JSON / String</span></h4>
<p>异步加载获取到的数据转换后的 Array(JSON) / JSON / String 数据对象</p>
<p class="highlight_red">v3.4开始 支持 XML 数据格式的 String</p>
<h4 class="topLine"><b>返回值</b><span>Array(JSON) / JSON</span></h4>
<p>返回值是 zTree 支持的JSON 数据结构即可。</p>
<p class="highlight_red">v3.x 支持单个 JSON 节点数据进行加载</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 修改异步获取到的节点name属性</h4>
<pre xmlns=""><code>function ajaxDataFilter(treeId, parentNode, responseData) {
if (responseData) {
for(var i =0; i < responseData.length; i++) {
responseData[i].name += "_filter";
}
}
return responseData;
};
var setting = {
async: {
enable: true,
url: "http://host/getNode.php",
dataFilter: ajaxDataFilter
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,29 @@
<div class="apiDetail">
<div>
<h2><span>String</span><span class="path">setting.async.</span>dataType</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>Ajax 获取的数据类型。<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
<p>默认值:"text"</p>
</div>
</div>
<h3>String 格式说明</h3>
<div class="desc">
<p> dataType = "text" 可以满足绝大部分请求</p>
<p class="highlight_red">其余 dataType 类型请参考 jQuery ajax 中的 dataType 参数</p>
</div>
<h3>setting 举例</h3>
<h4>1. 设置 Ajax 获取的数据类型为 纯文本</h4>
<pre xmlns=""><code>var setting = {
async: {
enable: true,
dataType: "text",
url: "http://host/getNode.php",
autoParam: ["id", "name"]
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,30 @@
<div class="apiDetail">
<div>
<h2><span>Boolean</span><span class="path">setting.async.</span>enable</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>设置 zTree 是否开启异步加载模式</p>
<p>默认值:false</p>
</div>
</div>
<h3>Boolean 格式说明</h3>
<div class="desc">
<p> true 表示 开启 异步加载模式</p>
<p> false 表示 关闭 异步加载模式</p>
<p class="highlight_red">如果设置为 true,请务必设置 setting.async 内的其它参数。</p>
<p class="highlight_red">如果需要根节点也异步加载,初始化时 treeNodes 参数设置为 null 即可。</p>
</div>
<h3>setting 举例</h3>
<h4>1. 需要开启异步加载模式</h4>
<pre xmlns=""><code>var setting = {
async: {
enable: true,
url: "http://host/getNode.php",
autoParam: ["id", "name"]
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,18 @@
<div class="apiDetail">
<div>
<h2><span>Object</span><span class="path">setting.async.</span>headers</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p><span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
<p>默认值:"{}"</p>
<p class="highlight_red">v3.5.36+</p>
</div>
</div>
<h3>Object 格式说明</h3>
<div class="desc">
<p class="highlight_red">请参考 jQuery ajax 中的 headers 参数</p>
</div>
</div>
</div>
@@ -0,0 +1,50 @@
<div class="apiDetail">
<div>
<h2><span>Array(String) / JSON / Function(treeId, treeNode)</span><span class="path">setting.async.</span>otherParam</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>Ajax 请求提交的静态参数键值对。<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
<p>默认值:[ ]</p>
</div>
</div>
<h3>Array(String) 格式说明</h3>
<div class="desc">
<p>可以为空[ ],如果有 key,则必须存在 value。 例如:[key, value]</p>
</div>
<h3>JSON 格式说明</h3>
<div class="desc">
<p>直接用 JSON 格式制作键值对,例如:{ key1:value1, key2:value2 }</p>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>需要异步加载子节点的的父节点 JSON 数据对象</p>
<p class="highlight_red">针对根进行异步加载时,treeNode = null</p>
<h4 class="topLine"><b>返回值</b><span>Array(String) || JSON</span></h4>
<p>返回值同 Array(String) || JSON 格式的数据</p>
</div>
<h3>setting 举例</h3>
<h4>1. 设置 Array(String) 格式的参数</h4>
<pre xmlns=""><code>var setting = {
async: {
enable: true,
url: "http://host/getNode.php",
otherParam: ["id", "1", "name", "test"]
}
};
进行异步加载时,将提交参数 id=1&name=test</code></pre>
<h4>2. 设置 JSON 格式的参数</h4>
<pre xmlns=""><code>var setting = {
async: {
enable: true,
url: "http://host/getNode.php",
otherParam: { "id":"1", "name":"test"}
}
};
进行异步加载时,将提交参数 id=1&name=test</code></pre>
</div>
</div>
@@ -0,0 +1,30 @@
<div class="apiDetail">
<div>
<h2><span>String</span><span class="path">setting.async.</span>type</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>Ajax 的 http 请求模式。<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
<p>默认值:"post"</p>
</div>
</div>
<h3>String 格式说明</h3>
<div class="desc">
<p> type = "post" 表示异步加载采用 post 方法请求</p>
<p> type = "get" 表示异步加载采用 get 方法请求</p>
<p class="highlight_red">对应于 jQuery ajax 中的 type 参数</p>
</div>
<h3>setting 举例</h3>
<h4>1. 设置使用 get 方式请求数据</h4>
<pre xmlns=""><code>var setting = {
async: {
enable: true,
type: "get",
url: "http://host/getNode.php",
autoParam: ["id", "name"]
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,50 @@
<div class="apiDetail">
<div>
<h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.async.</span>url</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>Ajax 获取数据的 URL 地址。<span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
<p>默认值:""</p>
</div>
</div>
<h3>String 格式说明</h3>
<div class="desc">
<p>设置固定的异步加载 url 字符串,请注意地址的路径,确保页面能正常加载</p>
<p class="highlight_red">url 内也可以带参数,这些参数就只能是通过 get 方式提交了,并且请注意进行转码</p>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>需要异步加载子节点的的父节点 JSON 数据对象</p>
<p class="highlight_red">针对根进行异步加载时,treeNode = null</p>
<h4 class="topLine"><b>返回值</b><span>String</span></h4>
<p>返回值同 String 格式的数据</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 设置异步获取节点的 URL 为 nodes.php</h4>
<pre xmlns=""><code>var setting = {
async: {
enable: true,
url: "nodes.php",
autoParam: ["id", "name"]
}
};
......</code></pre>
<h4>2. 设置异步获取节点的 URL 为 function 动态获取</h4>
<pre xmlns=""><code>function getAsyncUrl(treeId, treeNode) {
return treeNode.isParent ? "nodes1.php" : "nodes2.php";
};
var setting = {
async: {
enable: true,
url: getAsyncUrl,
autoParam: ["id", "name"]
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,18 @@
<div class="apiDetail">
<div>
<h2><span>Object</span><span class="path">setting.async.</span>xhrFields</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p><span class="highlight_red">[setting.async.enable = true 时生效]</span></p>
<p>默认值:"{}"</p>
<p class="highlight_red">v3.5.36+</p>
</div>
</div>
<h3>Object 格式说明</h3>
<div class="desc">
<p class="highlight_red">请参考 jQuery ajax 中的 xhrFields 参数</p>
</div>
</div>
</div>
@@ -0,0 +1,35 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeAsync</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获异步加载之前的事件回调函数,zTree 根据返回值确定是否允许进行异步加载</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>进行异步加载的父节点 JSON 数据对象</p>
<p class="highlight_red">针对根进行异步加载时,treeNode = null</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,zTree 将不进行异步加载,也无法触发 onAsyncSuccess / onAsyncError 事件回调函数</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止 id 为 1 的父节点进行异步加载操作</h4>
<pre xmlns=""><code>function zTreeBeforeAsync(treeId, treeNode) {
return (treeNode.id !== 1);
};
var setting = {
callback: {
beforeAsync: zTreeBeforeAsync
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,34 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeCheck</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获 勾选 或 取消勾选 之前的事件回调函数,并且根据返回值确定是否允许 勾选 或 取消勾选 </p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>进行 勾选 或 取消勾选 的节点 JSON 数据对象</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,将不会改变勾选状态,并且无法触发 onCheck 事件回调函数</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止所有勾选操作,保持初始化的勾选状态</h4>
<pre xmlns=""><code>function zTreeBeforeCheck(treeId, treeNode) {
return false;
};
var setting = {
callback: {
beforeCheck: zTreeBeforeCheck
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,49 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode, clickFlag)</span><span class="path">setting.callback.</span>beforeClick</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获单击节点之前的事件回调函数,并且根据返回值确定是否允许单击操作</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>被单击的节点 JSON 数据对象</p>
<h4 class="topLine"><b>clickFlag</b><span>Number</span></h4>
<p>节点被点击后的选中操作类型,详细看下表</p>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<thead><tr><td>clickFlag</td><td title="是否允许多点选中">selectedMulti</td><td title="是否按下 Ctrl 或 Cmd 键">autoCancelSelected<br/>&&<br/>event.ctrlKey / metaKey</td><td title="节点当前选择状态">isSelected</td><td>选中操作</td></tr></thead>
<tbody>
<tr><td>1</td><td>true</td><td>false</td><td>false</td><td>普通选中</td></tr>
<tr><td>1</td><td>true</td><td>false</td><td>true</td><td>普通选中</td></tr>
<tr><td>2</td><td>true</td><td>true</td><td>false</td><td>追加选中</td></tr>
<tr><td>0</td><td>true</td><td>true</td><td>true</td><td>取消选中</td></tr>
<tr><td>1</td><td>false</td><td>false</td><td>false</td><td>普通选中</td></tr>
<tr><td>1</td><td>false</td><td>false</td><td>true</td><td>普通选中</td></tr>
<tr><td>1</td><td>false</td><td>true</td><td>false</td><td>普通选中</td></tr>
<tr><td>0</td><td>false</td><td>true</td><td>true</td><td>取消选中</td></tr>
</tbody>
</table>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,zTree 将不会选中节点,也无法触发 onClick 事件回调函数</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止节点被选中</h4>
<pre xmlns=""><code>function zTreeBeforeClick(treeId, treeNode, clickFlag) {
return (treeNode.id !== 1);
};
var setting = {
callback: {
beforeClick: zTreeBeforeClick
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,34 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeCollapse</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获父节点折叠之前的事件回调函数,并且根据返回值确定是否允许折叠操作</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>要折叠的父节点 JSON 数据对象</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,zTree 将不会折叠节点,也无法触发 onCollapse 事件回调函数</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止所有已展开的父节点折叠</h4>
<pre xmlns=""><code>function zTreeBeforeCollapse(treeId, treeNode) {
return false;
};
var setting = {
callback: {
beforeCollapse: zTreeBeforeCollapse
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,36 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeDblClick</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获 zTree 上鼠标双击之前的事件回调函数,并且根据返回值确定触发 onDblClick 事件回调函数</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>鼠标双击时所在节点的 JSON 数据对象</p>
<p class="highlight_red">如果不在节点上,则返回 null</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,将仅仅无法触发 onDblClick 事件回调函数,对其他操作无任何影响</p>
<p class="highlight_red">此事件回调函数对双击节点展开功能无任何影响,如果需要设置请参考 setting.view.dblClickExpand 属性</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止 onDblClick 事件</h4>
<pre xmlns=""><code>function zTreeBeforeDblClick(treeId, treeNode) {
return false;
};
var setting = {
callback: {
beforeDblClick: zTreeBeforeDblClick
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,39 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNodes)</span><span class="path">setting.callback.</span>beforeDrag</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点被拖拽之前的事件回调函数,并且根据返回值确定是否允许开启拖拽操作</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>被拖拽的节点 treeNodes 所在 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
<p>要被拖拽的节点 JSON 数据集合</p>
<p class="highlight_red">v3.x 允许多个同级节点同时被拖拽,因此将此参数修改为 Array(JSON)</p>
<p class="highlight_red">如果拖拽时多个被选择的节点不是同级关系,则只能拖拽鼠标当前所在位置的节点</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,zTree 将终止拖拽,也无法触发 onDrag / beforeDrop / onDrop 事件回调函数</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止全部拖拽操作</h4>
<pre xmlns=""><code>function zTreeBeforeDrag(treeId, treeNodes) {
return false;
};
var setting = {
edit: {
enable: true
},
callback: {
beforeDrag: zTreeBeforeDrag
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,37 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeDragOpen</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获拖拽节点移动到折叠状态的父节点后,即将自动展开该父节点之前的事件回调函数,并且根据返回值确定是否允许自动展开操作</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>需要被展开的父节点 treeNode 所在 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>要被自动展开的父节点 JSON 数据对象</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,zTree 将无法进行自动展开操作</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止全部拖拽时的自动展开操作</h4>
<pre xmlns=""><code>function zTreeBeforeDragOpen(treeId, treeNode) {
return false;
};
var setting = {
edit: {
enable: true
},
callback: {
beforeDragOpen: zTreeBeforeDragOpen
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,48 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNodes, targetNode, moveType, isCopy)</span><span class="path">setting.callback.</span>beforeDrop</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点拖拽操作结束之前的事件回调函数,并且根据返回值确定是否允许此拖拽操作</p>
<p>默认值:null</p>
<p class="highlight_red">如未拖拽到有效位置,则不触发此回调函数,直接将节点恢复原位置</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>目标节点 targetNode 所在 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
<p>被拖拽的节点 JSON 数据集合</p>
<p class="highlight_red">无论拖拽操作为 复制 还是 移动,treeNodes 都是当前被拖拽节点的数据集合。</p>
<h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
<p>treeNodes 被拖拽放开的目标节点 JSON 数据对象。</p>
<p class="highlight_red">如果拖拽成为根节点,则 targetNode = null</p>
<h4 class="topLine"><b>moveType</b><span>String</span></h4>
<p>指定移动到目标节点的相对位置</p>
<p class="highlight_red">"inner":成为子节点,"prev":成为同级前一个节点,"next":成为同级后一个节点</p>
<h4 class="topLine"><b>isCopy</b><span>Boolean</span></h4>
<p>拖拽节点操作是 复制 或 移动</p>
<p class="highlight_red">true:复制;false:移动</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,zTree 将恢复被拖拽的节点,也无法触发 onDrop 事件回调函数</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止将节点拖拽成为根节点</h4>
<pre xmlns=""><code>function zTreeBeforeDrop(treeId, treeNodes, targetNode, moveType) {
return !(targetNode == null || (moveType != "inner" && !targetNode.parentTId));
};
var setting = {
edit: {
enable: true
},
callback: {
beforeDrop: zTreeBeforeDrop
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,38 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeEditName</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点编辑按钮的 click 事件,并且根据返回值确定是否允许进入名称编辑状态</p>
<p class="highlight_red">此事件回调函数最主要是用于捕获编辑按钮的点击事件,然后触发自定义的编辑界面操作。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>将要进入编辑名称状态的节点 JSON 数据对象</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,节点将无法进入 zTree 默认的编辑名称状态</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止修改父节点的名称</h4>
<pre xmlns=""><code>function zTreeBeforeEditName(treeId, treeNode) {
return !treeNode.isParent;
}
var setting = {
edit: {
enable: true
},
callback: {
beforeEditName: zTreeBeforeEditName
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,34 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeExpand</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获父节点展开之前的事件回调函数,并且根据返回值确定是否允许展开操作</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>要展开的父节点 JSON 数据对象</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,zTree 将不会展开节点,也无法触发 onExpand 事件回调函数</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止所有已折叠的父节点展开</h4>
<pre xmlns=""><code>function zTreeBeforeExpand(treeId, treeNode) {
return false;
};
var setting = {
callback: {
beforeExpand: zTreeBeforeExpand
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,35 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeMouseDown</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获 zTree 上鼠标按键按下之前的事件回调函数,并且根据返回值确定触发 onMouseDown 事件回调函数</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>鼠标按键按下时所在节点的 JSON 数据对象</p>
<p class="highlight_red">如果不在节点上,则返回 null</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,将仅仅无法触发 onMouseDown 事件回调函数,对其他操作无任何影响</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止 onMouseDown 事件</h4>
<pre xmlns=""><code>function zTreeBeforeMouseDown(treeId, treeNode) {
return false;
};
var setting = {
callback: {
beforeMouseDown: zTreeBeforeMouseDown
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,35 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeMouseUp</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获 zTree 上鼠标按键松开之前的事件回调函数,并且根据返回值确定触发 onMouseUp 事件回调函数</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>鼠标按键松开时所在节点的 JSON 数据对象</p>
<p class="highlight_red">如果不在节点上,则返回 null</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,将仅仅无法触发 onMouseUp 事件回调函数,对其他操作无任何影响</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止 onMouseUp 事件</h4>
<pre xmlns=""><code>function zTreeBeforeMouseUp(treeId, treeNode) {
return false;
};
var setting = {
callback: {
beforeMouseUp: zTreeBeforeMouseUp
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,37 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeRemove</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点被删除之前的事件回调函数,并且根据返回值确定是否允许删除操作</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>将要删除的节点 JSON 数据对象</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,zTree 将不删除节点,也无法触发 onRemove 事件回调函数</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止全部删除操作</h4>
<pre xmlns=""><code>function zTreeBeforeRemove(treeId, treeNode) {
return false;
}
var setting = {
edit: {
enable: true
},
callback: {
beforeRemove: zTreeBeforeRemove
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,46 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode, newName, isCancel)</span><span class="path">setting.callback.</span>beforeRename</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点编辑名称结束(Input 失去焦点 或 按下 Enter 键)之后,更新节点名称数据之前的事件回调函数,并且根据返回值确定是否允许更改名称的操作</p>
<p class="highlight_red">节点进入编辑名称状态后,按 ESC 键可以放弃当前修改,恢复原名称,取消编辑名称状态</p>
<p class="highlight_red">从 v3.5.13 开始,取消编辑状态也会触发此回调,根据 isCancel 参数判断</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>将要更改名称的节点 JSON 数据对象</p>
<h4 class="topLine"><b>newName</b><span>String</span></h4>
<p>修改后的新名称</p>
<h4 class="topLine"><b>isCancel</b><span>Boolean</span></h4>
<p>是否取消操作 (v3.5.13+)</p>
<p class="highlight_red">isCancel = true 表示取消编辑操作(按下 ESC 或 使用 cancelEditName 方法)</p>
<p class="highlight_red">isCancel = false 表示确认修改操作</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,zTree 将保持名称编辑状态,无法触发 onRename 事件回调函数,并且会导致屏蔽其它事件,直到修改名称使得 beforeRename 返回 true</p>
<p class="highlight_red">如果返回 false,不会让 input 输入框获取焦点,避免由于警告信息而导致反复触发 beforeRename。 请在关闭提示警告信息后,利用 editName 方法让 input 重新获取焦点。</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止修改的名称的长度小于 5</h4>
<pre xmlns=""><code>function zTreeBeforeRename(treeId, treeNode, newName, isCancel) {
return newName.length > 5;
}
var setting = {
edit: {
enable: true
},
callback: {
beforeRename: zTreeBeforeRename
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,35 @@
<div class="apiDetail">
<div>
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeRightClick</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获 zTree 上鼠标右键点击之前的事件回调函数,并且根据返回值确定触发 onRightClick 事件回调函数</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>鼠标右键点击时所在节点的 JSON 数据对象</p>
<p class="highlight_red">如果不在节点上,则返回 null</p>
<h4 class="topLine"><b>返回值</b><span>Boolean</span></h4>
<p>返回值是 true / false</p>
<p class="highlight_red">如果返回 false,将仅仅无法触发 onRightClick 事件回调函数,对其他操作无任何影响</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 禁止 onRightClick 事件</h4>
<pre xmlns=""><code>function zTreeBeforeRightClick(treeId, treeNode) {
return false;
};
var setting = {
callback: {
beforeRightClick: zTreeBeforeRightClick
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,42 @@
<div class="apiDetail">
<div>
<h2><span class="path">setting.callback.</span>onAsyncError</h2>
<h2><span>Function(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown)</span>&nbsp;</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获异步加载出现异常错误的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeAsync 方法,且返回 false,将无法触发 onAsyncSuccess / onAsyncError 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>进行异步加载的父节点 JSON 数据对象</p>
<p class="highlight_red">针对根进行异步加载时,treeNode = null</p>
<h4 class="topLine"><b>XMLHttpRequest</b><span>String</span></h4>
<p>标准 XMLHttpRequest 对象,请参考 JQuery API 文档。</p>
<h4 class="topLine"><b>textStatus</b><span>String</span></h4>
<p>请求状态:successerror,请参考 JQuery API 文档。</p>
<h4 class="topLine"><b>errorThrown</b><span>String</span></h4>
<p>errorThrown 只有当异常发生时才会被传递,请参考 JQuery API 文档。</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 异步加载出现异常后,弹出错误信息</h4>
<pre xmlns=""><code>function zTreeOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {
alert(XMLHttpRequest);
};
var setting = {
callback: {
onAsyncError: zTreeOnAsyncError
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,38 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNode, msg)</span><span class="path">setting.callback.</span>onAsyncSuccess</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获异步加载正常结束的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeAsync 方法,且返回 false,将无法触发 onAsyncSuccess / onAsyncError 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>进行异步加载的父节点 JSON 数据对象</p>
<p class="highlight_red">针对根进行异步加载时,treeNode = null</p>
<h4 class="topLine"><b>msg</b><span>String / Object</span></h4>
<p>异步获取的节点数据字符串,主要便于用户调试使用。</p>
<p class="highlight_red">实际数据类型会受 setting.async.dataType 的设置影响,请参考 JQuery API 文档。</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 异步加载成功后,弹出提示信息</h4>
<pre xmlns=""><code>function zTreeOnAsyncSuccess(event, treeId, treeNode, msg) {
alert(msg);
};
var setting = {
callback: {
onAsyncSuccess: zTreeOnAsyncSuccess
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,34 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onCheck</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.excheck</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获 checkbox / radio 被勾选 或 取消勾选的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeCheck 方法,且返回 false,将无法触发 onCheck 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>被勾选 或 取消勾选的节点 JSON 数据对象</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 每次点击 checkbox 或 radio 后, 弹出该节点的 tId、name 以及当前勾选状态的信息</h4>
<pre xmlns=""><code>function zTreeOnCheck(event, treeId, treeNode) {
alert(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked);
};
var setting = {
callback: {
onCheck: zTreeOnCheck
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,49 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNode, clickFlag)</span><span class="path">setting.callback.</span>onClick</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点被点击的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeClick 方法,且返回 false,将无法触发 onClick 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>被点击的节点 JSON 数据对象</p>
<h4 class="topLine"><b>clickFlag</b><span>Number</span></h4>
<p>节点被点击后的选中操作类型,详细看下表</p>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<thead><tr><td>clickFlag</td><td title="是否允许多点选中">selectedMulti</td><td title="是否按下 Ctrl 或 Cmd 键">autoCancelSelected<br/>&&<br/>event.ctrlKey / metaKey</td><td title="节点当前选择状态">isSelected</td><td>选中操作</td></tr></thead>
<tbody>
<tr><td>1</td><td>true</td><td>false</td><td>false</td><td>普通选中</td></tr>
<tr><td>1</td><td>true</td><td>false</td><td>true</td><td>普通选中</td></tr>
<tr><td>2</td><td>true</td><td>true</td><td>false</td><td>追加选中</td></tr>
<tr><td>0</td><td>true</td><td>true</td><td>true</td><td>取消选中</td></tr>
<tr><td>1</td><td>false</td><td>false</td><td>false</td><td>普通选中</td></tr>
<tr><td>1</td><td>false</td><td>false</td><td>true</td><td>普通选中</td></tr>
<tr><td>1</td><td>false</td><td>true</td><td>false</td><td>普通选中</td></tr>
<tr><td>0</td><td>false</td><td>true</td><td>true</td><td>取消选中</td></tr>
</tbody>
</table>
</div>
<h3>setting & function 举例</h3>
<h4>1. 每次点击节点后, 弹出该节点的 tId、name 的信息</h4>
<pre xmlns=""><code>function zTreeOnClick(event, treeId, treeNode) {
alert(treeNode.tId + ", " + treeNode.name);
};
var setting = {
callback: {
onClick: zTreeOnClick
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,34 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onCollapse</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点被折叠的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeCollapse 方法,且返回 false,将无法触发 onCollapse 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>被折叠的节点 JSON 数据对象</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 每次折叠节点后, 弹出该节点的 tId、name 的信息</h4>
<pre xmlns=""><code>function zTreeOnCollapse(event, treeId, treeNode) {
alert(treeNode.tId + ", " + treeNode.name);
};
var setting = {
callback: {
onCollapse: zTreeOnCollapse
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,35 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onDblClick</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获 zTree 上鼠标双击之后的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeDblClick 方法,且返回 false,将无法触发 onDblClick 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>鼠标双击时所在节点的 JSON 数据对象</p>
<p class="highlight_red">如果不在节点上,则返回 null</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 每次鼠标双击后, 弹出鼠标所在节点的 tId、name 的信息</h4>
<pre xmlns=""><code>function zTreeOnDblClick(event, treeId, treeNode) {
alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
};
var setting = {
callback: {
onDblClick: zTreeOnDblClick
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,34 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNodes)</span><span class="path">setting.callback.</span>onDrag</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点被拖拽的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeDrag 方法,且返回 false,将无法触发 onDragMove 和 onDrag 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>被拖拽的节点 treeNodes 所在 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
<p>要被拖拽的节点 JSON 数据集合</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 每次开始进行拖拽节点后, 弹出被拖拽节点的个数信息</h4>
<pre xmlns=""><code>function zTreeOnDrag(event, treeId, treeNodes) {
alert(treeNodes.length);
};
var setting = {
callback: {
onDrag: zTreeOnDrag
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,34 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNodes)</span><span class="path">setting.callback.</span>onDragMove</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点被拖拽过程中移动的事件回调函数</p>
<p class="highlight_red">主要用于捕获 zTree 节点拖拽到的 DOM,从而操作对应的 DOM。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>被拖拽的节点 treeNodes 所在 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
<p>要被拖拽的节点 JSON 数据集合</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 拖拽节点时,随时输出 当前拖拽到的目标 DOM</h4>
<pre xmlns=""><code>function zTreeOnDragMove(event, treeId, treeNodes) {
console.log(event.target);
};
var setting = {
callback: {
onDragMove: zTreeOnDragMove
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,46 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNodes, targetNode, moveType, isCopy)</span><span class="path">setting.callback.</span>onDrop</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点拖拽操作结束的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeDrop 方法,且返回 false,将无法触发 onDrop 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>目标节点 targetNode 所在 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
<p>被拖拽的节点 JSON 数据集合</p>
<p class="highlight_red">如果拖拽操作为 移动,treeNodes 是当前被拖拽节点的数据集合。</p>
<p class="highlight_red">如果拖拽操作为 复制,treeNodes 是复制后 clone 得到的新节点数据。</p>
<h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
<p>成为 treeNodes 拖拽结束的目标节点 JSON 数据对象。</p>
<p class="highlight_red">如果拖拽成为根节点,则 targetNode = null</p>
<h4 class="topLine"><b>moveType</b><span>String</span></h4>
<p>指定移动到目标节点的相对位置</p>
<p class="highlight_red">"inner":成为子节点,"prev":成为同级前一个节点,"next":成为同级后一个节点</p>
<p class="highlight_red">如果 moveType = null,表明拖拽无效</p>
<h4 class="topLine"><b>isCopy</b><span>Boolean</span></h4>
<p>拖拽节点操作是 复制 或 移动</p>
<p class="highlight_red">true:复制;false:移动</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 每次拖拽操作结束后, 弹出该被拖拽节点的个数以及目标节点的 tId、name 的信息</h4>
<pre xmlns=""><code>function zTreeOnDrop(event, treeId, treeNodes, targetNode, moveType) {
alert(treeNodes.length + "," + (targetNode ? (targetNode.tId + ", " + targetNode.name) : "isRoot" ));
};
var setting = {
callback: {
onDrop: zTreeOnDrop
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,34 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onExpand</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获节点被展开的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeExpand 方法,且返回 false,将无法触发 onExpand 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>被展开的节点 JSON 数据对象</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 每次展开节点后, 弹出该节点的 tId、name 的信息</h4>
<pre xmlns=""><code>function zTreeOnExpand(event, treeId, treeNode) {
alert(treeNode.tId + ", " + treeNode.name);
};
var setting = {
callback: {
onExpand: zTreeOnExpand
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,35 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onMouseDown</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获 zTree 上鼠标按键按下后的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeMouseDown 方法,且返回 false,将无法触发 onMouseDown 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>鼠标按键按下时所在节点的 JSON 数据对象</p>
<p class="highlight_red">如果不在节点上,则返回 null</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 每次鼠标按键按下后, 弹出鼠标所在节点的 tId、name 的信息</h4>
<pre xmlns=""><code>function zTreeOnMouseDown(event, treeId, treeNode) {
alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
};
var setting = {
callback: {
onMouseDown: zTreeOnMouseDown
}
};
......</code></pre>
</div>
</div>
@@ -0,0 +1,35 @@
<div class="apiDetail">
<div>
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onMouseUp</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>用于捕获 zTree 上鼠标按键松开后的事件回调函数</p>
<p class="highlight_red">如果设置了 setting.callback.beforeMouseUp 方法,且返回 false,将无法触发 onMouseUp 事件回调函数。</p>
<p>默认值:null</p>
</div>
</div>
<h3>Function 参数说明</h3>
<div class="desc">
<h4><b>event</b><span>js event 对象</span></h4>
<p>标准的 js event 对象</p>
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
<p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
<p>鼠标按键松开时所在节点的 JSON 数据对象</p>
<p class="highlight_red">如果不在节点上,则返回 null</p>
</div>
<h3>setting & function 举例</h3>
<h4>1. 每次鼠标按键松开后, 弹出鼠标所在节点的 tId、name 的信息</h4>
<pre xmlns=""><code>function zTreeOnMouseUp(event, treeId, treeNode) {
alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
};
var setting = {
callback: {
onMouseUp: zTreeOnMouseUp
}
};
......</code></pre>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More