From fbbf467696810b7ca2ddac6de0d076af424a2ef0 Mon Sep 17 00:00:00 2001 From: shentao Date: Wed, 19 Apr 2017 18:24:26 +0800 Subject: integrated monitor and performance functions Issue-id: CLIENT-175 Change-Id: I07adc77afd9f62f615790896c9241f8430583398 Signed-off-by: shentao --- .../zTree/api/en/setting.view.addHoverDom.html | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addHoverDom.html (limited to 'common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addHoverDom.html') diff --git a/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addHoverDom.html b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addHoverDom.html new file mode 100755 index 00000000..1ea8b6d9 --- /dev/null +++ b/common/src/main/webapp/thirdparty/zTree/api/en/setting.view.addHoverDom.html @@ -0,0 +1,45 @@ +
+
+

Function(treeId, treeNode)setting.view.addHoverDom

+

Overview[ depends on jquery.ztree.exedit js ]

+
+

+
+

Used to display custom control when mouse move over the node. (e.g. the rename and remove button)

+

If you use this function, so must set setting.view.removeHoverDom, please make sure that a better understanding of zTree before you use it.

+

Default: null

+
+
+

Function Parameter Descriptions

+
+

treeIdString

+

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

+

treeNodeJSON

+

JSON data object of the node which need to display the custom control.

+
+

Examples of setting & function

+

1. Display a button when mouse move over the node, and hide the button when mouse move out.

+
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();
+};
+......
+
+
\ No newline at end of file -- cgit 1.2.3-korg