v2版本正式上线测试版
This commit is contained in:
15
static/zTree3/api/en/fn.zTree._z.html
Normal file
15
static/zTree3/api/en/fn.zTree._z.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>JSON</span><span class="path">$.fn.zTree.</span>_z</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>All of the internal methods in zTree v3.x are available through '$. fn.zTree._z',
|
||||
use this if you want to develop your own zTree plug-ins.</p>
|
||||
<p class="highlight_red">Unless you are writing a plugin,
|
||||
you should not use this object.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
29
static/zTree3/api/en/fn.zTree.destroy.html
Normal file
29
static/zTree3/api/en/fn.zTree.destroy.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId)</span><span class="path">$.fn.zTree.</span>destroy</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>From zTree v3.4, zTree provides a method for destruction.</p>
|
||||
<p>1. This method can destroy a zTree by treeId, or destroy all zTree instances.</p>
|
||||
<p class="highlight_red">2. If you want to destroy a zTree, you can use the 'zTreeObj.destroy()' method.</p>
|
||||
<p class="highlight_red">3. If you want to re-use the tree which has been destroyed,
|
||||
you must first re-initialise it with the 'init()' method.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier</p>
|
||||
<p class="highlight_red">If this parameter is omitted, all zTree instances will be destroyed.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>none</span></h4>
|
||||
<p>no return value</p>
|
||||
</div>
|
||||
<h3>Examples of function</h3>
|
||||
<h4>1. Destroy the zTree with id === 'treeDemo'</h4>
|
||||
<pre xmlns=""><code>$.fn.zTree.destroy("treeDemo");</code></pre>
|
||||
<h4>2. Destroy all zTree instances</h4>
|
||||
<pre xmlns=""><code>$.fn.zTree.destroy();</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
27
static/zTree3/api/en/fn.zTree.getZTreeObj.html
Normal file
27
static/zTree3/api/en/fn.zTree.getZTreeObj.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId)</span><span class="path">$.fn.zTree.</span>getZTreeObj</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>zTree v3.x provides this method to get zTree object from the tree's Id.</p>
|
||||
<p class="highlight_red">Please initialize zTree first, then you can use this method.</p>
|
||||
<p>Users don't need to use a global variable to reference the zTree object,
|
||||
as all of the callback methods will pass 'treeId' parameters,
|
||||
and you can always call this method to get the zTree object.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier</p>
|
||||
<h4 class="topLine"><b>Return </b><span>JSON</span></h4>
|
||||
<p>zTree object</p>
|
||||
<p>This is a reference to the zTree object.</p>
|
||||
</div>
|
||||
<h3>Examples of function</h3>
|
||||
<h4>1. Get the zTree object with id='tree'</h4>
|
||||
<pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
81
static/zTree3/api/en/fn.zTree.init.html
Normal file
81
static/zTree3/api/en/fn.zTree.init.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(obj, zSetting, zNodes)</span><span class="path">$.fn.zTree.</span>init</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>This method is used to create a zTree.</p>
|
||||
<p>1. The web page must use the W3C DTD. For example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p>
|
||||
<p>2. Needs jquery-1.4.2.js or better.</p>
|
||||
<p>3. Needs jquery-ztree.core-3.0.js or better.
|
||||
If you are using edit mode or checkbox / radio mode,
|
||||
make sure you load jquery-ztree.exedit-3.0.js and jquery-ztree.excheck-3.0.js.</p>
|
||||
<p>4. Needs zTreeStyle.css and image files</p>
|
||||
<p>5. If you plan to use custom icons, please refer to the Demo,
|
||||
or see the help on iconSkin.</p>
|
||||
<p>6. Note: You need to set zTree container's class name to "ztree".
|
||||
If you need to change it, don't forget to modify the css file.
|
||||
If you need other special styles, you can modify the css file.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>object</b><span>jQuery Object</span></h4>
|
||||
<p>DOM Container for zTree</p>
|
||||
<h4 class="topLine"><b>zSetting</b><span>JSON</span></h4>
|
||||
<p>zTree's configuration data, please refer to "setting details" in the API Document.</p>
|
||||
<h4 class="topLine"><b>zNodes</b><span>Array(JSON) / JSON</span></h4>
|
||||
<p>zTree's node data, please refer to "treeNode data details" in the API Document.</p>
|
||||
<p class="highlight_red">1. zTree v3.x support to add single node, that is, if only to add one node,
|
||||
you can use JSON without using Array.</p>
|
||||
<p class="highlight_red">2. If you are planning on using asynchronous loading of root nodes, set it to null or [ ]</p>
|
||||
<p class="highlight_red">3. If you are using simple data mode, please refer to "setting.data.simpleData" in the API Document.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>JSON</span></h4>
|
||||
<p>zTree object</p>
|
||||
<p>This object can provide the methods of operate the zTree</p>
|
||||
<p class="highlight_red">You can use $.fn.zTree.getZTreeObj method at any time to obtain.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. create a simple tree</h4>
|
||||
<pre xmlns=""><code><!DOCTYPE html>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE> ZTREE DEMO </TITLE>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="zTreeStyle/zTreeStyle.css" type="text/css">
|
||||
<script type="text/javascript" src="jquery-1.4.2.js"></script>
|
||||
<script type="text/javascript" src="jquery.ztree.core.js"></script>
|
||||
<!--
|
||||
<script type="text/javascript" src="jquery.ztree.excheck.js"></script>
|
||||
<script type="text/javascript" src="jquery.ztree.exedit.js"></script>
|
||||
-->
|
||||
<SCRIPT type="text/javascript" >
|
||||
var zTreeObj,
|
||||
setting = {
|
||||
view: {
|
||||
selectedMulti: false
|
||||
}
|
||||
},
|
||||
zTreeNodes = [
|
||||
{"name":"Site Map", open:true, children: [
|
||||
{ "name":"google", "url":"http://www.google.com", "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);
|
||||
|
||||
});
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
<ul id="tree" class="ztree" style="width:230px; overflow:auto;"></ul>
|
||||
</BODY>
|
||||
</HTML></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
42
static/zTree3/api/en/setting.async.autoParam.html
Normal file
42
static/zTree3/api/en/setting.async.autoParam.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Array(String)</span><span class="path">setting.async.</span>autoParam</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>During asynchronous loading, a request is sent to the server, which contains the identify of the parent node,
|
||||
so it can retrieve the children.
|
||||
This attribute is an array of strings, which is the identity parameter (or parameters).
|
||||
It applies when <span class="highlight_red">[setting.async.enable = true]</span></p>
|
||||
<p>Default:[ ]</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Array(String) Format</h3>
|
||||
<div class="desc">
|
||||
<p>1. Put the attribute name(s) of node to the array. For example: ["id", "name"]</p>
|
||||
<p>2. You can rename the parameter name as sent to the server. For example: server only accepts "zId" -- ["id=zId"]</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. set auto commit 'id' attribute</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
async: {
|
||||
enable: true,
|
||||
url: "http://host/getNode.php",
|
||||
autoParam: ["id"]
|
||||
}
|
||||
};
|
||||
If we have a parent node: {id:1, name:"test"}, When we are asynchronously loading this parent node's children, it will be submitted to the server with parameters: id=1
|
||||
......</code></pre>
|
||||
<h4>2. set auto commit 'id' attribute, but the parameter name expected by the server is 'zId'</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
async: {
|
||||
enable: true,
|
||||
url: "http://host/getNode.php",
|
||||
autoParam: ["id=zId"]
|
||||
}
|
||||
};
|
||||
If we have a parent node: {id:1, name:"test"}, When we are asynchronously loading this parent node's children, it will be submitted to the server with parameters: zId=1
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
30
static/zTree3/api/en/setting.async.contentType.html
Normal file
30
static/zTree3/api/en/setting.async.contentType.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.async.</span>contentType</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When Ajax sends data to the server, it uses this content-type.
|
||||
It is used when <span class="highlight_red">[setting.async.enable = true]</span></p>
|
||||
<p>Default:"application/x-www-form-urlencoded"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>String Format</h3>
|
||||
<div class="desc">
|
||||
<p> contentType = "application/x-www-form-urlencoded", means: the sending data format is "form" format.</p>
|
||||
<p> contentType = "application/json", means: the sending data format is "json" format. (for .Net)</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. set the sending data format to "json" format.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
async: {
|
||||
enable: true,
|
||||
contentType: "application/json",
|
||||
url: "http://host/getNode.php",
|
||||
autoParam: ["id", "name"]
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
45
static/zTree3/api/en/setting.async.dataFilter.html
Normal file
45
static/zTree3/api/en/setting.async.dataFilter.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, parentNode, responseData)</span><span class="path">setting.async.</span>dataFilter</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback function to pre-process Ajax return data. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b></p>
|
||||
<h4 class="topLine"><b>parentNode</b><span>JSON</span></h4>
|
||||
<p>Parent node's JSON data object</p>
|
||||
<p class="highlight_red">When asynchronously loading the root, the parentNode = null</p>
|
||||
<h4 class="topLine"><b>responseData</b><span>Array(JSON) / JSON / String</span></h4>
|
||||
<p>Array (JSON) / JSON / String data objects</p>
|
||||
<p class="highlight_red">From v3.4, support XML strings.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Array(JSON) / JSON</span></h4>
|
||||
<p>The return value should be the JSON data structure which is supported by the zTree.</p>
|
||||
<p class="highlight_red">v3.x supports to load single node JSON data object.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Modify the node name attributes returned by an Ajax request.</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>
|
||||
29
static/zTree3/api/en/setting.async.dataType.html
Normal file
29
static/zTree3/api/en/setting.async.dataType.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.async.</span>dataType</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The data type of Ajax requests. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
|
||||
<p>Default:"text"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>String Format</h3>
|
||||
<div class="desc">
|
||||
<p> dataType = "text", There is probably no need to change this.</p>
|
||||
<p class="highlight_red">The 'dataType' in zTree and jQuery's ajax requests is same.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set the dataType which ajax retrieves to "text".</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
async: {
|
||||
enable: true,
|
||||
dataType: "text",
|
||||
url: "http://host/getNode.php",
|
||||
autoParam: ["id", "name"]
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
30
static/zTree3/api/en/setting.async.enable.html
Normal file
30
static/zTree3/api/en/setting.async.enable.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.async.</span>enable</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set zTree asynchronous loading mode on/off.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true - turn on asynchronous loading mode</p>
|
||||
<p> false - turn off asynchronous loading mode</p>
|
||||
<p class="highlight_red">If set it is true, you must set other attributes in setting.async</p>
|
||||
<p class="highlight_red">If you don't pass the 'treeNodes' parameter when you initialize zTree, the root nodes will be retrieved using ajax.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Turn on asynchronous loading mode</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
async: {
|
||||
enable: true,
|
||||
url: "http://host/getNode.php",
|
||||
autoParam: ["id", "name"]
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
40
static/zTree3/api/en/setting.async.otherParam.html
Normal file
40
static/zTree3/api/en/setting.async.otherParam.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Array(String) / JSON</span><span class="path">setting.async.</span>otherParam</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The query parameters of the Ajax request. (key - value) It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
|
||||
<p>Default: [ ]</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Array(String) Format</h3>
|
||||
<div class="desc">
|
||||
<p>Can be an empty array. e.g. [ ]. The array should contain key value pairs, e.g. [key, value]. (Either or [key] or [key, value, key] is wrong!!)</p>
|
||||
</div>
|
||||
<h3>JSON Format</h3>
|
||||
<div class="desc">
|
||||
<p>Use JSON hash data to set the key-value pairs. e.g. { key1:value1, key2:value2 }</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Using Array(String) Format</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
async: {
|
||||
enable: true,
|
||||
url: "http://host/getNode.php",
|
||||
<span style="color:red">otherParam: ["id", "1", "name", "test"]</span>
|
||||
}
|
||||
};
|
||||
when zTree sends the ajax request, the query string will be like this: id=1&name=test</code></pre>
|
||||
<h4>2. Using JSON data Format</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
async: {
|
||||
enable: true,
|
||||
url: "http://host/getNode.php",
|
||||
<span style="color:red">otherParam: { "id":"1", "name":"test"}</span>
|
||||
}
|
||||
};
|
||||
when zTree sends the ajax request, the query string will be like this: id=1&name=test</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
30
static/zTree3/api/en/setting.async.type.html
Normal file
30
static/zTree3/api/en/setting.async.type.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.async.</span>type</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Http request tyoe in ajax. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
|
||||
<p>Default: "post"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>String Format</h3>
|
||||
<div class="desc">
|
||||
<p> "post" - http request mode</p>
|
||||
<p> "get" - http request mode</p>
|
||||
<p class="highlight_red">Both zTree and jQuery's this 'type' for ajax requests.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set http request mode is 'get'</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
async: {
|
||||
enable: true,
|
||||
type: "get",
|
||||
url: "http://host/getNode.php",
|
||||
autoParam: ["id", "name"]
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
50
static/zTree3/api/en/setting.async.url.html
Normal file
50
static/zTree3/api/en/setting.async.url.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.async.</span>url</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The URL to which the ajax request is sent. It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>
|
||||
<p>Default: ""</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>String Format</h3>
|
||||
<div class="desc">
|
||||
<p>A url string(e.g. "http://www.domain.com/cgi-bin/my-script.cgi"). Note: please check that the url can be loaded with a browser</p>
|
||||
<p class="highlight_red">Url can also take parameters, please note that they need to be urlencoded.</p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>Parent node's JSON data object</p>
|
||||
<p class="highlight_red">When asynchronously loading the root, the treeNode = null</p>
|
||||
<h4 class="topLine"><b>Return </b><span>String</span></h4>
|
||||
<p>Return value is same as 'String Format'</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. set ajax url is "nodes.php"</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
async: {
|
||||
enable: true,
|
||||
url: "nodes.php",
|
||||
autoParam: ["id", "name"]
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. set ajax url is "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>
|
||||
36
static/zTree3/api/en/setting.callback.beforeAsync.html
Normal file
36
static/zTree3/api/en/setting.callback.beforeAsync.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeAsync</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>This callback is made before zTree makes an ajax request, giving you an opportunity to decide if it should proceed or not.
|
||||
Return false to prevent zTree from sending the ajax request.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the parent node</p>
|
||||
<p class="highlight_red">When asynchronously loading the root, treeNode = null</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If the function returns false, zTree will not send the ajax request, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. If the parent node's attribute 'id' is 1, don't send the ajax request.</h4>
|
||||
<pre xmlns=""><code>function myBeforeCallBack(treeId, treeNode) {
|
||||
return (treeNode.id !== 1);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
beforeAsync: myBeforeCallBack
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
34
static/zTree3/api/en/setting.callback.beforeCheck.html
Normal file
34
static/zTree3/api/en/setting.callback.beforeCheck.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeCheck</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback before checking or unchecking a node, A false return value from the callback will prevent any change in the checked state.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which is checked or unchecked</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, zTree will not change the checkbox state, and will not trigger the 'onCheck' callback.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. This example returns false, preventing all checkboxes in the tree from toggling.</h4>
|
||||
<pre xmlns=""><code>function myBeforeCheckCallBack(treeId, treeNode) {
|
||||
return false;
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
beforeCheck: myBeforeCheckCallBack
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
49
static/zTree3/api/en/setting.callback.beforeClick.html
Normal file
49
static/zTree3/api/en/setting.callback.beforeClick.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode, clickFlag)</span><span class="path">setting.callback.</span>beforeClick</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Before click callback, return false to prevent the 'onClick' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which is clicked</p>
|
||||
<h4 class="topLine"><b>clickFlag</b><span>Number</span></h4>
|
||||
<p>Node is selected or deselected state, please see table below for details</p>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<thead><tr><td>clickFlag</td><td title="Whether to allow multi-select">selectedMulti</td><td title="Whether to press Ctrl-key or Cmd-key">autoCancelSelected<br/>&&<br/>event.ctrlKey / metaKey</td><td title="Node's selection state">isSelected</td><td>operate for selected</td></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>1</td><td>true</td><td>false</td><td>false</td><td>node is selected (single)</td></tr>
|
||||
<tr><td>1</td><td>true</td><td>false</td><td>true</td><td>node is selected (single)</td></tr>
|
||||
<tr><td>2</td><td>true</td><td>true</td><td>false</td><td>node is selected (multi)</td></tr>
|
||||
<tr><td>0</td><td>true</td><td>true</td><td>true</td><td>node is deselected</td></tr>
|
||||
<tr><td>1</td><td>false</td><td>false</td><td>false</td><td>node is selected (single)</td></tr>
|
||||
<tr><td>1</td><td>false</td><td>false</td><td>true</td><td>node is selected (single)</td></tr>
|
||||
<tr><td>1</td><td>false</td><td>true</td><td>false</td><td>node is selected (single)</td></tr>
|
||||
<tr><td>0</td><td>false</td><td>true</td><td>true</td><td>node is deselected</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, zTree will not change selected state, and will not trigger the 'onClick' callback.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disabled to click the node</h4>
|
||||
<pre xmlns=""><code>function myBeforeClick(treeId, treeNode, clickFlag) {
|
||||
return (treeNode.id !== 1);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
beforeClick: myBeforeClick
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
34
static/zTree3/api/en/setting.callback.beforeCollapse.html
Normal file
34
static/zTree3/api/en/setting.callback.beforeCollapse.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeCollapse</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Specify callback function to be called before collapse node, The return value controls the collapse node.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node to be collapsed</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, zTree will not collapse node, and will not trigger the 'onCollapse' callback.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disabled to collapse node which is expanded</h4>
|
||||
<pre xmlns=""><code>function myBeforeCollapse(treeId, treeNode) {
|
||||
return false;
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
beforeCollapse: myBeforeCollapse
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
36
static/zTree3/api/en/setting.callback.beforeDblClick.html
Normal file
36
static/zTree3/api/en/setting.callback.beforeDblClick.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeDblClick</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Specify callback function, executed before the 'onDblClick' callback, The return value controls the 'onDblClick' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which is double clicked</p>
|
||||
<p class="highlight_red">If the DOM which dblclicked isn't a node, it will return null.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, ztree will not trigger the 'onDblClick' callback, no effect on other operations.</p>
|
||||
<p class="highlight_red">This callback function does not affect the auto expand of the parent node , please refer to setting.view.dblClickExpand properties.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable to trigger the 'onDblClick' callback</h4>
|
||||
<pre xmlns=""><code>function myBeforeDblClick(treeId, treeNode) {
|
||||
return false;
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
beforeDblClick: myBeforeDblClick
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
39
static/zTree3/api/en/setting.callback.beforeDrag.html
Normal file
39
static/zTree3/api/en/setting.callback.beforeDrag.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNodes)</span><span class="path">setting.callback.</span>beforeDrag</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Specify callback function to be called before the drag node callback, The return value controls whether the drag node callback will execute.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>, the id of the containing tree.</p>
|
||||
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
|
||||
<p>A collection of the nodes being dragged</p>
|
||||
<p class="highlight_red">v3.x allows the drag and drop of multiple sibling nodes, so this parameter's type is changed to Array(JSON).</p>
|
||||
<p class="highlight_red">If the selected nodes aren't sibling nodes, you can only drag one node.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, zTree will abort the drag and drop, and will not trigger the 'onDrag / beforeDrop / onDrop' sequence of callbacks.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable drag completely (by returning false)</h4>
|
||||
<pre xmlns=""><code>function myBeforeDrag(treeId, treeNodes) {
|
||||
return false;
|
||||
};
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true
|
||||
},
|
||||
callback: {
|
||||
beforeDrag: myBeforeDrag
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
37
static/zTree3/api/en/setting.callback.beforeDragOpen.html
Normal file
37
static/zTree3/api/en/setting.callback.beforeDragOpen.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeDragOpen</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback executed before drag node to collapsed parent node, The return value controls the auto expand behaviour of the parent node.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>, the tree is what the treeNode(parent node) is belong to.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the parent node which will be auto expanded</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, zTree will not auto expand parent node.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable to auto expand parent node.</h4>
|
||||
<pre xmlns=""><code>function myBeforeDragOpen(treeId, treeNode) {
|
||||
return false;
|
||||
};
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true
|
||||
},
|
||||
callback: {
|
||||
beforeDragOpen: myBeforeDragOpen
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
50
static/zTree3/api/en/setting.callback.beforeDrop.html
Normal file
50
static/zTree3/api/en/setting.callback.beforeDrop.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNodes, targetNode, moveType, isCopy)</span><span class="path">setting.callback.</span>beforeDrop</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Specify callback function to be called before drag-drop of a node, The return value controls the execution of drag-drop callback.</p>
|
||||
<p>Default: null</p>
|
||||
<p class="highlight_red">When a node is dropped, if the drop is not in a valid location, this callback will not be triggered, and will revert to the original position.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>, the id of the containing tree.</p>
|
||||
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
|
||||
<p>A collection of the nodes which has been dragged</p>
|
||||
<p class="highlight_red">The treeNodes which have been dragged, when copying nodes or moving nodes.</p>
|
||||
<h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the destination node on which treeNodes are being dropped.</p>
|
||||
<p class="highlight_red">If the treeNodes is the root node, the targetNode = null</p>
|
||||
<h4 class="topLine"><b>moveType</b><span>String</span></h4>
|
||||
<p>the relative position of move to the target node</p>
|
||||
<p class="highlight_red">"inner": will be child of targetNode</p>
|
||||
<p class="highlight_red">"prev": will be sibling node, and be in front of targetNode</p>
|
||||
<p class="highlight_red">"next": will be sibling node, and be behind targetNode</p>
|
||||
<h4 class="topLine"><b>isCopy</b><span>Boolean</span></h4>
|
||||
<p>the flag used to determine if the drop is to copy or move the node</p>
|
||||
<p class="highlight_red">true: copy node; false: move node</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, zTree will restore the dragged nodes, and will not trigger the 'onDrop' callback.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable to drag nodes to root</h4>
|
||||
<pre xmlns=""><code>function myBeforeDrop(treeId, treeNodes, targetNode, moveType) {
|
||||
return !(targetNode == null || (moveType != "inner" && !targetNode.parentTId));
|
||||
};
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true
|
||||
},
|
||||
callback: {
|
||||
beforeDrop: myBeforeDrop
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
38
static/zTree3/api/en/setting.callback.beforeEditName.html
Normal file
38
static/zTree3/api/en/setting.callback.beforeEditName.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeEditName</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Specify callback function to be called before click edit button, The return value controls the editing of the name.</p>
|
||||
<p class="highlight_red">This callback is fired when the edit button is clicked, to control the custom editing operation.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node to be edited.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, allow editing of the name.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable editing of any parent node's name</h4>
|
||||
<pre xmlns=""><code>function myBeforeEditName(treeId, treeNode) {
|
||||
return !treeNode.isParent;
|
||||
}
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true
|
||||
},
|
||||
callback: {
|
||||
beforeEditName: myBeforeEditName
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
34
static/zTree3/api/en/setting.callback.beforeExpand.html
Normal file
34
static/zTree3/api/en/setting.callback.beforeExpand.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeExpand</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Specify callback function to be called before expanding a node, The return value controls the expand node callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node to be expanded</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, zTree will not expand node, and will not trigger the 'onExpand' callback.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disables expanding of all nodes</h4>
|
||||
<pre xmlns=""><code>function myBeforeExpand(treeId, treeNode) {
|
||||
return false;
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
beforeExpand: myBeforeExpand
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
35
static/zTree3/api/en/setting.callback.beforeMouseDown.html
Normal file
35
static/zTree3/api/en/setting.callback.beforeMouseDown.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeMouseDown</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Specify callback function, executed before the 'onMouseDown' callback, The return value controls the 'onMouseDown' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which mouse over</p>
|
||||
<p class="highlight_red">If the DOM which mouse over isn't a node, it will return null.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, zTree will not trigger the 'onMouseDown' callback, no effect on other operations.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable to trigger the 'onMouseDown' callback</h4>
|
||||
<pre xmlns=""><code>function myBeforeMouseDown(treeId, treeNode) {
|
||||
return false;
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
beforeMouseDown: myBeforeMouseDown
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
35
static/zTree3/api/en/setting.callback.beforeMouseUp.html
Normal file
35
static/zTree3/api/en/setting.callback.beforeMouseUp.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeMouseUp</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Specify callback function, executed before the 'onMouseUp' callback, The return value controls the 'onMouseUp' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which mouse over</p>
|
||||
<p class="highlight_red">If the DOM which mouse over isn't a node, it will return null.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, zTree will not trigger the 'onMouseUp' callback, no effect on other operations.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable to trigger the 'onMouseUp' callback</h4>
|
||||
<pre xmlns=""><code>function myBeforeMouseUp(treeId, treeNode) {
|
||||
return false;
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
beforeMouseUp: myBeforeMouseUp
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
37
static/zTree3/api/en/setting.callback.beforeRemove.html
Normal file
37
static/zTree3/api/en/setting.callback.beforeRemove.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeRemove</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Specify callback function to be called before remove node, The return value controls the allow to remove node.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node to be removed.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, zTree will not remove node, and will not trigger the 'onRemove' callback.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable to remove node</h4>
|
||||
<pre xmlns=""><code>function myBeforeRemove(treeId, treeNode) {
|
||||
return false;
|
||||
}
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true
|
||||
},
|
||||
callback: {
|
||||
beforeRemove: myBeforeRemove
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
46
static/zTree3/api/en/setting.callback.beforeRename.html
Normal file
46
static/zTree3/api/en/setting.callback.beforeRename.html
Normal file
@@ -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>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Specify callback function to be called before rename(when input DOM blur or press Enter Key), The return value controls the allow to rename node.</p>
|
||||
<p class="highlight_red">When node is editing name, press the ESC key to restore the original name and stop edit name.</p>
|
||||
<p class="highlight_red">From v3.5.13, zTree will trigger this callback when user cancel edit name. please see 'isCancel' parameter.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node to be rename.</p>
|
||||
<h4 class="topLine"><b>newName</b><span>String</span></h4>
|
||||
<p>the new name</p>
|
||||
<h4 class="topLine"><b>isCancel</b><span>Boolean</span></h4>
|
||||
<p>the status about cancel edit name (v3.5.13+)</p>
|
||||
<p class="highlight_red">isCancel = true means: user cancel edit name. (press ESC or use cancelEditName() function)</p>
|
||||
<p class="highlight_red">isCancel = false means: user submit edit name.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, the treeNode will keep the editing name, don't trigger the 'onRename' callback, and will ignore other enents, until the callback return true.</p>
|
||||
<p class="highlight_red">If returns false, zTree will not set the input box to get focus to avoid the warning message which led to repeated triggering ‘beforeRename’ callback. Please use editName() method to set the input box to get focus when user close the warning message.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. the length of the new name can't less than 5</h4>
|
||||
<pre xmlns=""><code>function myBeforeRename(treeId, treeNode, newName, isCancel) {
|
||||
return newName.length > 5;
|
||||
}
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true
|
||||
},
|
||||
callback: {
|
||||
beforeRename: myBeforeRename
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
35
static/zTree3/api/en/setting.callback.beforeRightClick.html
Normal file
35
static/zTree3/api/en/setting.callback.beforeRightClick.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.callback.</span>beforeRightClick</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to capture the right click event before the 'onRightClick' callback, The return value controls the 'onRightClick' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which is mouse right clicked</p>
|
||||
<p class="highlight_red">If the DOM which mouse right clicked isn't a node, it will return null.</p>
|
||||
<h4 class="topLine"><b>Return</b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
<p class="highlight_red">If return false, ztree will not trigger the 'onRightClick' callback, no effect on other operations.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable to trigger the 'onRightClick' callback</h4>
|
||||
<pre xmlns=""><code>function myBeforeRightClick(treeId, treeNode) {
|
||||
return false;
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
beforeRightClick: myBeforeRightClick
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
42
static/zTree3/api/en/setting.callback.onAsyncError.html
Normal file
42
static/zTree3/api/en/setting.callback.onAsyncError.html
Normal file
@@ -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> </h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to capture the error event when execute ajax.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeAsync',and return false, zTree will not execute ajax, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the parent node</p>
|
||||
<p class="highlight_red">When load root nodes, treeNode = null</p>
|
||||
<h4 class="topLine"><b>XMLHttpRequest</b><span>String</span></h4>
|
||||
<p>XMLHttpRequest Object, please refer to JQuery API documentation.</p>
|
||||
<h4 class="topLine"><b>textStatus</b><span>String</span></h4>
|
||||
<p>a string categorizing the status of the request("success", "error"...), please refer to JQuery API documentation.</p>
|
||||
<h4 class="topLine"><b>errorThrown</b><span>String</span></h4>
|
||||
<p>eWhen an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, please refer to JQuery API documentation.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When execute ajax make error, alert message.</h4>
|
||||
<pre xmlns=""><code>function myOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert(XMLHttpRequest);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onAsyncError: myOnAsyncError
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
38
static/zTree3/api/en/setting.callback.onAsyncSuccess.html
Normal file
38
static/zTree3/api/en/setting.callback.onAsyncSuccess.html
Normal file
@@ -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>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to capture the complete success event when execute ajax.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeAsync',and return false, zTree will not execute ajax, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the parent node</p>
|
||||
<p class="highlight_red">When load root nodes, treeNode = null</p>
|
||||
<h4 class="topLine"><b>msg</b><span>String / Object</span></h4>
|
||||
<p>The actualnode data which got by ajax. User-friendly debugging.</p>
|
||||
<p class="highlight_red">The actual data's type of msg is affected by 'setting.async.dataType', please refer to JQuery API documentation.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When execute ajax complete success, alert message.</h4>
|
||||
<pre xmlns=""><code>function myOnAsyncSuccess(event, treeId, treeNode, msg) {
|
||||
alert(msg);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onAsyncSuccess: myOnAsyncSuccess
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
34
static/zTree3/api/en/setting.callback.onCheck.html
Normal file
34
static/zTree3/api/en/setting.callback.onCheck.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onCheck</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to capture the check or uncheck event when check or uncheck the checkbox and radio.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeCheck',and return false, zTree will not change check state, and will not trigger the 'onCheck' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which is checked or unchecked</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When check or uncheck the checkbox and radio, alert info about 'tId' and 'name' and 'checked'.</h4>
|
||||
<pre xmlns=""><code>function myOnCheck(event, treeId, treeNode) {
|
||||
alert(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onCheck: myOnCheck
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
49
static/zTree3/api/en/setting.callback.onClick.html
Normal file
49
static/zTree3/api/en/setting.callback.onClick.html
Normal file
@@ -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>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to capture the click event when click node.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeClick',and return false, zTree will not change selected state, and will not trigger the 'onClick' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which is clicked</p>
|
||||
<h4 class="topLine"><b>clickFlag</b><span>Number</span></h4>
|
||||
<p>Node is selected or deselected state, please see table below for details</p>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<thead><tr><td>clickFlag</td><td title="Whether to allow multi-select">selectedMulti</td><td title="Whether to press Ctrl-key or Cmd-key">autoCancelSelected<br/>&&<br/>event.ctrlKey / metaKey</td><td title="Node's selection state">isSelected</td><td>operate for selected</td></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>1</td><td>true</td><td>false</td><td>false</td><td>node is selected (single)</td></tr>
|
||||
<tr><td>1</td><td>true</td><td>false</td><td>true</td><td>node is selected (single)</td></tr>
|
||||
<tr><td>2</td><td>true</td><td>true</td><td>false</td><td>node is selected (multi)</td></tr>
|
||||
<tr><td>0</td><td>true</td><td>true</td><td>true</td><td>node is deselected</td></tr>
|
||||
<tr><td>1</td><td>false</td><td>false</td><td>false</td><td>node is selected (single)</td></tr>
|
||||
<tr><td>1</td><td>false</td><td>false</td><td>true</td><td>node is selected (single)</td></tr>
|
||||
<tr><td>1</td><td>false</td><td>true</td><td>false</td><td>node is selected (single)</td></tr>
|
||||
<tr><td>0</td><td>false</td><td>true</td><td>true</td><td>node is deselected</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When click node, alert info about 'tId' and 'name'.</h4>
|
||||
<pre xmlns=""><code>function myOnClick(event, treeId, treeNode) {
|
||||
alert(treeNode.tId + ", " + treeNode.name);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onClick: myOnClick
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
34
static/zTree3/api/en/setting.callback.onCollapse.html
Normal file
34
static/zTree3/api/en/setting.callback.onCollapse.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onCollapse</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback for collapse node.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeCollapse',and return false, zTree will not collapse node, and will not trigger the 'onCollapse' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node to be collapsed</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When collapse node, alert info about 'tId' and 'name'.</h4>
|
||||
<pre xmlns=""><code>function myOnCollapse(event, treeId, treeNode) {
|
||||
alert(treeNode.tId + ", " + treeNode.name);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onCollapse: myOnCollapse
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
35
static/zTree3/api/en/setting.callback.onDblClick.html
Normal file
35
static/zTree3/api/en/setting.callback.onDblClick.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onDblClick</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to capture the dblclick event when double click node.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeDblClick',and return false, zTree will not trigger the 'onDblClick' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which is double clicked</p>
|
||||
<p class="highlight_red">If the DOM which dblclicked isn't a node, it will return null.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When double click node, alert info about 'tId' and 'name'.</h4>
|
||||
<pre xmlns=""><code>function myOnDblClick(event, treeId, treeNode) {
|
||||
alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onDblClick: myOnDblClick
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
34
static/zTree3/api/en/setting.callback.onDrag.html
Normal file
34
static/zTree3/api/en/setting.callback.onDrag.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNodes)</span><span class="path">setting.callback.</span>onDrag</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to capture the drag event when drag node.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeDrag',and return false, zTree will stop drag, and will not trigger the 'onDragMove' & 'onDrag' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>, the id of the containing tree.</p>
|
||||
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
|
||||
<p>A collection of the nodes which will be dragged</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When drag nodes, alert the number of dragged nodes.</h4>
|
||||
<pre xmlns=""><code>function myOnDrag(event, treeId, treeNodes) {
|
||||
alert(treeNodes.length);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onDrag: myOnDrag
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
34
static/zTree3/api/en/setting.callback.onDragMove.html
Normal file
34
static/zTree3/api/en/setting.callback.onDragMove.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNodes)</span><span class="path">setting.callback.</span>onDragMove</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to capture the drag-move event when drag & drop node.</p>
|
||||
<p class="highlight_red">Mainly used to capture the DOM which the nodes was drag in. </p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>, the id of the containing tree.</p>
|
||||
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
|
||||
<p>A collection of the nodes which will be dragged</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When drag nodes, output the target dom.</h4>
|
||||
<pre xmlns=""><code>function myOnDragMove(event, treeId, treeNodes) {
|
||||
console.log(event.target);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onDragMove: myOnDragMove
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
48
static/zTree3/api/en/setting.callback.onDrop.html
Normal file
48
static/zTree3/api/en/setting.callback.onDrop.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNodes, targetNode, moveType, isCopy)</span><span class="path">setting.callback.</span>onDrop</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to capture the drop event when drag-drop node.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeDrop',and return false, zTree will restore the dragged nodes, and will not trigger the 'onDrop' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>, the id of the containing tree.</p>
|
||||
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
|
||||
<p>A collection of the nodes which has been dragged</p>
|
||||
<p class="highlight_red">The treeNodes are the data of the nodes which be dragged, when move nodes.</p>
|
||||
<p class="highlight_red">The treeNodes are the clone data of the nodes which be dragged, when copy nodes.</p>
|
||||
<h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the target node which treeNodes are drag-dropped.</p>
|
||||
<p class="highlight_red">If the treeNodes will be root node, the targetNode = null</p>
|
||||
<h4 class="topLine"><b>moveType</b><span>String</span></h4>
|
||||
<p>the relative position of move to the target node</p>
|
||||
<p class="highlight_red">"inner": will be child of targetNode</p>
|
||||
<p class="highlight_red">"prev": will be sibling node, and be in front of targetNode</p>
|
||||
<p class="highlight_red">"next": will be sibling node, and be behind targetNode</p>
|
||||
<p class="highlight_red">If moveType is null, means drag & drop is cancel.</p>
|
||||
<h4 class="topLine"><b>isCopy</b><span>Boolean</span></h4>
|
||||
<p>the flag used to judge copy node or move node</p>
|
||||
<p class="highlight_red">true: copy node; false: move node</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When drag-drop nodes complete, alert the number of dragged nodes and info about targetNode.</h4>
|
||||
<pre xmlns=""><code>function myOnDrop(event, treeId, treeNodes, targetNode, moveType) {
|
||||
alert(treeNodes.length + "," + (targetNode ? (targetNode.tId + ", " + targetNode.name) : "isRoot" ));
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onDrop: myOnDrop
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
34
static/zTree3/api/en/setting.callback.onExpand.html
Normal file
34
static/zTree3/api/en/setting.callback.onExpand.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onExpand</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback for expand node.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeExpand',and return false, zTree will not expand node, and will not trigger the 'onExpand' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node to be expanded</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When expand node, alert info about 'tId' and 'name'.</h4>
|
||||
<pre xmlns=""><code>function myOnExpand(event, treeId, treeNode) {
|
||||
alert(treeNode.tId + ", " + treeNode.name);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onExpand: myOnExpand
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
35
static/zTree3/api/en/setting.callback.onMouseDown.html
Normal file
35
static/zTree3/api/en/setting.callback.onMouseDown.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onMouseDown</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback for mouse down.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeMouseDown',and return false, zTree will not trigger the 'onMouseDown' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which mouse over</p>
|
||||
<p class="highlight_red">If the DOM which mouse over isn't a node, it will return null.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When mouse down, alert info about 'tId' and 'name'.</h4>
|
||||
<pre xmlns=""><code>function myOnMouseDown(event, treeId, treeNode) {
|
||||
alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onMouseDown: myOnMouseDown
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
35
static/zTree3/api/en/setting.callback.onMouseUp.html
Normal file
35
static/zTree3/api/en/setting.callback.onMouseUp.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onMouseUp</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback for mouse up.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeMouseUp',and return false, zTree will not trigger the 'onMouseUp' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which mouse over</p>
|
||||
<p class="highlight_red">If the DOM which mouse over isn't a node, it will return null.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When mouse up, alert info about 'tId' and 'name'.</h4>
|
||||
<pre xmlns=""><code>function myOnMouseUp(event, treeId, treeNode) {
|
||||
alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onMouseUp: myOnMouseUp
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
35
static/zTree3/api/en/setting.callback.onNodeCreated.html
Normal file
35
static/zTree3/api/en/setting.callback.onNodeCreated.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onNodeCreated</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback for node's DOM is created.</p>
|
||||
<p class="highlight_red">Because v3.x uses lazy loading technology, so the nodes which doesn't create DOM when initialized will not trigger this callback, until its parent node is expanded.</p>
|
||||
<p class="highlight_red">Large amount of data to load, please note: do not set onNodeCreated, can improve performance as when initialized.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which DOM is created</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When node's DOM is created, alert info about 'tId' and 'name'.</h4>
|
||||
<pre xmlns=""><code>function myOnNodeCreated(event, treeId, treeNode) {
|
||||
alert(treeNode.tId + ", " + treeNode.name);
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onNodeCreated: myOnNodeCreated
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
34
static/zTree3/api/en/setting.callback.onRemove.html
Normal file
34
static/zTree3/api/en/setting.callback.onRemove.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onRemove</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback for remove node.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeRemove',and return false, zTree will not remove node, and will not trigger the 'onRemove' callback.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which was removed.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When remove node, alert info about 'tId' and 'name'.</h4>
|
||||
<pre xmlns=""><code>function myOnRemove(event, treeId, treeNode) {
|
||||
alert(treeNode.tId + ", " + treeNode.name);
|
||||
}
|
||||
var setting = {
|
||||
callback: {
|
||||
onRemove: myOnRemove
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
40
static/zTree3/api/en/setting.callback.onRename.html
Normal file
40
static/zTree3/api/en/setting.callback.onRename.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNode, isCancel)</span><span class="path">setting.callback.</span>onRename</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback for remove node.</p>
|
||||
<p class="highlight_red">1. If you set 'setting.callback.beforeRename',and return false, zTree will keep the editing name, and will not trigger the 'onRename' callback.</p>
|
||||
<p class="highlight_red">2. If you modify treeNode data, and use 'updateNode' function, zTree will not trigger the 'onRename' callback.</p>
|
||||
<p class="highlight_red">3. From v3.5.13, zTree will trigger this callback when user cancel edit name. please see 'isCancel' parameter.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which was rename.</p>
|
||||
<h4 class="topLine"><b>isCancel</b><span>Boolean</span></h4>
|
||||
<p>the status about cancel edit name (v3.5.13+)</p>
|
||||
<p class="highlight_red">isCancel = true means: user cancel edit name. (press ESC or use cancelEditName() function)</p>
|
||||
<p class="highlight_red">isCancel = false means: user submit edit name.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When rename node, alert info about 'tId' and 'name'.</h4>
|
||||
<pre xmlns=""><code>function myOnRename(event, treeId, treeNode, isCancel) {
|
||||
alert(treeNode.tId + ", " + treeNode.name);
|
||||
}
|
||||
var setting = {
|
||||
callback: {
|
||||
onRename: myOnRename
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
36
static/zTree3/api/en/setting.callback.onRightClick.html
Normal file
36
static/zTree3/api/en/setting.callback.onRightClick.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(event, treeId, treeNode)</span><span class="path">setting.callback.</span>onRightClick</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Callback for mouse right click node.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.beforeRightClick',and return false, zTree will not trigger the 'onRightClick' callback.</p>
|
||||
<p class="highlight_red">If you set 'setting.callback.onRightClick', zTree will shield the browser context menu when mouse right click on zTree.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>event</b><span>js event Object</span></h4>
|
||||
<p>event Object</p>
|
||||
<h4 class="topLine"><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which is mouse right clicked</p>
|
||||
<p class="highlight_red">If the DOM which mouse right clicked isn't a node, it will return null.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. When mouse right click node, alert info about 'tId' and 'name'.</h4>
|
||||
<pre xmlns=""><code>function myOnRightClick(event, treeId, treeNode) {
|
||||
alert(treeNode ? treeNode.tId + ", " + treeNode.name : "isRoot");
|
||||
};
|
||||
var setting = {
|
||||
callback: {
|
||||
onRightClick: myOnRightClick
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
29
static/zTree3/api/en/setting.check.autoCheckTrigger.html
Normal file
29
static/zTree3/api/en/setting.check.autoCheckTrigger.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.check.</span>autoCheckTrigger</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When node is automatically checked or unchecked, this parameter used to set to trigger 'beforeCheck / onCheck' callback. It is valid when <span class="highlight_red">[setting.check.enable = true & setting.check.chkStyle = "checkbox"]</span></p>
|
||||
<p class="highlight_red">1. If you set 'setting.check.chkboxType' to { "Y": "", "N": "" }, will not automatically checked or unchecked.</p>
|
||||
<p class="highlight_red">2. If you turn on the trigger and there are many more nodes, will affect the performance, because the check or uncheck node can cause many nodes to be automatically checked or unchecked, it will trigger a lot of callbacks, according to the need to decide whether to use this feature.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: trigger callback</p>
|
||||
<p> false means: don't trigger callback</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. When node is automatically checked or unchecked, zTree trigger 'beforeCheck / onCheck' callback.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
check: {
|
||||
enable: true,
|
||||
autoCheckTrigger: true
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
28
static/zTree3/api/en/setting.check.chkDisabledInherit.html
Normal file
28
static/zTree3/api/en/setting.check.chkDisabledInherit.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.check.</span>chkDisabledInherit</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When the parent node's 'chkDisabled' attribute is true, set the child nodes automatically inherit the 'chkDisabled' attribute. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
|
||||
<p class="highlight_red">1. Only be used to initialize the nodes, easy batch operations. Please use the 'updateNode' method modify existing node.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: When add new child nodes, if parent node's 'chkDisabled' attribute is true, the child nodes automatically inherit the 'chkDisabled' attribute.</p>
|
||||
<p> false means: When add new child nodes, the child nodes don't inherit the 'chkDisabled' attribute from parent node.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. When add new child nodes, the child nodes automatically inherit the 'chkDisabled' attribute from parent node.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
check: {
|
||||
enable: true,
|
||||
chkDisabledInherit: true
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
48
static/zTree3/api/en/setting.check.chkStyle.html
Normal file
48
static/zTree3/api/en/setting.check.chkStyle.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.check.</span>chkStyle</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Use the checkbox or radio. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
|
||||
<p>Default: "checkbox"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>String Format</h3>
|
||||
<div class="desc">
|
||||
<p>When chkStyle = "checkbox", zTree show checkbox, and '<span class="highlight_red">setting.check.chkboxType</span>' attribute is valid.
|
||||
<br/>When chkStyle = "radio", zTree show radio, and '<span class="highlight_red">setting.check.radioType</span>' attribute is valid.</p>
|
||||
<p class="highlight_red">Please note that letter case, do not change.</p>
|
||||
</div>
|
||||
<h3>checkbox States Descriptions</h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p><button type="button" class="chk checkbox_false_full"></button>not checked; <span class="highlight_red">If node is parent, so its child nodes have been not checked.</span> when mouse over: <button type="button" class="chk checkbox_false_full_focus"></button></p>
|
||||
<p><button type="button" class="chk checkbox_false_part"></button>not checked; (only parent node) <span class="highlight_red">some of its child nodes have been checked.</span> when mouse over: <button type="button" class="chk checkbox_false_part_focus"></button></p>
|
||||
<p><button type="button" class="chk checkbox_true_full"></button>be checked; <span class="highlight_red">If node is parent, so its all child nodes have been checked.</span> when mouse over: <button type="button" class="chk checkbox_true_full_focus"></button></p>
|
||||
<p><button type="button" class="chk checkbox_true_part"></button>be checked; (only parent node) <span class="highlight_red">some of its child nodes or all have been not checked.</span> when mouse over: <button type="button" class="chk checkbox_true_part_focus"></button></p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>radio States Descriptions</h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p><button type="button" class="chk radio_false_full"></button>not checked; <span class="highlight_red">If node is parent, so its child have been not checked.</span> when mouse over: <button type="button" class="chk radio_false_full_focus"></button></p>
|
||||
<p><button type="button" class="chk radio_false_part"></button>not checked; (only parent node) <span class="highlight_red">some of its child have been checked.</span> when mouse over: <button type="button" class="chk radio_false_part_focus"></button></p>
|
||||
<p><button type="button" class="chk radio_true_full"></button>be checked; <span class="highlight_red">If node is parent, so its child have been not checked.</span> when mouse over: <button type="button" class="chk radio_true_full_focus"></button></p>
|
||||
<p><button type="button" class="chk radio_true_part"></button>be checked; (only parent node) <span class="highlight_red">some of its child have been checked.</span> when mouse over: <button type="button" class="chk radio_true_part_focus"></button></p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. use radio</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
check: {
|
||||
enable: true,
|
||||
chkStyle: "radio"
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
31
static/zTree3/api/en/setting.check.chkboxType.html
Normal file
31
static/zTree3/api/en/setting.check.chkboxType.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>JSON</span><span class="path">setting.check.</span>chkboxType</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When one node is checked or unchecked, control its parent node and its child node auto checked or unchecked. It is valid when <span class="highlight_red">[setting.check.enable = true & setting.check.chkStyle = "checkbox"]</span></p>
|
||||
<p>Default: { "Y": "ps", "N": "ps" }</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>JSON Format</h3>
|
||||
<div class="desc">
|
||||
<p>"Y" attribute use to set auto check after checkbox was checked.
|
||||
<br/>"N" attribute use to set auto uncheck after checkbox was unchecked.
|
||||
<br/>If value has "p", so parent nodes will be checked or unchecked.
|
||||
<br/>If value has "s", so child nodes will be checked or unchecked.</p>
|
||||
<p class="highlight_red">Please note that letter case, do not change.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. If check the node, so only auto check parent nodes; If uncheck the node, so only auto uncheck child nodes;</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
check: {
|
||||
enable: true,
|
||||
chkStyle: "checkbox",
|
||||
chkboxType: { "Y": "p", "N": "s" }
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
26
static/zTree3/api/en/setting.check.enable.html
Normal file
26
static/zTree3/api/en/setting.check.enable.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.check.</span>enable</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set to use checkbox or radio in zTree</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: use the checkbox or radio</p>
|
||||
<p> false means: don't use the checkbox or radio</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. use the checkbox</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
check: {
|
||||
enable: true
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
28
static/zTree3/api/en/setting.check.nocheckInherit.html
Normal file
28
static/zTree3/api/en/setting.check.nocheckInherit.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.check.</span>nocheckInherit</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When the parent node's 'nocheck' attribute is true, set the child nodes automatically inherit the 'nocheck' attribute. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
|
||||
<p class="highlight_red">1. Only be used to initialize the nodes, easy batch operations. Please use the 'updateNode' method modify existing node.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: When add new child nodes, if parent node's 'nocheck' attribute is true, the child nodes automatically inherit the 'nocheck' attribute.</p>
|
||||
<p> false means: When add new child nodes, the child nodes don't inherit the 'nocheck' attribute from parent node.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. When add new child nodes, the child nodes automatically inherit the 'nocheck' attribute from parent node.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
check: {
|
||||
enable: true,
|
||||
nocheckInherit: true
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
29
static/zTree3/api/en/setting.check.radioType.html
Normal file
29
static/zTree3/api/en/setting.check.radioType.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.check.</span>radioType</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The group about radio. It is valid when <span class="highlight_red">[setting.check.enable = true & setting.check.chkStyle = "radio"]</span></p>
|
||||
<p>Default: "level"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>String Format</h3>
|
||||
<div class="desc">
|
||||
<p>When radioType = "level", will be grouped with same level nodes which have the same parent node.
|
||||
<br/>When radioType = "all", will be grouped with all nodes.</p>
|
||||
<p class="highlight_red">Please note that letter case, do not change.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set the group about radio is all nodes.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
check: {
|
||||
enable: true,
|
||||
chkStyle: "radio",
|
||||
radioType: "all"
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
28
static/zTree3/api/en/setting.data.keep.leaf.html
Normal file
28
static/zTree3/api/en/setting.data.keep.leaf.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.data.keep.</span>leaf</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The leaf node's lock, the leaf node will lock the 'isParent' attribute to false.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: lock the leaf node, and <span class="highlight_red">the node which 'isParent' attribute is false can't add child nodes</span>.</p>
|
||||
<p> false means: don't lock the leaf node, and <span class="highlight_red">the node which 'isParent' attribute is false can add child nodes</span>.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. lock the leaf node</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
keep: {
|
||||
leaf: true
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
28
static/zTree3/api/en/setting.data.keep.parent.html
Normal file
28
static/zTree3/api/en/setting.data.keep.parent.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.data.keep.</span>parent</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The parent node's lock, the parent node will lock 'isParent' attribute to true.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: lock the parent node, and <span class="highlight_red">if remove all of the parent node's child nodes, its 'isParent' attribute still keep to be true.</span>.</p>
|
||||
<p> false means: don't lock the parent node, and <span class="highlight_red">if remove all of the parent node's child nodes, its 'isParent' attribute will change to be false.</span>.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. lock the parent node</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
keep: {
|
||||
parent: true
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
24
static/zTree3/api/en/setting.data.key.checked.html
Normal file
24
static/zTree3/api/en/setting.data.key.checked.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.data.key.</span>checked</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The node data's attribute to save the checked state.</p>
|
||||
<p>Default: "checked"</p>
|
||||
<p class="highlight_red">Please don't set the other node attribute which zTree used. (e.g., checkedOld)</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. set the 'isChecked' attribute to save the checked state.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
key: {
|
||||
checked: "isChecked"
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
23
static/zTree3/api/en/setting.data.key.children.html
Normal file
23
static/zTree3/api/en/setting.data.key.children.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.data.key.</span>children</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The node data's attribute to save the child nodes.</p>
|
||||
<p>Default: "children"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set the 'nodes' attribute to save the child nodes.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
key: {
|
||||
children: "nodes"
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
23
static/zTree3/api/en/setting.data.key.name.html
Normal file
23
static/zTree3/api/en/setting.data.key.name.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.data.key.</span>name</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The node data's attribute to save the node name.</p>
|
||||
<p>Default: "name"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set the 'ename' attribute to save the node name.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
key: {
|
||||
name: "ename"
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
24
static/zTree3/api/en/setting.data.key.title.html
Normal file
24
static/zTree3/api/en/setting.data.key.title.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.data.key.</span>title</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The node data's attribute to save the 'title' attribute of node DOM. It is valid when <span class="highlight_red">[setting.view.showTitle = true]</span></p>
|
||||
<p class="highlight_red">If set it to "", the title of node DOM will be same as 'setting.data.key.name' attribute.</p>
|
||||
<p>Default: ""</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set the 'fullName' attribute to save the title of node DOM.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
key: {
|
||||
title: "fullName"
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
24
static/zTree3/api/en/setting.data.key.url.html
Normal file
24
static/zTree3/api/en/setting.data.key.url.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.data.key.</span>url</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The node data's attribute to save the node link's url.</p>
|
||||
<p class="highlight_red">Special: If the nodes's data can only use the 'url' attribute, and don't use the link to jump feature, you can modify this attribute to any nonexistent attribute.</p>
|
||||
<p>Default: "url"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set the 'xUrl' attribute to save the node link's url.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
key: {
|
||||
url: "xUrl"
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
39
static/zTree3/api/en/setting.data.simpleData.enable.html
Normal file
39
static/zTree3/api/en/setting.data.simpleData.enable.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.data.simpleData.</span>enable</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set zTree's node to accept the simple data format, when zTree is initialized or when ajax get / or when use <span class="highlight_red">addNodes</span> method.</p>
|
||||
<p>Don't have to generate the complex nested data.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: zTree's node accept the simple data format.</p>
|
||||
<p> false means: zTree's node only accept the nested data format.</p>
|
||||
<p class="highlight_red">If set it is true, you must set the other attributes in 'setting.data.simpleData'. (e.g., idKey, pIdKey, rootPId) And let the data satisfy the parent-child relationship.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. use the simple data format</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
simpleData: {
|
||||
enable: true,
|
||||
idKey: "id",
|
||||
pIdKey: "pId",
|
||||
rootPId: 0
|
||||
}
|
||||
}
|
||||
};
|
||||
var treeNodes = [
|
||||
{"id":1, "pId":0, "name":"test1"},
|
||||
{"id":11, "pId":1, "name":"test11"},
|
||||
{"id":12, "pId":1, "name":"test12"},
|
||||
{"id":111, "pId":11, "name":"test111"}
|
||||
];
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
32
static/zTree3/api/en/setting.data.simpleData.idKey.html
Normal file
32
static/zTree3/api/en/setting.data.simpleData.idKey.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.data.simpleData.</span>idKey</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The node data's attribute to save node data's unique identifier. It is valid when <span class="highlight_red">[setting.data.simpleData.enable = true]</span></p>
|
||||
<p>Default: "id"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. use the simple data format</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
simpleData: {
|
||||
enable: true,
|
||||
idKey: "id",
|
||||
pIdKey: "pId",
|
||||
rootPId: 0
|
||||
}
|
||||
}
|
||||
};
|
||||
var treeNodes = [
|
||||
{"id":1, "pId":0, "name":"test1"},
|
||||
{"id":11, "pId":1, "name":"test11"},
|
||||
{"id":12, "pId":1, "name":"test12"},
|
||||
{"id":111, "pId":11, "name":"test111"}
|
||||
];
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
32
static/zTree3/api/en/setting.data.simpleData.pIdKey.html
Normal file
32
static/zTree3/api/en/setting.data.simpleData.pIdKey.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.data.simpleData.</span>pIdKey</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The node data's attribute to save its parent node data's unique identifier. It is valid when <span class="highlight_red">[setting.data.simpleData.enable = true]</span></p>
|
||||
<p>Default: "pId"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. use the simple data format</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
simpleData: {
|
||||
enable: true,
|
||||
idKey: "id",
|
||||
pIdKey: "pId",
|
||||
rootPId: 0
|
||||
}
|
||||
}
|
||||
};
|
||||
var treeNodes = [
|
||||
{"id":1, "pId":0, "name":"test1"},
|
||||
{"id":11, "pId":1, "name":"test11"},
|
||||
{"id":12, "pId":1, "name":"test12"},
|
||||
{"id":111, "pId":11, "name":"test111"}
|
||||
];
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
32
static/zTree3/api/en/setting.data.simpleData.rootPId.html
Normal file
32
static/zTree3/api/en/setting.data.simpleData.rootPId.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String / Number</span><span class="path">setting.data.simpleData.</span>rootPId</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set the default value of root's 'pIdKey' specified attribute values. It is valid when <span class="highlight_red">[setting.data.simpleData.enable = true]</span></p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. use the simple data format</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
data: {
|
||||
simpleData: {
|
||||
enable: true,
|
||||
idKey: "id",
|
||||
pIdKey: "pId",
|
||||
rootPId: 0
|
||||
}
|
||||
}
|
||||
};
|
||||
var treeNodes = [
|
||||
{"id":1, "pId":0, "name":"test1"},
|
||||
{"id":11, "pId":1, "name":"test11"},
|
||||
{"id":12, "pId":1, "name":"test12"},
|
||||
{"id":111, "pId":11, "name":"test111"}
|
||||
];
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,29 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.edit.drag.</span>autoExpandTrigger</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When drag node cause the parent node is automatically expanded, set whether to allow to trigger the 'onExpand' callback. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: trigger the 'onExpand' callback.</p>
|
||||
<p> false means: don't trigger the 'onExpand' callback.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set to allow to trigger the 'onExpand' callback</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
autoExpandTrigger: true
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
25
static/zTree3/api/en/setting.edit.drag.autoOpenTime.html
Normal file
25
static/zTree3/api/en/setting.edit.drag.autoOpenTime.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Number</span><span class="path">setting.edit.drag.</span>autoOpenTime</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Drag to the parent node, the parent node auto expand time interval. (Unit: ms) It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p>Default: 500</p>
|
||||
<p class="highlight_red">Please adjust the value according to needs.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. When drag node to other parent node, expand it at once.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
autoOpenTime: 0
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
25
static/zTree3/api/en/setting.edit.drag.borderMax.html
Normal file
25
static/zTree3/api/en/setting.edit.drag.borderMax.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Number</span><span class="path">setting.edit.drag.</span>borderMax</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When drag a node to root, the zTree's inner border width. (Unit: px) It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p>Default: 10</p>
|
||||
<p class="highlight_red">Please adjust the value according to needs.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. adjust the inner border width is 20px</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
borderMax: 20
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
25
static/zTree3/api/en/setting.edit.drag.borderMin.html
Normal file
25
static/zTree3/api/en/setting.edit.drag.borderMin.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Number</span><span class="path">setting.edit.drag.</span>borderMin</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When drag a node to root, the zTree's outer border width. (Unit: px) It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p>Default: -5</p>
|
||||
<p class="highlight_red">Please adjust the value according to needs.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. adjust the outer border width is 10px</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
borderMin: -10
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
60
static/zTree3/api/en/setting.edit.drag.inner.html
Normal file
60
static/zTree3/api/en/setting.edit.drag.inner.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean / Function(treeId, treeNodes, targetNode)</span><span class="path">setting.edit.drag.</span>inner</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When drag one node to the target node, set whether to allow the node to be the target node's child. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p class="highlight_red">If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.</p>
|
||||
<p class="highlight_red">This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'prev, next' together, to achieve full functionality.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: allow the node to be the target node's child.</p>
|
||||
<p> false means: don't allow the node to be the target node's child.</p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
|
||||
<p>A collection of the nodes which has been dragged</p>
|
||||
<h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the target node which treeNodes are draged over.</p>
|
||||
<p class="highlight_red">If the treeNodes will be root node, the targetNode = null</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable to drag the node to the target node's inner.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
prev: true,
|
||||
next: true,
|
||||
inner: false
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. disable to drag the node to be root node's child.</h4>
|
||||
<pre xmlns=""><code>function canInner(treeId, nodes, targetNode) {
|
||||
return !(targetNode && targetNode.level === 0);
|
||||
}
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
prev: true,
|
||||
next: true,
|
||||
inner: canInner
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
32
static/zTree3/api/en/setting.edit.drag.isCopy.html
Normal file
32
static/zTree3/api/en/setting.edit.drag.isCopy.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.edit.drag.</span>isCopy</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When drag-drop node, set whether to allow to copy node. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Rules Description</h3>
|
||||
<div class="desc">
|
||||
<p>1. If isCopy = true and isMove = true, when drag-drop node, press Ctrl-Key or Cmd-key can copy node, don't press Ctrl-Key or Cmd-key can move node.</p>
|
||||
<p>2. If isCopy = true and isMove = false, when drag-drop node, will copy node.</p>
|
||||
<p>3. If isCopy = false and isMove = true, when drag-drop node, will move node.</p>
|
||||
<p>4. If isCopy = false and isMove = false, so disable to drag-drop node.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. all of the drag-drop operation will copy node.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
isCopy: true,
|
||||
isMove: false
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
32
static/zTree3/api/en/setting.edit.drag.isMove.html
Normal file
32
static/zTree3/api/en/setting.edit.drag.isMove.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.edit.drag.</span>isMove</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When drag-drop node, set whether to allow to move node. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Rules Description</h3>
|
||||
<div class="desc">
|
||||
<p>1. If isCopy = true and isMove = true, when drag-drop node, press Ctrl-Key or Cmd-key can copy node, don't press Ctrl-Key or Cmd-key can move node.</p>
|
||||
<p>2. If isCopy = true and isMove = false, when drag-drop node, will copy node.</p>
|
||||
<p>3. If isCopy = false and isMove = true, when drag-drop node, will move node.</p>
|
||||
<p>4. If isCopy = false and isMove = false, so disable to drag-drop node.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. all of the drag-drop operation will move node.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
isCopy: false,
|
||||
isMove: true
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
25
static/zTree3/api/en/setting.edit.drag.maxShowNodeNum.html
Normal file
25
static/zTree3/api/en/setting.edit.drag.maxShowNodeNum.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Number</span><span class="path">setting.edit.drag.</span>maxShowNodeNum</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When dragging more than one sibling node, the floating layer shows the maximum number of nodes. zTree using '...' instead of redundant nodes. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p>Default: 5</p>
|
||||
<p class="highlight_red">Please adjust the value according to needs.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set the maximum number is 10</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
maxShowNodeNum: 10
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
25
static/zTree3/api/en/setting.edit.drag.minMoveSize.html
Normal file
25
static/zTree3/api/en/setting.edit.drag.minMoveSize.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Number</span><span class="path">setting.edit.drag.</span>minMoveSize</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The minimum offset which used to determine the drag operator start. (Unit: px) It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p class="highlight_red">Please adjust the value according to needs. Note: If it is too small, will easily lead to misoperation when you click mouse.</p>
|
||||
<p>Default: 5</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set the minimum offset is 10px.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
minMoveSize: 10
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
59
static/zTree3/api/en/setting.edit.drag.next.html
Normal file
59
static/zTree3/api/en/setting.edit.drag.next.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean / Function(treeId, treeNodes, targetNode)</span><span class="path">setting.edit.drag.</span>next</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When drag one node to the target node, set whether to allow the node to be the target node's next sibling. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p class="highlight_red">If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.</p>
|
||||
<p class="highlight_red">This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'prev, inner' together, to achieve full functionality.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: allow the node to be the target node's next sibling.</p>
|
||||
<p> false means: don't allow the node to be the target node's next sibling.</p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
|
||||
<p>A collection of the nodes which has been dragged</p>
|
||||
<h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the target node which treeNodes are draged over.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable to drag the node to the target node's next sibling.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
prev: true,
|
||||
next: false,
|
||||
inner: true
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. disable to drag the node to be all of the parent nodes's next sibling.</h4>
|
||||
<pre xmlns=""><code>function canNext(treeId, nodes, targetNode) {
|
||||
return !targetNode.isParent;
|
||||
}
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
prev: true,
|
||||
next: canNext,
|
||||
inner: true
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
59
static/zTree3/api/en/setting.edit.drag.prev.html
Normal file
59
static/zTree3/api/en/setting.edit.drag.prev.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean / Function(treeId, treeNodes, targetNode)</span><span class="path">setting.edit.drag.</span>prev</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When drag one node to the target node, set whether to allow the node to be the target node's previous sibling. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p class="highlight_red">If the target node is root, so zTree will only trigger 'inner' and not trigger 'prev / next'.</p>
|
||||
<p class="highlight_red">This function mainly for the appropriate limit drag and drop (auxiliary arrow), it requires a combination of 'next, inner' together, to achieve full functionality.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: allow the node to be the target node's previous sibling.</p>
|
||||
<p> false means: don't allow the node to be the target node's previous sibling.</p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNodes</b><span>Array(JSON)</span></h4>
|
||||
<p>A collection of the nodes which has been dragged</p>
|
||||
<h4 class="topLine"><b>targetNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the target node which treeNodes are draged over.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>return true or false</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. disable to drag the node to the target node's previous sibling.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
prev: false,
|
||||
next: true,
|
||||
inner: true
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. disable to drag the node to be all of the parent nodes's previous sibling.</h4>
|
||||
<pre xmlns=""><code>function canPrev(treeId, nodes, targetNode) {
|
||||
return !targetNode.isParent;
|
||||
}
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
drag: {
|
||||
prev: canPrev,
|
||||
next: true,
|
||||
inner: true
|
||||
}
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
27
static/zTree3/api/en/setting.edit.editNameSelectAll.html
Normal file
27
static/zTree3/api/en/setting.edit.editNameSelectAll.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.edit.</span>editNameSelectAll</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When edit node's name, the text in input is selected or unselected. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: when show the input, the text in input is selected</p>
|
||||
<p> false means: when show the input, the text in input is not selected</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. When edit node's name, the text in input is selected.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
editNameSelectAll: true
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
39
static/zTree3/api/en/setting.edit.enable.html
Normal file
39
static/zTree3/api/en/setting.edit.enable.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.edit.</span>enable</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set zTree is in edit mode</p>
|
||||
<p class="highlight_red">Please set this attribute before zTree initialization. If you need to change the edit mode after the initialization, please use zTreeObj.setEditable() method.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: zTree is in edit mode.</p>
|
||||
<p> false means: zTree is not in edit mode.</p>
|
||||
</div>
|
||||
<h3>Editing Rules Description</h3>
|
||||
<div class="desc">
|
||||
<p>1. When click the node, it will not open '<span class="highlight_red">node.url</span>' specified URL.
|
||||
<br/>2. Support for dynamic tree editing.
|
||||
<br/>3. You can drag-drop nodes, and support drag-drop nodes between multiple trees.
|
||||
<br/>4. Support use drag-drop to copy or move the node. (Reference: <span class="highlight_red">setting.edit.drag.isCopy / setting.edit.drag.isMove</span>)
|
||||
<br/>5. You can use the Edit button to modify the name attribute.
|
||||
<br/>6. You can use the Remove button to remove the node.
|
||||
<br/>
|
||||
</p>
|
||||
<p class="highlight_red">Please note that letter case, do not change.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. edit the tree</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
48
static/zTree3/api/en/setting.edit.removeTitle.html
Normal file
48
static/zTree3/api/en/setting.edit.removeTitle.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>removeTitle</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>the title of the remove button DOM. It is valid when <span class="highlight_red">[setting.edit.enable = true & setting.edit.showRemoveBtn = true]</span></p>
|
||||
<p>Default: "remove"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>String Format</h3>
|
||||
<div class="desc">
|
||||
<p>When the mouse over the remove button, the browser auto pop-up message content.</p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which show the remove button</p>
|
||||
<h4 class="topLine"><b>Return </b><span>String</span></h4>
|
||||
<p>Return value is same as 'String Format'</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Set title is 'remove the node' about all the remove button</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
showRemoveBtn: true,
|
||||
removeTitle: "remove the node"
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. Set title is 'remove the parent node' about the parent node, and is 'remove the leaf node' about the leaf node</h4>
|
||||
<pre xmlns=""><code>function setRemoveTitle(treeId, treeNode) {
|
||||
return treeNode.isParent ? "remove the parent node":"remove the leaf node";
|
||||
}
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
showRemoveBtn: true,
|
||||
removeTitle: setRemoveTitle
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
48
static/zTree3/api/en/setting.edit.renameTitle.html
Normal file
48
static/zTree3/api/en/setting.edit.renameTitle.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>renameTitle</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>the title of the rename button DOM. It is valid when <span class="highlight_red">[setting.edit.enable = true & setting.edit.showRenameBtn = true]</span></p>
|
||||
<p>Default: "rename"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>String Format</h3>
|
||||
<div class="desc">
|
||||
<p>When the mouse over the rename button, the browser auto pop-up message content.</p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which show the rename button</p>
|
||||
<h4 class="topLine"><b>Return </b><span>String</span></h4>
|
||||
<p>return value is same as 'String Format'</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Set title is 'rename the node' about all the rename button</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
showRenameBtn: true,
|
||||
renameTitle: "rename the node"
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. Set title is 'rename the parent node' about the parent node, and is 'rename the leaf node' about the leaf node</h4>
|
||||
<pre xmlns=""><code>function setRenameTitle(treeId, treeNode) {
|
||||
return treeNode.isParent ? "rename the parent node":"rename the leaf node";
|
||||
}
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
showRenameBtn: true,
|
||||
renameTitle: setRenameTitle
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
50
static/zTree3/api/en/setting.edit.showRemoveBtn.html
Normal file
50
static/zTree3/api/en/setting.edit.showRemoveBtn.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>showRemoveBtn</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set to show or hide the remove button. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p>When you click the remove button:</p>
|
||||
<p>1. zTree will trigger the <span class="highlight_red">setting.callback.beforeRemove</span> callback, and you can decide whether to allow delete.</p>
|
||||
<p>2. If you don't set the 'beforeRemove' or the 'beforeRemove' callback return true, so zTree will trigger the <span class="highlight_red">setting.callback.onRemove</span> callback after remove the node.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: show the remove button</p>
|
||||
<p> false means: hide the remove button</p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which show the remove button</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>Return value is same as 'Boolean Format'</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Hide the remove button</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
showRemoveBtn: false
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. Hide the remove button of parent node</h4>
|
||||
<pre xmlns=""><code>function setRemoveBtn(treeId, treeNode) {
|
||||
return !treeNode.isParent;
|
||||
}
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
showRemoveBtn: setRemoveBtn
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
52
static/zTree3/api/en/setting.edit.showRenameBtn.html
Normal file
52
static/zTree3/api/en/setting.edit.showRenameBtn.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>showRenameBtn</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set to show or hide the rename button. It is valid when <span class="highlight_red">[setting.edit.enable = true]</span></p>
|
||||
<p>When you click the rename button:</p>
|
||||
<p>1. Click the rename button, you can rename the node.</p>
|
||||
<p>2. After rename operation (the input DOM blur or press the Enter Key), zTree will trigger the <span class="highlight_red">setting.callback.beforeRename</span> callback, and you can decide whether to allow rename.</p>
|
||||
<p>3. If the 'beforeRename' callback return false, so zTree will keep the edit status. (Press the ESC key, can be restored to the original state.</p>
|
||||
<p>4. If you don't set the 'beforeRename' or the 'beforeRename' callback return true, so zTree will trigger the <span class="highlight_red">setting.callback.onRename</span> callback after rename the node.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: show the rename button</p>
|
||||
<p> false means: hide the rename button</p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which show the rename button</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>Return value is same as 'Boolean Format'</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Hide the rename button</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
showRenameBtn: false
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. Hide the rename button of parent node</h4>
|
||||
<pre xmlns=""><code>function setRenameBtn(treeId, treeNode) {
|
||||
return !treeNode.isParent;
|
||||
}
|
||||
var setting = {
|
||||
edit: {
|
||||
enable: true,
|
||||
showRenameBtn: setRenameBtn
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
14
static/zTree3/api/en/setting.treeId.html
Normal file
14
static/zTree3/api/en/setting.treeId.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">setting.</span>treeId</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>zTree unique identifier. After the initialization, it equals to the id attribute value of the user-defined zTree container.</p>
|
||||
<p class="highlight_red">Do not initialize or modify it, it is an internal argument.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
14
static/zTree3/api/en/setting.treeObj.html
Normal file
14
static/zTree3/api/en/setting.treeObj.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Object</span><span class="path">setting.</span>treeObj</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>zTree DOM's jQuery object, the main function: easy to internal operations.</p>
|
||||
<p class="highlight_red">Do not initialize or modify it, it is an internal argument.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
40
static/zTree3/api/en/setting.view.addDiyDom.html
Normal file
40
static/zTree3/api/en/setting.view.addDiyDom.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.view.</span>addDiyDom</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>This function used to display the custom control on the node.</p>
|
||||
<p class="highlight_red">1. If you have huge node data, please note: this function will affect the initialization performance. If not required, it is recommended not to use this function.</p>
|
||||
<p class="highlight_red">2. This function is an advanced application, please make sure that a better understanding of zTree before you use it.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which display the custom control.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Display button in all nodes.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
addDiyDom: addDiyDom
|
||||
}
|
||||
};
|
||||
function addDiyDom(treeId, treeNode) {
|
||||
var aObj = $("#" + treeNode.tId + "_a");
|
||||
if ($("#diyBtn_"+treeNode.id).length>0) return;
|
||||
var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
|
||||
+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
|
||||
+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
|
||||
aObj.append(editStr);
|
||||
var btn = $("#diyBtn_"+treeNode.id);
|
||||
if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
45
static/zTree3/api/en/setting.view.addHoverDom.html
Normal file
45
static/zTree3/api/en/setting.view.addHoverDom.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.view.</span>addHoverDom</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to display custom control when mouse move over the node. (e.g. the rename and remove button)</p>
|
||||
<p class="highlight_red">If you use this function, so must set <span class="highlight_red">setting.view.removeHoverDom</span>, please make sure that a better understanding of zTree before you use it.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which need to display the custom control.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Display a button when mouse move over the node, and hide the button when mouse move out.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
addHoverDom: addHoverDom,
|
||||
removeHoverDom: removeHoverDom,
|
||||
......
|
||||
}
|
||||
};
|
||||
function addHoverDom(treeId, treeNode) {
|
||||
var aObj = $("#" + treeNode.tId + "_a");
|
||||
if ($("#diyBtn_"+treeNode.id).length>0) return;
|
||||
var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
|
||||
+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
|
||||
+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
|
||||
aObj.append(editStr);
|
||||
var btn = $("#diyBtn_"+treeNode.id);
|
||||
if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
|
||||
};
|
||||
function removeHoverDom(treeId, treeNode) {
|
||||
$("#diyBtn_"+treeNode.id).unbind().remove();
|
||||
$("#diyBtn_space_" +treeNode.id).unbind().remove();
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
27
static/zTree3/api/en/setting.view.autoCancelSelected.html
Normal file
27
static/zTree3/api/en/setting.view.autoCancelSelected.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.view.</span>autoCancelSelected</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When click the selected node while pressing the Ctrl-key or Cmd-key, allow to cancel selected the node.</p>
|
||||
<p class="highlight_red">If you don't need this function, please set to false.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: press the Ctrl-key or Cmd-key, can cancel selected node.</p>
|
||||
<p> false means: press the Ctrl-key or Cmd-key, can't cancel selected node.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Press the Ctrl-key or Cmd-key, can't cancel selected node.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
autoCancelSelected: false
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
45
static/zTree3/api/en/setting.view.dblClickExpand.html
Normal file
45
static/zTree3/api/en/setting.view.dblClickExpand.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>dblClickExpand</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>When double-click the parent node, 'dblClickExpand' is used to decide whether to expand the parent node.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: When double-click the parent node, zTree will expand the parent node.</p>
|
||||
<p> false means: When double-click the parent node, zTree will not expand the parent node.</p>
|
||||
</div>
|
||||
<h3>Function Pamameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which be double-clicked.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>Return value is same as 'Boolean Format'</p>
|
||||
</div>
|
||||
<h3>Example of setting</h3>
|
||||
<h4>1. When double-click the parent node, zTree will not expand the parent node.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
dblClickExpand: false
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. When double-click the parent node, zTree will expand the parent node which level>0.</h4>
|
||||
<pre xmlns=""><code>function dblClickExpand(treeId, treeNode) {
|
||||
return treeNode.level > 0;
|
||||
};
|
||||
var setting = {
|
||||
view: {
|
||||
dblClickExpand: dblClickExpand
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
31
static/zTree3/api/en/setting.view.expandSpeed.html
Normal file
31
static/zTree3/api/en/setting.view.expandSpeed.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String / Number</span><span class="path">setting.view.</span>expandSpeed</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The animation speed of expand or collapse node. As same as 'speed' parameter in jQuery</p>
|
||||
<p class="highlight_red">In order to ensure zTree operating speed, if use the IE6, zTree will not use animation.</p>
|
||||
<p>Default: "fast"</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>String Format</h3>
|
||||
<div class="desc">
|
||||
<p>e.g. "slow", "normal", or "fast"</p>
|
||||
<p class="highlight_red">If set to "", zTree will not use animation.</p>
|
||||
</div>
|
||||
<h3>Number Format</h3>
|
||||
<div class="desc">
|
||||
<p>How long the animation will run. [Unit: ms] (e.g. 1000)</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set the animation speed to slow</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
expandSpeed: "slow"
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
42
static/zTree3/api/en/setting.view.fontCss.html
Normal file
42
static/zTree3/api/en/setting.view.fontCss.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>JSON / Function(treeId, treeNode)</span><span class="path">setting.view.</span>fontCss</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Personalized text style, only applies to <A> object in the node DOM</p>
|
||||
<p>Default: {}</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>JSON Format</h3>
|
||||
<div class="desc">
|
||||
<p>As same as .css() method in jQuery. e.g. <span class="highlight_red">{color:"#ff0011", background:"blue"}</span></p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which use the personalized text style</p>
|
||||
<h4 class="topLine"><b>Return </b><span>JSON</span></h4>
|
||||
<p>Return value is same as 'JSON Format'. e.g. <span class="highlight_red">{color:"#ff0011", background:"blue"}</span></p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Don't modify css file, and set the node name's color to red</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
fontCss : {color:"red"}
|
||||
}
|
||||
};</code></pre>
|
||||
<h4>2. Don't modify css file, and set the root node name's color to red</h4>
|
||||
<pre xmlns=""><code>function setFontCss(treeId, treeNode) {
|
||||
return treeNode.level == 0 ? {color:"red"} : {};
|
||||
};
|
||||
var setting = {
|
||||
view: {
|
||||
fontCss: setFontCss
|
||||
}
|
||||
};</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
28
static/zTree3/api/en/setting.view.nameIsHTML.html
Normal file
28
static/zTree3/api/en/setting.view.nameIsHTML.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.view.</span>nameIsHTML</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set to use HTML in 'name' attribute.</p>
|
||||
<p class="highlight_red">If allow HTML, please do check to avoid security issues, e.g. JavaScript Injection...</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: 'name' attribute can be HTML.</p>
|
||||
<p> false means: 'name' attribute is only TEXT.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Set to allow HTML</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
nameIsHTML: true
|
||||
}
|
||||
};
|
||||
var node = {"name":"<font color='red'>test</font>"};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
45
static/zTree3/api/en/setting.view.removeHoverDom.html
Normal file
45
static/zTree3/api/en/setting.view.removeHoverDom.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Function(treeId, treeNode)</span><span class="path">setting.view.</span>removeHoverDom</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to hide custom control when mouse move out the node. (e.g. the rename and remove button)</p>
|
||||
<p class="highlight_red">If you use this function, so must set <span class="highlight_red">setting.view.addHoverDom</span>, please make sure that a better understanding of zTree before you use it.</p>
|
||||
<p>Default: null</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which need to hide the custom control.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Display a button when mouse move over the node, and hide the button when mouse move out.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
addHoverDom: addHoverDom,
|
||||
removeHoverDom: removeHoverDom,
|
||||
......
|
||||
}
|
||||
};
|
||||
function addHoverDom(treeId, treeNode) {
|
||||
var aObj = $("#" + treeNode.tId + "_a");
|
||||
if ($("#diyBtn_"+treeNode.id).length>0) return;
|
||||
var editStr = "<span id='diyBtn_space_" +treeNode.id+ "' > </span>"
|
||||
+ "<button type='button' class='diyBtn1' id='diyBtn_" + treeNode.id
|
||||
+ "' title='"+treeNode.name+"' onfocus='this.blur();'></button>";
|
||||
aObj.append(editStr);
|
||||
var btn = $("#diyBtn_"+treeNode.id);
|
||||
if (btn) btn.bind("click", function(){alert("diy Button for " + treeNode.name);});
|
||||
};
|
||||
function removeHoverDom(treeId, treeNode) {
|
||||
$("#diyBtn_"+treeNode.id).unbind().remove();
|
||||
$("#diyBtn_space_" +treeNode.id).unbind().remove();
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
28
static/zTree3/api/en/setting.view.selectedMulti.html
Normal file
28
static/zTree3/api/en/setting.view.selectedMulti.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.view.</span>selectedMulti</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set whether to allow select multiple nodes.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true mean: you can select multiple nodes.</p>
|
||||
<p> false mean: you can only select one node.</p>
|
||||
<p class="highlight_red">1. Press Ctrl-key or Cmd-key, you can select multiple nodes.</p>
|
||||
<p class="highlight_red">2、This attribute don't affect the feature of cancel select node. ( please see setting.view.autoCancelSelected )</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Only select one node.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
selectedMulti: false
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
45
static/zTree3/api/en/setting.view.showIcon.html
Normal file
45
static/zTree3/api/en/setting.view.showIcon.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>showIcon</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set to show or hide node icon.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: show node icon.</p>
|
||||
<p> false means: hide node icon.</p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which need to show icon.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>Return value is same as 'Boolean Format'</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Hide node icon</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
showIcon: false
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. Hide node icon which level=2</h4>
|
||||
<pre xmlns=""><code>function showIconForTree(treeId, treeNode) {
|
||||
return treeNode.level != 2;
|
||||
};
|
||||
var setting = {
|
||||
view: {
|
||||
showIcon: showIconForTree
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
26
static/zTree3/api/en/setting.view.showLine.html
Normal file
26
static/zTree3/api/en/setting.view.showLine.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.view.</span>showLine</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set to show or hide line.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: show line.</p>
|
||||
<p> false means: hide line.</p>
|
||||
</div>
|
||||
<h3>Examples of setting</h3>
|
||||
<h4>1. Hide line</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
showLine: false
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
47
static/zTree3/api/en/setting.view.showTitle.html
Normal file
47
static/zTree3/api/en/setting.view.showTitle.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>showTitle</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set to show or hide the 'title' attribute of node DOM.</p>
|
||||
<p class="highlight_red">Please see the <span class="highlight_red">setting.data.key.title</span> attribute</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: show the 'title' attribute of node DOM.</p>
|
||||
<p> false means: hide the 'title' attribute of node DOM.</p>
|
||||
<p class="highlight_red">When setting.view.showTitle = true & setting.data.key.title = '', zTree will set the 'setting.data.key.name' attribute to the 'setting.data.key.title'.</p>
|
||||
</div>
|
||||
<h3>Function Parameter Descriptions</h3>
|
||||
<div class="desc">
|
||||
<h4><b>treeId</b><span>String</span></h4>
|
||||
<p>zTree unique identifier: <b class="highlight_red">treeId</b>.</p>
|
||||
<h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
|
||||
<p>JSON data object of the node which need to show title.</p>
|
||||
<h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
|
||||
<p>Return value is same as 'Boolean Format'</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Hide the 'title' attribute of node DOM.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
showTitle: false
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
<h4>2. Hide the 'title' attribute of node DOM which level=2.</h4>
|
||||
<pre xmlns=""><code>function showTitleForTree(treeId, treeNode) {
|
||||
return treeNode.level != 2;
|
||||
};
|
||||
var setting = {
|
||||
view: {
|
||||
showTitle: showTitleForTree
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
26
static/zTree3/api/en/setting.view.txtSelectedEnable.html
Normal file
26
static/zTree3/api/en/setting.view.txtSelectedEnable.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">setting.view.</span>txtSelectedEnable</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Set to allow or don't allow to select the text which in zTree's DOM.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p> true means: Allow to select the txt which in zTree's DOM.</p>
|
||||
<p> false means: Don't allow to select the txt which in zTree's DOM.</p>
|
||||
</div>
|
||||
<h3>Examples of setting & function</h3>
|
||||
<h4>1. Allow to select the txt which in zTree's DOM.</h4>
|
||||
<pre xmlns=""><code>var setting = {
|
||||
view: {
|
||||
txtSelectedEnable: true
|
||||
}
|
||||
};
|
||||
......</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
43
static/zTree3/api/en/treeNode.check_Child_State.html
Normal file
43
static/zTree3/api/en/treeNode.check_Child_State.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Number</span><span class="path">treeNode.</span>check_Child_State</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to record the node's half-checked state about its all child nodes's checkbox or radio. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
|
||||
<p class="highlight_red">zTree v3.x provides treeNode.getCheckStatus () method to get an accurate the half-checked status.</p>
|
||||
<p class="highlight_red">Do not initialize or modify it, it is an internal argument.</p>
|
||||
<p>Default: true</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Number Format</h3>
|
||||
<div class="desc">
|
||||
<p>Rules:</p>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<thead>
|
||||
<tr><td colspan="4">setting.check.checkType = "checkbox"</td></tr>
|
||||
<tr><td>treeNode.check_Child_State</td><td>Checked Status Description</td></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>-1</td><td>Has no child nodes or all child nodes's 'nocheck' attribute is true.</td></tr>
|
||||
<tr><td>0</td><td>All of the child nodes has not been checked.</td></tr>
|
||||
<tr><td>1</td><td>Some of the child nodes has been checked.</td></tr>
|
||||
<tr><td>2</td><td>All of the child nodes has been checked.</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<thead>
|
||||
<tr><td colspan="4">setting.check.checkType = "radio"</td></tr>
|
||||
<tr><td>treeNode.check_Child_State</td><td>Checked Status Description</td></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>-1</td><td>Has no child nodes or all child nodes's 'nocheck' attribute is true.</td></tr>
|
||||
<tr><td>0</td><td>All of the child nodes has not been checked.</td></tr>
|
||||
<tr><td>2</td><td>Some of the child nodes has been checked.</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
19
static/zTree3/api/en/treeNode.check_Focus.html
Normal file
19
static/zTree3/api/en/treeNode.check_Focus.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">treeNode.</span>check_Focus</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Used to record the status which the checkbox or radio get focus. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
|
||||
<p class="highlight_red">Do not initialize or modify it, it is an internal argument.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p>true means: mouse move over the checkbox</p>
|
||||
<p>false means: mouse move out the checkbox</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
32
static/zTree3/api/en/treeNode.checked.html
Normal file
32
static/zTree3/api/en/treeNode.checked.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">treeNode.</span>checked</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The checked status about node's checkbox or radio. It is valid when <span class="highlight_red">[setting.check.enable = true & treeNode.nocheck = false]</span></p>
|
||||
<p class="highlight_red">1. If change the 'checked' to other attribute, please set the 'setting.data.key.checked' attribute.</p>
|
||||
<p class="highlight_red">2. If you create node data, and set 'checked' attribute to true, zTree will check this node's checkbox or radio when zTree is initialized.</p>
|
||||
<p class="highlight_red">3. Use the treeObj.checkNode or checkAllNodes or updateNode method, you can check or uncheck the node. Please see the API about these methods.</p>
|
||||
<p class="highlight_red">4. zTree support identification string 'true' & 'false'.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p>true means: check the checkbox or radio when zTree is initialized.</p>
|
||||
<p>false means: uncheck the checkbox or radio when zTree is initialized.</p>
|
||||
</div>
|
||||
<h3>Examples of treeNode</h3>
|
||||
<h4>1. check the checkbox when zTree is initialized</h4>
|
||||
<pre xmlns=""><code>var nodes = [
|
||||
{ "id":1, "name":"test1", checked:true },
|
||||
{ "id":2, "name":"test2", checked:true }
|
||||
]</code></pre>
|
||||
<h4>2. Get the checked status of the first root node</h4>
|
||||
<pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
|
||||
var checked = treeObj.getNodes()[0].checked;
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
25
static/zTree3/api/en/treeNode.checkedOld.html
Normal file
25
static/zTree3/api/en/treeNode.checkedOld.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">treeNode.</span>checkedOld</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The checked status about node's checkbox or radio when zTree was initialized. It is valid when <span class="highlight_red">[setting.check.enable = true & treeNode.nocheck = false]</span></p>
|
||||
<p class="highlight_red">1. Do not initialize it, it will be initialized when the node is initialized.</p>
|
||||
<p class="highlight_red">2. If you need to achieve special features, you can use the zTreeObj.getChangeCheckedNodes method and modify the value of 'checkedOld' attribute.</p>
|
||||
<p>Default: the value of 'checked' attribute when zTree is initialized</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p>true means: the checkbox or radio is checked when zTree is initialized.</p>
|
||||
<p>false means: the checkbox or radio is not checked when zTree is initialized.</p>
|
||||
</div>
|
||||
<h3>Examples of treeNode</h3>
|
||||
<h4>1. Get the original checked status of the first root node</h4>
|
||||
<pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
|
||||
var checkedOld = treeObj.getNodes()[0].checkedOld;
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
35
static/zTree3/api/en/treeNode.children.html
Normal file
35
static/zTree3/api/en/treeNode.children.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Array(JSON)</span><span class="path">treeNode.</span>children</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>The data collections of node's child nodes.</p>
|
||||
<p class="highlight_red">1. If change the 'children' to other attribute, please set the 'setting.data.key.children' attribute.</p>
|
||||
<p class="highlight_red">2. If you set to use dynamic tree, when a node is expanded which 'isParent' attribute is true and which has no child nodes, zTree will use ajax to get its child nodes.</p>
|
||||
<p>Default: undefined</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Array(JSON) Format</h3>
|
||||
<div class="desc">
|
||||
<p>Standard JSON Data object</p>
|
||||
</div>
|
||||
<h3>Examples of treeNode</h3>
|
||||
<h4>1. Use the standard JSON data object.</h4>
|
||||
<pre xmlns=""><code>var nodes = [
|
||||
{ "id":1, "name":"test1",
|
||||
children: [
|
||||
{ "id":3, "name":"test3"},
|
||||
{ "id":4, "name":"test4"},
|
||||
{ "id":5, "name":"test5"}
|
||||
]
|
||||
},
|
||||
{ "id":2, "name":"test2" }
|
||||
]</code></pre>
|
||||
<h4>2. Get the first root node's child nodes</h4>
|
||||
<pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
|
||||
var nodes = treeObj.getNodes()[0].children;
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
28
static/zTree3/api/en/treeNode.chkDisabled.html
Normal file
28
static/zTree3/api/en/treeNode.chkDisabled.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>Boolean</span><span class="path">treeNode.</span>chkDisabled</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>1. Set node's checkbox / radio to disabled. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
|
||||
<p class="highlight_red">2. zTree support identification string 'true' & 'false'.</p>
|
||||
<p class="highlight_red">3. Please don't change this attribute of the nodes which have been created. If you want to disable or undisable the nodes, please use 'setChkDisabled()' methods.</p>
|
||||
<p class="highlight_red">4. When zTree initialize the nodes, if you need to the child nodes automatically inherit the 'chkDisabled' attribute, please see 'setting.check.chkDisabledInherit'.</p>
|
||||
<p>Default: false</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Boolean Format</h3>
|
||||
<div class="desc">
|
||||
<p class="highlight_red">true means: this node's checkbox / radio is disabled.</p>
|
||||
<p class="highlight_red">false means: this node's checkbox / radio is able.</p>
|
||||
</div>
|
||||
<h3>Examples of treeNode</h3>
|
||||
<h4>1. disable some node's checkbox / radio </h4>
|
||||
<pre xmlns=""><code>var nodes = [
|
||||
{ "id":1, "name":"test1", "checked":true, "chkDisabled":true},
|
||||
{ "id":2, "name":"test2", "chkDisabled":true},
|
||||
{ "id":3, "name":"test3"}
|
||||
]</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
24
static/zTree3/api/en/treeNode.click.html
Normal file
24
static/zTree3/api/en/treeNode.click.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="apiDetail">
|
||||
<div>
|
||||
<h2><span>String</span><span class="path">treeNode.</span>click</h2>
|
||||
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
|
||||
<div class="desc">
|
||||
<p></p>
|
||||
<div class="longdesc">
|
||||
<p>Simple click event operations. As same as : (onclick ="...") the code. If the operation is more complex, please use the onClick callback.</p>
|
||||
<p class="highlight_red">Because IE is different to other browsers in operating the event of ‘onclick’ and ‘click’ coexistence, please do not use this parameter to control whether to allow the redirection operation (for example: treeNode.click = "return false;"). If there is similar requirements, please do not use the 'url' attribute to save the website address, but use the 'onClick' callback to control jumps.</p>
|
||||
<p>Default: undefined</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>String Format</h3>
|
||||
<div class="desc">
|
||||
<p>Standard javascript syntax, for example: alert ("test"); etc.</p>
|
||||
</div>
|
||||
<h3>Examples of treeNode</h3>
|
||||
<h4>1. When click this node, will alert msg.</h4>
|
||||
<pre xmlns=""><code>var nodes = [
|
||||
{ "id":1, "name":"Google CN", "url":"http://g.cn", "click":"alert('test');"},
|
||||
......
|
||||
]</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user