From b71c04d0c4880a82fbb7982b89af388fcae3f383 Mon Sep 17 00:00:00 2001 From: ztree Date: Mon, 27 Apr 2015 09:18:59 +0800 Subject: [PATCH] Improved english descriptions --- api/en/fn.zTree._z.html | 20 +++++++++++--------- api/en/fn.zTree.destroy.html | 15 ++++++++------- api/en/fn.zTree.getZTreeObj.html | 10 ++++++---- api/en/fn.zTree.init.html | 26 ++++++++++++++++---------- api/en/setting.async.autoParam.html | 15 +++++++++------ api/en/setting.async.contentType.html | 3 ++- api/en/setting.async.dataFilter.html | 10 +++++----- api/en/setting.async.dataType.html | 6 +++--- api/en/setting.async.enable.html | 6 +++--- 9 files changed, 63 insertions(+), 48 deletions(-) diff --git a/api/en/fn.zTree._z.html b/api/en/fn.zTree._z.html index 61da261d8..e2ae61d66 100644 --- a/api/en/fn.zTree._z.html +++ b/api/en/fn.zTree._z.html @@ -1,13 +1,15 @@
-

JSON$.fn.zTree._z

-

Overview[ depends on jquery.ztree.core js ]

-
-

-
-

All of the methods in zTree v3.x are available through the '$. fn.zTree._z' calls, open it for you to develop your own zTree plug-ins.

-

If you have no special requirements, please don't use this object, and don't modify the methods in this object.

-
-
+

JSON$.fn.zTree._z

+

Overview[ depends on jquery.ztree.core js ]

+
+

+
+

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.

+

Unless you are writing a plugin, + you should not use this object.

+
+
\ No newline at end of file diff --git a/api/en/fn.zTree.destroy.html b/api/en/fn.zTree.destroy.html index 3a3169993..c53cb8009 100644 --- a/api/en/fn.zTree.destroy.html +++ b/api/en/fn.zTree.destroy.html @@ -5,24 +5,25 @@

-

From zTree v3.4, zTree support the method for destruction.

-

1. This method can destroy the zTree with specify treeId, and can destroy all of the zTrees.

-

2. If you want to destory some one zTree, you can use the 'zTreeObj.destroy()' method.

-

3. If you want to use the tree which has been destroyed, you must use the 'init()' method at first.

+

From zTree v3.4, zTree provides a method for destruction.

+

1. This method can destroy a zTree by treeId, or destroy all zTree instances.

+

2. If you want to destroy a zTree, you can use the 'zTreeObj.destroy()' method.

+

3. If you want to re-use the tree which has been destroyed, + you must first re-initialise it with the 'init()' method.

Function Parameter Descriptions

treeIdString

zTree unique identifier

-

If this parameter is omitted, then will destroy all of the zTrees.

+

If this parameter is omitted, all zTree instances will be destroyed.

Return none

no return value

Examples of function

-

1. destroy the zTree which its id is 'treeDemo'

+

1. Destroy the zTree with id === 'treeDemo'

$.fn.zTree.destroy("treeDemo");
-

2. destroy all of the zTrees

+

2. Destroy all zTree instances

$.fn.zTree.destroy();
\ No newline at end of file diff --git a/api/en/fn.zTree.getZTreeObj.html b/api/en/fn.zTree.getZTreeObj.html index 2bc044762..49dadaa95 100644 --- a/api/en/fn.zTree.getZTreeObj.html +++ b/api/en/fn.zTree.getZTreeObj.html @@ -5,9 +5,11 @@

-

zTree v3.x specifically provide the method which can use the tree's Id to get zTree object.

+

zTree v3.x provides this method to get zTree object from the tree's Id.

Please initialize zTree first, then you can use this method.

-

Users don't need to set the global variable to hold the zTree object, and all of the callback will return 'treeId' parameters, the user can always use this method to get the zTree object.

+

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.

Function Parameter Descriptions

@@ -16,10 +18,10 @@

zTree unique identifier

Return JSON

zTree object

-

This object can provide the methods of operate the zTree

+

This is a reference to the zTree object.

Examples of function

-

1. Get the zTree object which id is 'tree'

+

1. Get the zTree object with id='tree'

var treeObj = $.fn.zTree.getZTreeObj("tree");
\ No newline at end of file diff --git a/api/en/fn.zTree.init.html b/api/en/fn.zTree.init.html index cf97d2bc0..b8c5e2a6c 100644 --- a/api/en/fn.zTree.init.html +++ b/api/en/fn.zTree.init.html @@ -5,13 +5,18 @@

-

The method which used to create zTree.

-

1. The web page need to use W3C markup. For example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

-

2. Need to load jquery-1.4.2.js or other higher versions.

-

3. Need to load jquery-ztree.core-3.0.js. If you need to use the edit mode or checkbox / radio mode, you need to load jquery-ztree.exedit-3.0.js and jquery-ztree.excheck-3.0.js.

-

4. Need to load zTreeStyle.css and image files

-

5. If you need to use custom icons, please refer to the appropriate Demo.

-

6. Note: You need to set zTree container's class name to "ztree". If you need to change, don't forget to modify the css file. If you need other special styles, can modify the css file to their own needs.

+

This method is used to create a zTree.

+

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

+

2. Needs jquery-1.4.2.js or better.

+

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.

+

4. Needs zTreeStyle.css and image files

+

5. If you plan to use custom icons, please refer to the Demo, + or see the help on iconSkin.

+

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.

Function Parameter Descriptions

@@ -22,9 +27,10 @@

zTree's configuration data, please refer to "setting details" in the API Document.

zNodesArray(JSON) / JSON

zTree's node data, please refer to "treeNode data details" in the API Document.

-

