v2版本正式上线测试版

This commit is contained in:
george
2018-07-13 17:53:34 +08:00
parent 092ecf605b
commit 7bbe5585d8
661 changed files with 40153 additions and 2053 deletions

View File

@@ -0,0 +1,594 @@
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: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: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)", 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;
}
});
}
}

View File

@@ -0,0 +1,219 @@
/* 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;}
.google_plus {position: absolute;right: 10px; top:10px;}
.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}

View File

@@ -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

View File

@@ -0,0 +1,74 @@
/*
* JQuery zTree core v3.5.28
* 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: 2017-01-20
*/
(function(q){var H,I,J,K,L,M,u,r={},v={},w={},N={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:{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",
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}},x=[function(b){var a=b.treeObj,c=f.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated,
[a,c,g])});a.bind(c.CLICK,function(a,c,g,l,h){j.apply(b.callback.onClick,[c,g,l,h])});a.bind(c.EXPAND,function(a,c,g){j.apply(b.callback.onExpand,[a,c,g])});a.bind(c.COLLAPSE,function(a,c,g){j.apply(b.callback.onCollapse,[a,c,g])});a.bind(c.ASYNC_SUCCESS,function(a,c,g,l){j.apply(b.callback.onAsyncSuccess,[a,c,g,l])});a.bind(c.ASYNC_ERROR,function(a,c,g,l,h,f){j.apply(b.callback.onAsyncError,[a,c,g,l,h,f])});a.bind(c.REMOVE,function(a,c,g){j.apply(b.callback.onRemove,[a,c,g])});a.bind(c.SELECTED,
function(a,c,g){j.apply(b.callback.onSelected,[c,g])});a.bind(c.UNSELECTED,function(a,c,g){j.apply(b.callback.onUnSelected,[c,g])})}],y=[function(b){var a=f.event;b.treeObj.unbind(a.NODECREATED).unbind(a.CLICK).unbind(a.EXPAND).unbind(a.COLLAPSE).unbind(a.ASYNC_SUCCESS).unbind(a.ASYNC_ERROR).unbind(a.REMOVE).unbind(a.SELECTED).unbind(a.UNSELECTED)}],z=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],A=[function(b,a,c,d,e,g){if(c){var l=h.getRoot(b),f=b.data.key.children;
c.level=a;c.tId=b.treeId+"_"+ ++l.zId;c.parentTId=d?d.tId:null;c.open=typeof c.open=="string"?j.eqs(c.open,"true"):!!c.open;c[f]&&c[f].length>0?(c.isParent=!0,c.zAsync=!0):(c.isParent=typeof c.isParent=="string"?j.eqs(c.isParent,"true"):!!c.isParent,c.open=c.isParent&&!b.async.enable?c.open:!1,c.zAsync=!c.isParent);c.isFirstNode=e;c.isLastNode=g;c.getParentNode=function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b,
c)};c.getIndex=function(){return h.getNodeIndex(b,c)};c.getPath=function(){return h.getNodePath(b,c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],t=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",e=null,g="",l="",i=null,n=null,k=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+f.id.SWITCH)!==null)d=j.getNodeMainDom(a).id,
g="switchNode";else{if(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}]))d=j.getNodeMainDom(k).id,g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}])))d=j.getNodeMainDom(k).id,g="switchNode";if(l.length>0&&d.length==0&&(k=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+f.id.A}])))d=j.getNodeMainDom(k).id;if(d.length>0)switch(e=h.getNodeCache(c,d),g){case "switchNode":e.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&
j.apply(c.view.dblClickExpand,[c.treeId,e],c.view.dblClickExpand)?i=H:g="":g="";break;case "clickNode":i=I}switch(l){case "mousedown":n=J;break;case "mouseup":n=K;break;case "dblclick":n=L;break;case "contextmenu":n=M}return{stop:!1,node:e,nodeEventType:g,nodeEventCallback:i,treeEventType:l,treeEventCallback:n}}],B=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],
C=[],D=[],E=[],F=[],G=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){D.push(b)},addBeforeA:function(b){C.push(b)},addInnerAfterA:function(b){F.push(b)},addInnerBeforeA:function(b){E.push(b)},addInitBind:function(b){x.push(b)},addInitUnBind:function(b){y.push(b)},addInitCache:function(b){z.push(b)},addInitNode:function(b){A.push(b)},addInitProxy:function(b,a){a?t.splice(0,0,
b):t.push(b)},addInitRoot:function(b){B.push(b)},addNodesData:function(b,a,c,d){var e=b.data.key.children;a[e]?c>=a[e].length&&(c=-1):(a[e]=[],c=-1);if(a[e].length>0&&c===0)a[e][0].isFirstNode=!1,i.setNodeLineIcos(b,a[e][0]);else if(a[e].length>0&&c<0)a[e][a[e].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[e][a[e].length-1]);a.isParent=!0;c<0?a[e]=a[e].concat(d):(b=[c,0].concat(d),a[e].splice.apply(a[e],b))},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,a)||c.curSelectedList.push(a)},
addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){G.push(b)},exSetting:function(b){q.extend(!0,N,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]=a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,e=D.length;d<e;d++)D[d].apply(this,arguments)},getBeforeA:function(b,a,c){for(var d=0,e=C.length;d<e;d++)C[d].apply(this,
arguments)},getInnerAfterA:function(b,a,c){for(var d=0,e=F.length;d<e;d++)F[d].apply(this,arguments)},getInnerBeforeA:function(b,a,c){for(var d=0,e=E.length;d<e;d++)E[d].apply(this,arguments)},getCache:function(b){return w[b.treeId]},getNodeIndex:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),e=0,g=d[c].length-1;e<=g;e++)if(d[c][e]===a)return e;return-1},getNextNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?
a.getParentNode():h.getRoot(b),e=0,g=d[c].length-1;e<=g;e++)if(d[c][e]===a)return e==g?null:d[c][e+1];return null},getNodeByParam:function(b,a,c,d){if(!a||!c)return null;for(var e=b.data.key.children,g=0,l=a.length;g<l;g++){if(a[g][c]==d)return a[g];var f=h.getNodeByParam(b,a[g][e],c,d);if(f)return f}return null},getNodeCache:function(b,a){if(!a)return null;var c=w[b.treeId].nodes[h.getNodeCacheId(a)];return c?c:null},getNodeName:function(b,a){return""+a[b.data.key.name]},getNodePath:function(b,a){if(!a)return null;
var c;(c=a.parentTId?a.getParentNode().getPath():[])&&c.push(a);return c},getNodeTitle:function(b,a){return""+a[b.data.key.title===""?b.data.key.name:b.data.key.title]},getNodes:function(b){return h.getRoot(b)[b.data.key.children]},getNodesByParam:function(b,a,c,d){if(!a||!c)return[];for(var e=b.data.key.children,g=[],l=0,f=a.length;l<f;l++)a[l][c]==d&&g.push(a[l]),g=g.concat(h.getNodesByParam(b,a[l][e],c,d));return g},getNodesByParamFuzzy:function(b,a,c,d){if(!a||!c)return[];for(var e=b.data.key.children,
g=[],d=d.toLowerCase(),l=0,f=a.length;l<f;l++)typeof a[l][c]=="string"&&a[l][c].toLowerCase().indexOf(d)>-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][e],c,d));return g},getNodesByFilter:function(b,a,c,d,e){if(!a)return d?null:[];for(var g=b.data.key.children,f=d?null:[],i=0,n=a.length;i<n;i++){if(j.apply(c,[a[i],e],!1)){if(d)return a[i];f.push(a[i])}var k=h.getNodesByFilter(b,a[i][g],c,d,e);if(d&&k)return k;f=d?k:f.concat(k)}return f},getPreNode:function(b,a){if(!a)return null;for(var c=
b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),e=0,g=d[c].length;e<g;e++)if(d[c][e]===a)return e==0?null:d[c][e-1];return null},getRoot:function(b){return b?v[b.treeId]:null},getRoots:function(){return v},getSetting:function(b){return r[b]},getSettings:function(){return r},getZTreeTools:function(b){return(b=this.getRoot(this.getSetting(b)))?b.treeTools:null},initCache:function(b){for(var a=0,c=z.length;a<c;a++)z[a].apply(this,arguments)},initNode:function(b,a,c,d,e,g){for(var f=
0,h=A.length;f<h;f++)A[f].apply(this,arguments)},initRoot:function(b){for(var a=0,c=B.length;a<c;a++)B[a].apply(this,arguments)},isSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,e=c.curSelectedList.length;d<e;d++)if(a===c.curSelectedList[d])return!0;return!1},removeNodeCache:function(b,a){var c=b.data.key.children;if(a[c])for(var d=0,e=a[c].length;d<e;d++)h.removeNodeCache(b,a[c][d]);h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=null},removeSelectedNode:function(b,a){for(var c=h.getRoot(b),
d=0,e=c.curSelectedList.length;d<e;d++)if(a===c.curSelectedList[d]||!h.getNodeCache(b,c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),b.treeObj.trigger(f.event.UNSELECTED,[b.treeId,a]),d--,e--},setCache:function(b,a){w[b.treeId]=a},setRoot:function(b,a){v[b.treeId]=a},setZTreeTools:function(b,a){for(var c=0,d=G.length;c<d;c++)G[c].apply(this,arguments)},transformToArrayFormat:function(b,a){if(!a)return[];var c=b.data.key.children,d=[];if(j.isArray(a))for(var e=0,g=a.length;e<g;e++)d.push(a[e]),
a[e][c]&&(d=d.concat(h.transformToArrayFormat(b,a[e][c])));else d.push(a),a[c]&&(d=d.concat(h.transformToArrayFormat(b,a[c])));return d},transformTozTreeFormat:function(b,a){var c,d,e=b.data.simpleData.idKey,g=b.data.simpleData.pIdKey,f=b.data.key.children;if(!e||e==""||!a)return[];if(j.isArray(a)){var h=[],i={};for(c=0,d=a.length;c<d;c++)i[a[c][e]]=a[c];for(c=0,d=a.length;c<d;c++)i[a[c][g]]&&a[c][e]!=a[c][g]?(i[a[c][g]][f]||(i[a[c][g]][f]=[]),i[a[c][g]][f].push(a[c])):h.push(a[c]);return h}else return[a]}},
m={bindEvent:function(b){for(var a=0,c=x.length;a<c;a++)x[a].apply(this,arguments)},unbindEvent:function(b){for(var a=0,c=y.length;a<c;a++)y[a].apply(this,arguments)},bindTree:function(b){var a={treeId:b.treeId},c=b.treeObj;b.view.txtSelectedEnable||c.bind("selectstart",u).css({"-moz-user-select":"-moz-none"});c.bind("click",a,m.proxy);c.bind("dblclick",a,m.proxy);c.bind("mouseover",a,m.proxy);c.bind("mouseout",a,m.proxy);c.bind("mousedown",a,m.proxy);c.bind("mouseup",a,m.proxy);c.bind("contextmenu",
a,m.proxy)},unbindTree:function(b){b.treeObj.unbind("selectstart",u).unbind("click",m.proxy).unbind("dblclick",m.proxy).unbind("mouseover",m.proxy).unbind("mouseout",m.proxy).unbind("mousedown",m.proxy).unbind("mouseup",m.proxy).unbind("contextmenu",m.proxy)},doProxy:function(b){for(var a=[],c=0,d=t.length;c<d;c++){var e=t[c].apply(this,arguments);a.push(e);if(e.stop)break}return a},proxy:function(b){var a=h.getSetting(b.data.treeId);if(!j.uCanDo(a,b))return!0;for(var a=m.doProxy(b),c=!0,d=0,e=a.length;d<
e;d++){var g=a[d];g.nodeEventCallback&&(c=g.nodeEventCallback.apply(g,[b,g.node])&&c);g.treeEventCallback&&(c=g.treeEventCallback.apply(g,[b,g.node])&&c)}return c}};H=function(b,a){var c=h.getSetting(b.data.treeId);if(a.open){if(j.apply(c.callback.beforeCollapse,[c.treeId,a],!0)==!1)return!0}else if(j.apply(c.callback.beforeExpand,[c.treeId,a],!0)==!1)return!0;h.getRoot(c).expandTriggerFlag=!0;i.switchNode(c,a);return!0};I=function(b,a){var c=h.getSetting(b.data.treeId),d=c.view.autoCancelSelected&&
(b.ctrlKey||b.metaKey)&&h.isSelectedNode(c,a)?0:c.view.autoCancelSelected&&(b.ctrlKey||b.metaKey)&&c.view.selectedMulti?2:1;if(j.apply(c.callback.beforeClick,[c.treeId,a,d],!0)==!1)return!0;d===0?i.cancelPreSelectedNode(c,a):i.selectNode(c,a,d===2);c.treeObj.trigger(f.event.CLICK,[b,c.treeId,a,d]);return!0};J=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseDown,[c.treeId,a],!0)&&j.apply(c.callback.onMouseDown,[b,c.treeId,a]);return!0};K=function(b,a){var c=h.getSetting(b.data.treeId);
j.apply(c.callback.beforeMouseUp,[c.treeId,a],!0)&&j.apply(c.callback.onMouseUp,[b,c.treeId,a]);return!0};L=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeDblClick,[c.treeId,a],!0)&&j.apply(c.callback.onDblClick,[b,c.treeId,a]);return!0};M=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeRightClick,[c.treeId,a],!0)&&j.apply(c.callback.onRightClick,[b,c.treeId,a]);return typeof c.callback.onRightClick!="function"};u=function(b){b=b.originalEvent.srcElement.nodeName.toLowerCase();
return b==="input"||b==="textarea"};var j={apply:function(b,a,c){return typeof b=="function"?b.apply(O,a?a:[]):c},canAsync:function(b,a){var c=b.data.key.children;return b.async.enable&&a&&a.isParent&&!(a.zAsync||a[c]&&a[c].length>0)},clone:function(b){if(b===null)return null;var a=j.isArray(b)?[]:{},c;for(c in b)a[c]=b[c]instanceof Date?new Date(b[c].getTime()):typeof b[c]==="object"?j.clone(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)===
"[object Array]"},isElement:function(b){return typeof HTMLElement==="object"?b instanceof HTMLElement:b&&typeof b==="object"&&b!==null&&b.nodeType===1&&typeof b.nodeName==="string"},$:function(b,a,c){a&&typeof a!="string"&&(c=a,a="");return typeof b=="string"?q(b,c?c.treeObj.get(0).ownerDocument:null):q("#"+b.tId+a,c?c.treeObj:null)},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,e=c.length;a.tagName&&d<e;d++)if(j.eqs(a.tagName,c[d].tagName)&&a.getAttribute(c[d].attrName)!==
null)return a;a=a.parentNode}return null},getNodeMainDom:function(b){return q(b).parent("li").get(0)||q(b).parentsUntil("li").parent().get(0)},isChildOrSelf:function(b,a){return q(b).closest("#"+a).length>0},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d,e){if(!b.data.keep.leaf||!a||a.isParent)if(j.isArray(d)||(d=[d]),b.data.simpleData.enable&&(d=h.transformTozTreeFormat(b,d)),a){var g=k(a,f.id.SWITCH,b),l=k(a,f.id.ICON,b),p=k(a,f.id.UL,b);if(!a.open)i.replaceSwitchClass(a,g,f.folder.CLOSE),
i.replaceIcoClass(a,l,f.folder.CLOSE),a.open=!1,p.css({display:"none"});h.addNodesData(b,a,c,d);i.createNodes(b,a.level+1,d,a,c);e||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c,d),i.createNodes(b,0,d,null,c)},appendNodes:function(b,a,c,d,e,g,f){if(!c)return[];var j=[],n=b.data.key.children,k=(d?d:h.getRoot(b))[n],m,Q;if(!k||e>=k.length-c.length)e=-1;for(var s=0,R=c.length;s<R;s++){var o=c[s];g&&(m=(e===0||k.length==c.length)&&s==0,Q=e<0&&s==c.length-1,h.initNode(b,a,o,d,
m,Q,f),h.addNodeCache(b,o));m=[];o[n]&&o[n].length>0&&(m=i.appendNodes(b,a+1,o[n],o,-1,g,f&&o.open));f&&(i.makeDOMNodeMainBefore(j,b,o),i.makeDOMNodeLine(j,b,o),h.getBeforeA(b,o,j),i.makeDOMNodeNameBefore(j,b,o),h.getInnerBeforeA(b,o,j),i.makeDOMNodeIcon(j,b,o),h.getInnerAfterA(b,o,j),i.makeDOMNodeNameAfter(j,b,o),h.getAfterA(b,o,j),o.isParent&&o.open&&i.makeUlHtml(b,o,j,m.join("")),i.makeDOMNodeMainAfter(j,b,o),h.addCreatedNode(b,o))}return j},appendParentULDom:function(b,a){var c=[],d=k(a,b);!d.get(0)&&
a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),d=k(a,b));var e=k(a,f.id.UL,b);e.get(0)&&e.remove();e=i.appendNodes(b,a.level+1,a[b.data.key.children],a,-1,!1,!0);i.makeUlHtml(b,a,c,e.join(""));d.append(c.join(""))},asyncNode:function(b,a,c,d){var e,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync,[b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k(a,f.id.ICON,b).attr({style:"","class":f.className.BUTTON+" "+f.className.ICO_LOADING});
var l={};for(e=0,g=b.async.autoParam.length;a&&e<g;e++){var p=b.async.autoParam[e].split("="),n=p;p.length>1&&(n=p[1],p=p[0]);l[n]=a[p]}if(j.isArray(b.async.otherParam))for(e=0,g=b.async.otherParam.length;e<g;e+=2)l[b.async.otherParam[e]]=b.async.otherParam[e+1];else for(var m in b.async.otherParam)l[m]=b.async.otherParam[m];var P=h.getRoot(b)._ver;q.ajax({contentType:b.async.contentType,cache:!1,type:b.async.type,url:j.apply(b.async.url,[b.treeId,a],b.async.url),data:b.async.contentType.indexOf("application/json")>
-1?JSON.stringify(l):l,dataType:b.async.dataType,success:function(e){if(P==h.getRoot(b)._ver){var g=[];try{g=!e||e.length==0?[]:typeof e=="string"?eval("("+e+")"):e}catch(l){g=e}if(a)a.isAjaxing=null,a.zAsync=!0;i.setNodeLineIcos(b,a);g&&g!==""?(g=j.apply(b.async.dataFilter,[b.treeId,a,g],g),i.addNodes(b,a,-1,g?j.clone(g):[],!!c)):i.addNodes(b,a,-1,[],!!c);b.treeObj.trigger(f.event.ASYNC_SUCCESS,[b.treeId,a,e]);j.apply(d)}},error:function(c,d,e){if(P==h.getRoot(b)._ver){if(a)a.isAjaxing=null;i.setNodeLineIcos(b,
a);b.treeObj.trigger(f.event.ASYNC_ERROR,[b.treeId,a,c,d,e])}}});return!0},cancelPreSelectedNode:function(b,a,c){var d=h.getRoot(b).curSelectedList,e,g;for(e=d.length-1;e>=0;e--)if(g=d[e],a===g||!a&&(!c||c!==g))if(k(g,f.id.A,b).removeClass(f.node.CURSELECTED),a){h.removeSelectedNode(b,a);break}else d.splice(e,1),b.treeObj.trigger(f.event.UNSELECTED,[b.treeId,g])},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();
j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(f.event.NODECREATED,[b.treeId,c])}},createNodes:function(b,a,c,d,e){if(c&&c.length!=0){var g=h.getRoot(b),l=b.data.key.children,l=!d||d.open||!!k(d[l][0],b).get(0);g.createdNodes=[];var a=i.appendNodes(b,a,c,d,e,!0,l),j,n;d?(d=k(d,f.id.UL,b),d.get(0)&&(j=d)):j=b.treeObj;j&&(e>=0&&(n=j.children()[e]),e>=0&&n?q(n).before(a.join("")):j.append(a.join("")));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),
h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty(),delete r[b.treeId])},expandCollapseNode:function(b,a,c,d,e){var g=h.getRoot(b),l=b.data.key.children,p;if(a){if(g.expandTriggerFlag)p=e,e=function(){p&&p();a.open?b.treeObj.trigger(f.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(f.event.COLLAPSE,[b.treeId,a])},g.expandTriggerFlag=!1;if(!a.open&&a.isParent&&(!k(a,f.id.UL,b).get(0)||a[l]&&a[l].length>0&&!k(a[l][0],b).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(e,
[]);else{var c=k(a,f.id.UL,b),g=k(a,f.id.SWITCH,b),n=k(a,f.id.ICON,b);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&n.attr("style",i.makeNodeIcoStyle(b,a)),a.open?(i.replaceSwitchClass(a,g,f.folder.OPEN),i.replaceIcoClass(a,n,f.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(e,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,e):(c.show(),j.apply(e,[]))):(i.replaceSwitchClass(a,g,f.folder.CLOSE),i.replaceIcoClass(a,n,f.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&
a[l].length>0)?(c.hide(),j.apply(e,[])):c.slideUp(b.view.expandSpeed,e))):j.apply(e,[])}}else j.apply(e,[])},expandCollapseParentNode:function(b,a,c,d,e){a&&(a.parentTId?(i.expandCollapseNode(b,a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,e)):i.expandCollapseNode(b,a,c,d,e))},expandCollapseSonNode:function(b,a,c,d,e){var g=h.getRoot(b),f=b.data.key.children,g=a?a[f]:g[f],f=a?!1:d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k<
m;k++)g[k]&&i.expandCollapseSonNode(b,g[k],c,f);h.getRoot(b).expandTriggerFlag=j;i.expandCollapseNode(b,a,c,d,e)},isSelectedNode:function(b,a){if(!a)return!1;var c=h.getRoot(b).curSelectedList,d;for(d=c.length-1;d>=0;d--)if(a===c[d])return!0;return!1},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,c),d=a.view.nameIsHTML?d:d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");b.push("<span id='",c.tId,f.id.ICON,"' title='' treeNode",f.id.ICON," class='",i.makeNodeIcoClass(a,c),"' style='",
i.makeNodeIcoStyle(a,c),"'></span><span id='",c.tId,f.id.SPAN,"' class='",f.className.NAME,"'>",d,"</span>")},makeDOMNodeLine:function(b,a,c){b.push("<span id='",c.tId,f.id.SWITCH,"' title='' class='",i.makeNodeLineClass(a,c),"' treeNode",f.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(b){b.push("</li>")},makeDOMNodeMainBefore:function(b,a,c){b.push("<li id='",c.tId,"' class='",f.className.LEVEL,c.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(b){b.push("</a>")},
makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),e=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("<a id='",c.tId,f.id.A,"' class='",f.className.LEVEL,c.level,"' treeNode",f.id.A,' onclick="',c.click||"",'" ',e!=null&&e.length>0?"href='"+e+"'":""," target='",i.makeNodeTarget(c),"' style='",l.join(""),"'");j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,
"&gt;"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?f.folder.OPEN:f.folder.CLOSE):c.push(f.folder.DOCU));return f.className.BUTTON+" "+c.join("_")},makeNodeIcoStyle:function(b,a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&&a.iconClose?a.open?a.iconOpen:a.iconClose:
a[b.data.key.icon];d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(f.line.ROOT):a.level==0&&a.isFirstNode?c.push(f.line.ROOTS):a.isLastNode?c.push(f.line.BOTTOM):c.push(f.line.CENTER):c.push(f.line.NOLINE);a.isParent?c.push(a.open?f.folder.OPEN:f.folder.CLOSE):c.push(f.folder.DOCU);
return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return f.className.BUTTON+" "+f.className.LEVEL+b.level+" "+f.className.SWITCH+" "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("<ul id='",a.tId,f.id.UL,"' class='",f.className.LEVEL,a.level," ",i.makeUlLineClass(b,a),"' style='display:",a.open?"block":"none","'>");c.push(d);c.push("</ul>")},makeUlLineClass:function(b,
a){return b.view.showLine&&!a.isLastNode?f.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var e=0,g=d.length;e<g;e++)h.removeNodeCache(b,d[e]);h.removeSelectedNode(b);delete a[c];b.data.keep.parent?k(a,f.id.UL,b).empty():(a.isParent=!1,a.open=!1,c=k(a,f.id.SWITCH,b),d=k(a,f.id.ICON,b),i.replaceSwitchClass(a,c,f.folder.DOCU),i.replaceIcoClass(a,d,f.folder.DOCU),k(a,f.id.UL,b).remove())}}},scrollIntoView:function(b){if(b){if(!Element.prototype.scrollIntoViewIfNeeded)Element.prototype.scrollIntoViewIfNeeded=
function(a){function b(a,d,e,f){return{left:a,top:d,width:e,height:f,right:a+e,bottom:d+f,translate:function(g,h){return b(g+a,h+d,e,f)},relativeFromTo:function(h,i){var j=a,l=d,h=h.offsetParent,i=i.offsetParent;if(h===i)return g;for(;h;h=h.offsetParent)j+=h.offsetLeft+h.clientLeft,l+=h.offsetTop+h.clientTop;for(;i;i=i.offsetParent)j-=i.offsetLeft+i.clientLeft,l-=i.offsetTop+i.clientTop;return b(j,l,e,f)}}}for(var d,e=this,g=b(this.offsetLeft,this.offsetTop,this.offsetWidth,this.offsetHeight);j.isElement(d=
e.parentNode);){var f=d.offsetLeft+d.clientLeft,h=d.offsetTop+d.clientTop,g=g.relativeFromTo(e,d).translate(-f,-h);d.scrollLeft=!1===a||g.left<=d.scrollLeft+d.clientWidth&&d.scrollLeft<=g.right-d.clientWidth+d.clientWidth?Math.min(g.left,Math.max(g.right-d.clientWidth,d.scrollLeft)):(g.right-d.clientWidth+g.left)/2;d.scrollTop=!1===a||g.top<=d.scrollTop+d.clientHeight&&d.scrollTop<=g.bottom-d.clientHeight+d.clientHeight?Math.min(g.top,Math.max(g.bottom-d.clientHeight,d.scrollTop)):(g.bottom-d.clientHeight+
g.top)/2;g=g.translate(f-d.scrollLeft,h-d.scrollTop);e=d}};b.scrollIntoViewIfNeeded()}},setFirstNode:function(b,a){var c=b.data.key.children;if(a[c].length>0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,e=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,
a.tId)){k(a,b).remove();h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,j=e[d].length;g<j;g++)if(e[d][g].tId==a.tId){e[d].splice(g,1);break}i.setFirstNode(b,e);i.setLastNode(b,e);var p,g=e[d].length;if(!b.data.keep.parent&&g==0)e.isParent=!1,e.open=!1,g=k(e,f.id.UL,b),j=k(e,f.id.SWITCH,b),p=k(e,f.id.ICON,b),i.replaceSwitchClass(e,j,f.folder.DOCU),i.replaceIcoClass(e,p,f.folder.DOCU),g.css("display","none");else if(b.view.showLine&&g>0){var n=e[d][g-1],g=k(n,f.id.UL,b),j=k(n,f.id.SWITCH,
b);p=k(n,f.id.ICON,b);e==c?e[d].length==1?i.replaceSwitchClass(n,j,f.line.ROOT):(c=k(e[d][0],f.id.SWITCH,b),i.replaceSwitchClass(e[d][0],c,f.line.ROOTS),i.replaceSwitchClass(n,j,f.line.BOTTOM)):i.replaceSwitchClass(n,j,f.line.BOTTOM);g.removeClass(f.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case f.folder.OPEN:case f.folder.CLOSE:case f.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,
a,c){if(a){var d=a.attr("class");if(d!=void 0){d=d.split("_");switch(c){case f.line.ROOT:case f.line.ROOTS:case f.line.CENTER:case f.line.BOTTOM:case f.line.NOLINE:d[0]=i.makeNodeLineClassEx(b)+c;break;case f.folder.OPEN:case f.folder.CLOSE:case f.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==f.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b,null,a);k(a,f.id.A,b).addClass(f.node.CURSELECTED);h.addSelectedNode(b,a);
b.treeObj.trigger(f.event.SELECTED,[b.treeId,a])},setNodeFontCss:function(b,a){var c=k(a,f.id.A,b),d=i.makeNodeFontCss(b,a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c=k(a,f.id.SWITCH,b),d=k(a,f.id.UL,b),e=k(a,f.id.ICON,b),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(f.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");e.removeAttr("style");e.attr("style",i.makeNodeIcoStyle(b,a));e.attr("class",i.makeNodeIcoClass(b,
a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=k(a,f.id.SPAN,b);d.empty();b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle,[b.treeId,a],b.view.showTitle)&&k(a,f.id.A,b).attr("title",!c?"":c)},setNodeTarget:function(b,a){k(a,f.id.A,b).attr("target",i.makeNodeTarget(a))},setNodeUrl:function(b,a){var c=k(a,f.id.A,b),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,
a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,a)||i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};q.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:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(N);q.extend(!0,d,a);d.treeId=
b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)?c:[c]):[];b[a]=d.data.simpleData.enable?h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c,f){function h(){i.addNodes(d,a,b,m,f==!0)}a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var k=
parseInt(b,10);isNaN(k)?(f=!!c,c=b,b=-1):b=k;if(!c)return null;var m=j.clone(j.isArray(c)?c:[c]);j.canAsync(d,a)?i.asyncNode(d,a,f,h):h();return m},cancelSelectedNode:function(a){i.cancelPreSelectedNode(d,a)},destroy:function(){i.destroy(d)},expandAll:function(a){a=!!a;i.expandCollapseSonNode(d,null,a,!0);return a},expandNode:function(a,b,c,f,n){function m(){var b=k(a,d).get(0);b&&f!==!1&&i.scrollIntoView(b)}if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((n=!!n)&&b&&j.apply(d.callback.beforeExpand,
[d.treeId,a],!0)==!1)return null;else if(n&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(d,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=n;!j.canAsync(d,a)&&c?i.expandCollapseSonNode(d,a,b,!0,m):(a.open=!b,i.switchNode(this.setting,a),m());return b},getNodes:function(){return h.getNodes(d)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(d,c?c[d.data.key.children]:h.getNodes(d),
a,b)},getNodeByTId:function(a){return h.getNodeCache(d,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?null:h.getNodesByParamFuzzy(d,c?c[d.data.key.children]:h.getNodes(d),a,b)},getNodesByFilter:function(a,b,c,f){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(d,c?c[d.data.key.children]:h.getNodes(d),a,b,f)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,
c=a.parentTId?a.getParentNode():h.getRoot(d),f=0,i=c[b].length;f<i;f++)if(c[b][f]==a)return f;return-1},getSelectedNodes:function(){for(var a=[],b=h.getRoot(d).curSelectedList,c=0,f=b.length;c<f;c++)a.push(b[c]);return a},isSelectedNode:function(a){return h.isSelectedNode(d,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var j=!a;j&&(a=h.getRoot(d));if(b=="refresh"){for(var b=this.setting.data.key.children,n=0,m=a[b]?a[b].length:0;n<m;n++)h.removeNodeCache(d,a[b][n]);h.removeSelectedNode(d);
a[b]=[];j?this.setting.treeObj.empty():k(a,f.id.UL,d).empty()}i.asyncNode(this.setting,j?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=h.getRoot(d),b=a[d.data.key.children];h.initRoot(d);a[d.data.key.children]=b;h.initCache(d);i.createNodes(d,0,a[d.data.key.children],null,-1)},removeChildNodes:function(a){if(!a)return null;var b=a[d.data.key.children];i.removeChildNodes(d,a);return b?b:null},removeNode:function(a,b){a&&(b=!!b,b&&j.apply(d.callback.beforeRemove,[d.treeId,a],!0)==
!1||(i.removeNode(d,a),b&&this.setting.treeObj.trigger(f.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b,c){function f(){if(!c){var b=k(a,d).get(0);i.scrollIntoView(b)}}if(a&&j.uCanDo(d)){b=d.view.selectedMulti&&b;if(a.parentTId)i.expandCollapseParentNode(d,a.getParentNode(),!0,!1,f);else if(!c)try{k(a,d).focus().blur()}catch(h){}i.selectNode(d,a,b)}},transformTozTreeNodes:function(a){return h.transformTozTreeFormat(d,a)},transformToArray:function(a){return h.transformToArrayFormat(d,a)},updateNode:function(a){a&&
k(a,d).get(0)&&j.uCanDo(d)&&(i.setNodeName(d,a),i.setNodeTarget(d,a),i.setNodeUrl(d,a),i.setNodeLineIcos(d,a),i.setNodeFontCss(d,a))}};b.treeTools=c;h.setZTreeTools(d,c);b[a]&&b[a].length>0?i.createNodes(d,0,b[a],null,-1):d.async.enable&&d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var O=q.fn.zTree,k=j.$,f=O.consts})(jQuery);

View File

@@ -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}