From 33796336d546fa61a3906500ea56d77c960ab222 Mon Sep 17 00:00:00 2001 From: “shentao” Date: Fri, 21 Oct 2016 15:05:13 +0800 Subject: GSO-35 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3ad00c3c9265a1b3818decedca1d77995864ba29 Signed-off-by: “shentao” --- .../zTree/api/en/setting.edit.showRenameBtn.html | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/en/setting.edit.showRenameBtn.html (limited to 'openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/en/setting.edit.showRenameBtn.html') diff --git a/openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/en/setting.edit.showRenameBtn.html b/openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/en/setting.edit.showRenameBtn.html new file mode 100644 index 00000000..4fe2f581 --- /dev/null +++ b/openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/en/setting.edit.showRenameBtn.html @@ -0,0 +1,52 @@ +
+
+

Boolean / Function(treeId, treeNode)setting.edit.showRenameBtn

+

Overview[ depends on jquery.ztree.exedit js ]

+
+

+
+

Set to show or hide the rename button. It is valid when [setting.edit.enable = true]

+

When you click the rename button:

+

1. Click the rename button, you can rename the node.

+

2. After rename operation (the input DOM blur or press the Enter Key), zTree will trigger the setting.callback.beforeRename callback, and you can decide whether to allow rename.

+

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.

+

4. If you don't set the 'beforeRename' or the 'beforeRename' callback return true, so zTree will trigger the setting.callback.onRename callback after rename the node.

+

Default: true

+
+
+

Boolean Format

+
+

true means: show the rename button

+

false means: hide the rename button

+
+

Function Parameter Descriptions

+
+

treeIdString

+

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

+

treeNodeJSON

+

JSON data object of the node which show the rename button

+

Return Boolean

+

Return value is same as 'Boolean Format'

+
+

Examples of setting & function

+

1. Hide the rename button

+
var setting = {
+	edit: {
+		enable: true,
+		showRenameBtn: false
+	}
+};
+......
+

2. Hide the rename button of parent node

+
function setRenameBtn(treeId, treeNode) {
+	return !treeNode.isParent;
+}
+var setting = {
+	edit: {
+		enable: true,
+		showRenameBtn: setRenameBtn
+	}
+};
+......
+
+
\ No newline at end of file -- cgit 1.2.3-korg