1. zTree v3.x support to add single node, that is, if only to add one node, you can use JSON without using Array.

-

2. If you need asynchronous load root nodes, can be set to null or [ ]

-

3. If you use simple data mode, please refer to "setting.data.simpleData" in the API Document.

+

1. zTree v3.x support to add single node, that is, if only to add one node, + you can use JSON without using Array.

+

2. If you are planning on using asynchronous loading of root nodes, set it to null or [ ]

+

3. If you are using simple data mode, please refer to "setting.data.simpleData" in the API Document.

Return JSON

zTree object

This object can provide the methods of operate the zTree

diff --git a/api/en/setting.async.autoParam.html b/api/en/setting.async.autoParam.html index 85cd46919..e187b16e1 100644 --- a/api/en/setting.async.autoParam.html +++ b/api/en/setting.async.autoParam.html @@ -5,14 +5,17 @@

-

Required automatically submit the parameters about the properties of the parent node, when the asynchronous load. It is valid when [setting.async.enable = true]

+

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 [setting.async.enable = true]

Default:[ ]

Array(String) Format

-

1. Just save the attribute name of node to the array. For example: ["id", "name"]

-

2. You can change the parameter name. For example: server only accepts "zId" -- ["id=zId"]

+

1. Put the attribute name(s) of node to the array. For example: ["id", "name"]

+

2. You can rename the parameter name as sent to the server. For example: server only accepts "zId" -- ["id=zId"]

Examples of setting

1. set auto commit 'id' attribute

@@ -23,9 +26,9 @@ autoParam: ["id"] } }; -If have the parent node: {id:1, name:"test"}, When asynchronously load this parent node's child nodes, will be submitted parameters: id=1 +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 ...... -

2. set auto commit 'id' attribute, but parameter name is 'zId'

+

2. set auto commit 'id' attribute, but the parameter name expected by the server is 'zId'

var setting = {
 	async: {
 		enable: true,
@@ -33,7 +36,7 @@ If have the parent node: {id:1, name:"test"}, When asynchronously load this pare
 		autoParam: ["id=zId"]
 	}
 };
-If have the parent node: {id:1, name:"test"}, When asynchronously load this parent node's child nodes, will be submitted parameters: zId=1
+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
 ......
\ No newline at end of file diff --git a/api/en/setting.async.contentType.html b/api/en/setting.async.contentType.html index cc9bfcd35..c9e150995 100644 --- a/api/en/setting.async.contentType.html +++ b/api/en/setting.async.contentType.html @@ -5,7 +5,8 @@

-

When Ajax sending data to the server, use this content-type. It is valid when [setting.async.enable = true]

+

When Ajax sends data to the server, it uses this content-type. + It is used when [setting.async.enable = true]

Default:"application/x-www-form-urlencoded"

diff --git a/api/en/setting.async.dataFilter.html b/api/en/setting.async.dataFilter.html index 34733e4d3..4347a0822 100644 --- a/api/en/setting.async.dataFilter.html +++ b/api/en/setting.async.dataFilter.html @@ -5,26 +5,26 @@

-

Function used to pre-process for the return data of Ajax. It is valid when [setting.async.enable = true]

+

Callback function to pre-process Ajax return data. It is valid when [setting.async.enable = true]

Default: null

Function Parameter Descriptions

treeIdString

-

zTree unique identifier: treeId, easy for users to control.

+

zTree unique identifier: treeId

parentNodeJSON

Parent node's JSON data object

When asynchronously loading the root, the parentNode = null

responseDataArray(JSON) / JSON / String

-

Ajax got Array (JSON) / JSON / String data objects

-

From v3.4, support the string with XML format.

+

Array (JSON) / JSON / String data objects

+

From v3.4, support XML strings.

Return Array(JSON) / JSON

The return value should be the JSON data structure which is supported by the zTree.

v3.x supports to load single node JSON data object.

Examples of setting & function

-

1. Modify the node name attribute which is ajax got.

+

1. Modify the node name attributes returned by an Ajax request.

function ajaxDataFilter(treeId, parentNode, responseData) {
     if (responseData) {
       for(var i =0; i < responseData.length; i++) {
diff --git a/api/en/setting.async.dataType.html b/api/en/setting.async.dataType.html
index e6672e9b4..1aee441b5 100644
--- a/api/en/setting.async.dataType.html
+++ b/api/en/setting.async.dataType.html
@@ -11,11 +11,11 @@
 	
 	

String Format

-

dataType = "text", It can meet most of the needs.

-

The 'dataType' in zTree and jQuery's ajax is same.

+

dataType = "text", There is probably no need to change this.

+

The 'dataType' in zTree and jQuery's ajax requests is same.

Examples of setting

-

1. Set the dataType which ajax got is text.

+

1. Set the dataType which ajax retrieves to "text".

var setting = {
 	async: {
 		enable: true,
diff --git a/api/en/setting.async.enable.html b/api/en/setting.async.enable.html
index 806ba6c65..c28447649 100644
--- a/api/en/setting.async.enable.html
+++ b/api/en/setting.async.enable.html
@@ -5,7 +5,7 @@
 	

-

Set zTree asynchronous loading mode is turned on or off.

+

Set zTree asynchronous loading mode on/off.

Default: false

@@ -13,8 +13,8 @@

true - turn on asynchronous loading mode

false - turn off asynchronous loading mode

-

If set it is true, you must set attributes in setting.async

-

If you don't pass 'treeNodes' parameter when initialize zTree, the root nodes will get by ajax.

+

If set it is true, you must set other attributes in setting.async

+

If you don't pass the 'treeNodes' parameter when you initialize zTree, the root nodes will be retrieved using ajax.

Examples of setting

1. Turn on asynchronous loading mode

-- GitLab